Skip to content

Commit 7997e72

Browse files
feat: replace manifest_version with $schema field
- Replace manifest_version with $schema field pointing to official schema URL - Support backward compatibility with legacy dxt_version field - Update all examples and tests to use new $schema field - Mark dxt_version as deprecated but still functional - Require either $schema or dxt_version (at least one must be present)
1 parent cd922a0 commit 7997e72

File tree

14 files changed

+94
-30
lines changed

14 files changed

+94
-30
lines changed

MANIFEST.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A basic `manifest.json` with just the required fields looks like this:
1111

1212
```json
1313
{
14-
"manifest_version": "0.1", // Manifest spec version this manifest conforms to
14+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json", // JSON Schema URL for validation
1515
"name": "my-extension", // Machine-readable name (used for CLI, APIs)
1616
"version": "1.0.0", // Semantic version of your extension
1717
"description": "A simple MCP extension", // Brief description of what the extension does
@@ -37,7 +37,7 @@ A basic `manifest.json` with just the required fields looks like this:
3737

3838
```json
3939
{
40-
"manifest_version": "0.1",
40+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
4141
"name": "my-extension",
4242
"version": "1.0.0",
4343
"description": "A simple MCP extension",
@@ -71,7 +71,7 @@ A full `manifest.json` with most of the optional fields looks like this:
7171

7272
```json
7373
{
74-
"manifest_version": "0.1",
74+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
7575
"name": "My MCP Extension",
7676
"display_name": "My Awesome MCP Extension",
7777
"version": "1.0.0",
@@ -162,7 +162,7 @@ A full `manifest.json` with most of the optional fields looks like this:
162162

163163
### Required Fields
164164

165-
- **manifest_version**: Specification version this extension conforms to
165+
- **$schema**: JSON Schema URL for validation (defaults to https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json)
166166
- **name**: Machine-readable name (used for CLI, APIs)
167167
- **version**: Semantic version (semver)
168168
- **description**: Brief description

examples/chrome-applescript/manifest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"$schema": "../../dist/mcpb-manifest.schema.json",
3-
"manifest_version": "0.1",
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
43
"name": "chrome-applescript",
54
"display_name": "Control Chrome with AppleScript",
65
"version": "0.1.0",

examples/file-manager-python/manifest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"$schema": "../../dist/mcpb-manifest.schema.json",
3-
"manifest_version": "0.1",
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
43
"name": "file-manager-python",
54
"display_name": "Python File Manager MCP",
65
"version": "0.1.0",

examples/file-system-node/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"manifest_version": "0.1",
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
33
"id": "anthropic.demo.filesystem",
44
"name": "Filesystem",
55
"display_name": "Filesystem",

examples/hello-world-node/manifest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"$schema": "../../dist/mcpb-manifest.schema.json",
3-
"manifest_version": "0.1",
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
43
"name": "hello-world-node",
54
"display_name": "Hello World MCP Server (Reference Extension)",
65
"version": "0.1.0",

src/cli/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ export function buildManifest(
773773
const { keywords, license, repository } = optionalFields;
774774

775775
return {
776-
manifest_version: "0.1",
776+
$schema: "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
777777
name,
778778
...(displayName && displayName !== name
779779
? { display_name: displayName }

src/schemas-loose.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ export const McpbUserConfigValuesSchema = z.record(
7979
export const McpbManifestSchema = z
8080
.object({
8181
$schema: z.string().optional(),
82-
dxt_version: z.string().optional().describe("@deprecated Use manifest_version instead"),
83-
manifest_version: z.string().optional(),
82+
dxt_version: z.string().optional().describe("@deprecated - Use $schema instead"),
8483
name: z.string(),
8584
display_name: z.string().optional(),
8685
version: z.string(),
@@ -106,9 +105,9 @@ export const McpbManifestSchema = z
106105
.optional(),
107106
})
108107
.refine(
109-
(data) => !!(data.dxt_version || data.manifest_version),
108+
(data) => !!(data.$schema || data.dxt_version),
110109
{
111-
message: "Either 'dxt_version' (deprecated) or 'manifest_version' must be provided",
110+
message: "Either '$schema' or 'dxt_version' (deprecated) must be provided",
112111
}
113112
);
114113

src/schemas.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ export const McpbUserConfigValuesSchema = z.record(
7979
export const McpbManifestSchema = z
8080
.strictObject({
8181
$schema: z.string().optional(),
82-
dxt_version: z.string().optional().describe("@deprecated Use manifest_version instead"),
83-
manifest_version: z.string().optional(),
82+
dxt_version: z.string().optional().describe("@deprecated - Use $schema instead"),
8483
name: z.string(),
8584
display_name: z.string().optional(),
8685
version: z.string(),
@@ -106,9 +105,9 @@ export const McpbManifestSchema = z
106105
.optional(),
107106
})
108107
.refine(
109-
(data) => !!(data.dxt_version || data.manifest_version),
108+
(data) => !!(data.$schema || data.dxt_version),
110109
{
111-
message: "Either 'dxt_version' (deprecated) or 'manifest_version' must be provided",
110+
message: "Either '$schema' or 'dxt_version' (deprecated) must be provided",
112111
}
113112
);
114113

test/cli.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe("DXT CLI", () => {
9191
fs.writeFileSync(
9292
join(tempDir, "manifest.json"),
9393
JSON.stringify({
94-
manifest_version: "1.0",
94+
$schema: "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
9595
name: "Test Extension",
9696
version: "1.0.0",
9797
description: "A test extension",
@@ -188,7 +188,7 @@ describe("DXT CLI", () => {
188188
fs.writeFileSync(
189189
join(tempExecDir, "manifest.json"),
190190
JSON.stringify({
191-
manifest_version: "1.0",
191+
$schema: "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
192192
name: "Test Executable Extension",
193193
version: "1.0.0",
194194
description: "A test extension with executable files",

test/config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe("getMcpConfigForManifest", () => {
9090
};
9191

9292
const baseManifest: McpbManifest = {
93-
manifest_version: "1.0.0",
93+
$schema: "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
9494
name: "test-extension",
9595
version: "1.0.0",
9696
description: "Test extension",
@@ -305,7 +305,7 @@ describe("getMcpConfigForManifest", () => {
305305

306306
describe("hasRequiredConfigMissing", () => {
307307
const baseManifest: McpbManifest = {
308-
manifest_version: "1.0.0",
308+
$schema: "https://static.modelcontextprotocol.io/schemas/2025-08-26/mcpb.manifest.schema.json",
309309
name: "test-extension",
310310
version: "1.0.0",
311311
description: "Test extension",

0 commit comments

Comments
 (0)