Skip to content

Commit 0a17553

Browse files
authored
Merge branch 'modelcontextprotocol:main' into dotnet
2 parents 1a34ce1 + dd9502e commit 0a17553

43 files changed

Lines changed: 2776 additions & 281 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,32 @@ jobs:
3939
run: yarn build
4040
- name: Test
4141
run: yarn lint && yarn test
42+
43+
validate-schemas:
44+
name: Validate JSON Schemas
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
- name: Setup Node.js
50+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
51+
with:
52+
node-version: "22.17.x"
53+
cache: "yarn"
54+
- name: Install dependencies
55+
run: yarn install --immutable
56+
- name: Build code (required for schema generation)
57+
run: yarn build:code
58+
- name: Generate schemas
59+
run: yarn build:schema
60+
- name: Check for schema changes
61+
run: |
62+
if ! git diff --exit-code schemas/; then
63+
echo "Error: JSON schemas in schemas/ directory are out of sync!"
64+
echo "Please run 'yarn build:schema' and commit the changes."
65+
echo ""
66+
echo "Changes detected:"
67+
git diff schemas/
68+
exit 1
69+
fi
70+
echo "✓ All schemas are up to date"

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"eslint.validate": ["typescript"],
77
"[typescript]": {
88
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
9-
}
9+
},
10+
"typescript.tsdk": "node_modules/typescript/lib"
1011
}

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: 93 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MCPB Manifest.json Spec
22

3-
Current version: `0.2`
4-
Last updated: 2025-09-12
3+
Current version: `0.3`
4+
Last updated: 2025-10-24
55

66
## Manifest Schema
77

@@ -11,13 +11,13 @@ A basic `manifest.json` with just the required fields looks like this:
1111

1212
```jsonc
1313
{
14-
"manifest_version": "0.2", // Manifest spec version this manifest conforms to
14+
"manifest_version": "0.3", // Manifest spec version this manifest conforms to
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
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,16 +28,16 @@ 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

3838
```json
3939
{
40-
"manifest_version": "0.2",
40+
"manifest_version": "0.3",
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+
"manifest_version": "0.3",
7575
"name": "My MCP Extension",
7676
"display_name": "My Awesome MCP Extension",
7777
"version": "1.0.0",
@@ -84,16 +84,32 @@ A full `manifest.json` with most of the optional fields looks like this:
8484
},
8585
"repository": {
8686
"type": "git",
87-
"url": "https://github.com/your-username/my-mcp-extension"
87+
"url": "https://github.com/your-username/my-mcp-extension.git"
8888
},
8989
"homepage": "https://example.com/my-extension",
9090
"documentation": "https://docs.example.com/my-extension",
9191
"support": "https://github.com/your-username/my-extension/issues",
9292
"icon": "icon.png",
93+
"icons": [
94+
{
95+
"src": "assets/icons/icon-16-light.png",
96+
"size": "16x16",
97+
"theme": "light"
98+
},
99+
{
100+
"src": "assets/icons/icon-16-dark.png",
101+
"size": "16x16",
102+
"theme": "dark"
103+
}
104+
],
93105
"screenshots": [
94106
"assets/screenshots/screenshot1.png",
95107
"assets/screenshots/screenshot2.png"
96108
],
109+
"localization": {
110+
"resources": "custom-directory-for-mcpb-resources/${locale}.json",
111+
"default_locale": "en-US"
112+
},
97113
"server": {
98114
"type": "node",
99115
"entry_point": "server/index.js",
@@ -196,12 +212,12 @@ A full `manifest.json` with most of the optional fields looks like this:
196212
"type": "string"
197213
}
198214
}
199-
},
215+
}
200216
}
201217
}
202218
]
203219
}
204-
},
220+
}
205221
}
206222
}
207223
}
@@ -214,30 +230,72 @@ A full `manifest.json` with most of the optional fields looks like this:
214230
- **manifest_version**: Specification version this extension conforms to
215231
- **name**: Machine-readable name (used for CLI, APIs)
216232
- **version**: Semantic version (semver)
217-
- **description**: Brief description
218-
- **author**: Author information object with name (required), email (optional), and url (optional)
233+
- 🌎 **description**: Brief description. This field is localizable.
234+
- 🌎 **author**: Author information object with name (required, localizable), email (optional), and url (optional)
219235
- **server**: Server configuration object
220236

221237
### Optional Fields
222238

223-
- **icon**: Path to a png icon file, either relative in the package or a https:// url.
224-
- **display_name**: Human-friendly name for UI display
225-
- **long_description**: Detailed description for extension stores, markdown
226-
- **repository**: Source code repository information (type and url)
227-
- **homepage**: Extension homepage URL
228-
- **documentation**: Documentation URL
229-
- **support**: Support/issues URL
230-
- **screenshots**: Array of screenshot paths
231-
- **tools**: Array of tools the extension provides
232-
- **tools_generated**: Boolean indicating the server generates additional tools at runtime (default: false)
233-
- **prompts**: Array of prompts the extension provides
234-
- **prompts_generated**: Boolean indicating the server generates additional prompts at runtime (default: false)
235-
- **keywords**: Search keywords
236-
- **license**: License identifier
237-
- **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
238-
- **compatibility**: Compatibility requirements (client app version, platforms, and runtime versions)
239-
- **user_config**: User-configurable options for the extension (see User Configuration section)
240-
- **_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.
239+
- **icon**: Path to a png icon file, either relative in the package or a `https://` url.
240+
- **icons**: Array of icon descriptors (`src`, `size`, optional `theme`) for light/dark or size-specific assets.
241+
- 🌎 **display_name**: Human-friendly name for UI display. This field is localizable.
242+
- 🌎 **long_description**: Detailed description for extension stores, markdown. This field is localizable.
243+
- **repository**: Source code repository information (type and url).
244+
- **homepage**: Extension homepage URL.
245+
- **documentation**: Documentation URL.
246+
- **support**: Support/issues URL.
247+
- **screenshots**: Array of screenshot paths.
248+
- 🌎 **tools**: Array of tools the extension provides. This field is localizable.
249+
- **tools_generated**: Boolean indicating the server generates additional tools at runtime (default: false).
250+
- 🌎 **prompts**: Array of prompts the extension provides. This field is localizable.
251+
- **prompts_generated**: Boolean indicating the server generates additional prompts at runtime (default: false).
252+
- 🌎 **keywords**: Search keywords. This field is localizable.
253+
- **license**: License identifier.
254+
- **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.
255+
- **compatibility**: Compatibility requirements (client app version, platforms, and runtime versions).
256+
- **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.
258+
- **localization**: Location of translated strings for user-facing fields (`resources` path containing a `${locale}` placeholder and `default_locale`).
259+
260+
### Localization
261+
262+
Provide localized strings without bloating the manifest by pointing to external per-locale resource files. A localization entry looks like this:
263+
264+
```jsonc
265+
"localization": {
266+
"resources": "relative-path-to-resources/${locale}.json",
267+
"default_locale": "en-US"
268+
}
269+
```
270+
271+
- `resources` must include a `${locale}` placeholder. Clients resolve it relative to the server install directory.
272+
- This property is optional, and its default value is **`mcpb-resources/${locale}.json`**.
273+
- `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`.
274+
- This property is optional, and its default value is `en-US`.
275+
- Values for the default locale stay in the main manifest; localized files only need to contain overrides.
276+
277+
For tools and prompts, the descriptions are also localizable.
278+
279+
#### Client guidelines
280+
281+
- 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.
282+
- 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.
283+
- 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.
284+
285+
### Icons
286+
287+
Use the `icons` array when you need multiple icon variants (different sizes or themes):
288+
289+
```json
290+
"icons": [
291+
{ "src": "assets/icons/icon-16-light.png", "size": "16x16", "theme": "light" },
292+
{ "src": "assets/icons/icon-16-dark.png", "size": "16x16", "theme": "dark" }
293+
]
294+
```
295+
296+
- `size` must be in `WIDTHxHEIGHT` form (e.g., `128x128`).
297+
- `theme` is optional; use values like `light`, `dark`, or platform-specific labels (e.g., `high-contrast`).
298+
- The legacy `icon` field remains supported for single assets—clients use it when `icons` is omitted.
241299

242300
## Compatibility
243301

@@ -606,9 +664,9 @@ For servers with a fixed set of capabilities, list them in arrays.
606664
Each prompt in the `prompts` array must include:
607665

608666
- **name**: The identifier for the prompt
609-
- **description** (optional): Explanation of what the prompt does
667+
- 🌎 **description** (optional): Explanation of what the prompt does
610668
- **arguments** (optional): Array of argument names that can be used in the prompt text
611-
- **text**: The actual prompt text that uses template variables like `${arguments.topic}` or `${arguments.aspect}` as placeholders for MCP Client-supplied arguments. If your argument is named `language`, you'd add `${arguments.language} where you expect it to show up in the prompt.
669+
- 🌎 **text**: The actual prompt text that uses template variables like `${arguments.topic}` or `${arguments.aspect}` as placeholders for MCP Client-supplied arguments. If your argument is named `language`, you'd add `${arguments.language}` where you expect it to show up in the prompt.
612670

613671
Example:
614672

@@ -655,4 +713,3 @@ The `_generated` fields:
655713
- **prompts_generated**: Server generates additional prompts beyond those listed (default: false)
656714

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

examples/hello-world-node/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "../../dist/mcpb-manifest.schema.json",
3-
"manifest_version": "0.1",
3+
"manifest_version": "0.3",
44
"name": "hello-world-node",
55
"display_name": "Hello World MCP Server (Reference Extension)",
66
"version": "0.1.0",

package.json

Lines changed: 26 additions & 5 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.1",
4+
"version": "2.0.2",
55
"type": "module",
66
"main": "dist/index.js",
77
"module": "dist/index.js",
@@ -26,14 +26,34 @@
2626
"types": "./dist/cli.d.ts",
2727
"import": "./dist/cli.js",
2828
"require": "./dist/cli.js"
29+
},
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"
2948
}
3049
},
3150
"bin": "dist/cli/cli.js",
3251
"files": [
33-
"dist"
52+
"dist",
53+
"schemas"
3454
],
3555
"scripts": {
36-
"build": "yarn run build:code",
56+
"build": "yarn run build:code && yarn run build:schema",
3757
"build:code": "tsc",
3858
"build:schema": "node ./scripts/build-mcpb-schema.js",
3959
"dev": "tsc --watch",
@@ -71,11 +91,12 @@
7191
"ignore": "^7.0.5",
7292
"node-forge": "^1.3.1",
7393
"pretty-bytes": "^5.6.0",
74-
"zod": "^3.25.67"
94+
"zod": "^3.25.67",
95+
"zod-to-json-schema": "^3.24.6"
7596
},
7697
"resolutions": {
7798
"@babel/helpers": "7.27.1",
7899
"@babel/parser": "7.27.3"
79100
},
80101
"packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
81-
}
102+
}

0 commit comments

Comments
 (0)