Skip to content

Commit 11d1397

Browse files
Merge pull request #138 from anthropics/feat/export-versioned-schemas
feat: export versioned schemas in package.json
2 parents 7961b32 + c29d100 commit 11d1397

14 files changed

+1179
-53
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ To set up commit signing, see [GitHub's documentation on commit signature verifi
4646
### Bug Reports
4747

4848
When filing a bug report, please include:
49+
4950
- Clear description of the issue
5051
- Steps to reproduce
5152
- Expected vs actual behavior
@@ -55,13 +56,15 @@ When filing a bug report, please include:
5556
### Feature Requests
5657

5758
We welcome feature suggestions! Please:
59+
5860
- Clearly describe the feature and use case
5961
- Explain why this would be valuable to users
6062
- Consider if it aligns with the project's goals
6163

6264
### Code Contributions
6365

6466
We especially welcome:
67+
6568
- Bug fixes
6669
- Documentation improvements
6770
- Test coverage improvements

MANIFEST.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A basic `manifest.json` with just the required fields looks like this:
1717
"description": "A simple MCP extension", // Brief description of what the extension does
1818
"author": {
1919
// Author information (required)
20-
"name": "Extension Author" // Author's name (required field)
20+
"name": "Extension Author", // Author's name (required field)
2121
},
2222
"server": {
2323
// Server configuration (required)
@@ -28,10 +28,10 @@ A basic `manifest.json` with just the required fields looks like this:
2828
"command": "node", // Command to run the server
2929
"args": [
3030
// Arguments passed to the command
31-
"${__dirname}/server/index.js" // ${__dirname} is replaced with the extension's directory
32-
]
33-
}
34-
}
31+
"${__dirname}/server/index.js", // ${__dirname} is replaced with the extension's directory
32+
],
33+
},
34+
},
3535
}
3636
```
3737

@@ -212,12 +212,12 @@ A full `manifest.json` with most of the optional fields looks like this:
212212
"type": "string"
213213
}
214214
}
215-
},
215+
}
216216
}
217217
}
218218
]
219219
}
220-
},
220+
}
221221
}
222222
}
223223
}
@@ -254,7 +254,7 @@ A full `manifest.json` with most of the optional fields looks like this:
254254
- **privacy_policies**: Array of URLs to privacy policies for external services that handle user data. Required when the extension connects to external services (first- or third-party) that process user data. Each URL should link to the respective service's privacy policy document.
255255
- **compatibility**: Compatibility requirements (client app version, platforms, and runtime versions).
256256
- **user_config**: User-configurable options for the extension (see User Configuration section).
257-
- **_meta**: Platform-specific client integration metadata (e.g., Windows `package_family_name`, macOS bundle identifiers) enabling tighter OS/app store integration. The keys in the `_meta` object are reverse-DNS namespaced, and the values are a dictionary of platform-specific metadata.
257+
- **\_meta**: Platform-specific client integration metadata (e.g., Windows `package_family_name`, macOS bundle identifiers) enabling tighter OS/app store integration. The keys in the `_meta` object are reverse-DNS namespaced, and the values are a dictionary of platform-specific metadata.
258258
- **localization**: Location of translated strings for user-facing fields (`resources` path containing a `${locale}` placeholder and `default_locale`).
259259

260260
### Localization
@@ -268,15 +268,16 @@ Provide localized strings without bloating the manifest by pointing to external
268268
}
269269
```
270270

271-
- `resources` must include a `${locale}` placeholder. Clients resolve it relative to the server install directory.
271+
- `resources` must include a `${locale}` placeholder. Clients resolve it relative to the server install directory.
272272
- This property is optional, and its default value is **`mcpb-resources/${locale}.json`**.
273273
- `default_locale` must be a valid [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) identifier such as `en-US` or `zh-Hans`.
274274
- This property is optional, and its default value is `en-US`.
275275
- Values for the default locale stay in the main manifest; localized files only need to contain overrides.
276276

277-
For tools and prompts, the descriptions are also localizable.
277+
For tools and prompts, the descriptions are also localizable.
278278

279279
#### Client guidelines
280+
280281
- if a client wants to show tool or prompt descriptions in their UI, the client should look for the locale-specific description override in the corresponding per-locale file.
281282
- clients should only look for tools/prompts present in the manifest.json, i.e. prompts and tools that only exist in the per-locale file should be ignored.
282283
- Clients should apply locale fallbacks if the client/user locale is not represented by the server. For example, if the user is in the `es-UY` locale but the server does not include that per-locale file, the client should look for an approrpiate fallback, e.g. `es-MX` or `es-ES`, or fall back to the values in the manifest.
@@ -712,4 +713,3 @@ The `_generated` fields:
712713
- **prompts_generated**: Server generates additional prompts beyond those listed (default: false)
713714

714715
This helps implementing apps understand that querying the server at runtime will reveal more capabilities than what's declared in the manifest.
715-

package.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@anthropic-ai/mcpb",
33
"description": "Tools for building MCP Bundles",
4-
"version": "1.1.2",
4+
"version": "1.1.3",
55
"type": "module",
66
"main": "dist/index.js",
77
"module": "dist/index.js",
@@ -27,7 +27,25 @@
2727
"import": "./dist/cli.js",
2828
"require": "./dist/cli.js"
2929
},
30-
"./mcpb-manifest.schema.json": "./dist/mcpb-manifest.schema.json"
30+
"./mcpb-manifest-v0.1.schema.json": "./dist/mcpb-manifest-v0.1.schema.json",
31+
"./mcpb-manifest-v0.2.schema.json": "./dist/mcpb-manifest-v0.2.schema.json",
32+
"./mcpb-manifest-v0.3.schema.json": "./dist/mcpb-manifest-v0.3.schema.json",
33+
"./mcpb-manifest-latest.schema.json": "./dist/mcpb-manifest-latest.schema.json",
34+
"./schemas": {
35+
"types": "./dist/schemas/index.d.ts",
36+
"import": "./dist/schemas/index.js",
37+
"require": "./dist/schemas/index.js"
38+
},
39+
"./schemas/*": {
40+
"types": "./dist/schemas/*.d.ts",
41+
"import": "./dist/schemas/*.js",
42+
"require": "./dist/schemas/*.js"
43+
},
44+
"./schemas-loose": {
45+
"types": "./dist/schemas-loose.d.ts",
46+
"import": "./dist/schemas-loose.js",
47+
"require": "./dist/schemas-loose.js"
48+
}
3149
},
3250
"bin": "dist/cli/cli.js",
3351
"files": [
@@ -81,4 +99,4 @@
8199
"@babel/parser": "7.27.3"
82100
},
83101
"packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
84-
}
102+
}

0 commit comments

Comments
 (0)