|
6 | 6 | "$defs": { |
7 | 7 | "Repository": { |
8 | 8 | "type": "object", |
| 9 | + "description": "Repository metadata for the MCP server source code. Enables users and security experts to inspect the code, improving transparency.", |
9 | 10 | "required": [ |
10 | 11 | "url", |
11 | 12 | "source" |
|
14 | 15 | "url": { |
15 | 16 | "type": "string", |
16 | 17 | "format": "uri", |
| 18 | + "description": "Repository URL for browsing source code. Should support both web browsing and git clone operations.", |
17 | 19 | "example": "https://github.com/modelcontextprotocol/servers" |
18 | 20 | }, |
19 | 21 | "source": { |
20 | 22 | "type": "string", |
21 | | - "description": "Repository hosting service", |
| 23 | + "description": "Repository hosting service identifier. Used by registries to determine validation and API access methods.", |
22 | 24 | "example": "github" |
23 | 25 | }, |
24 | 26 | "id": { |
25 | 27 | "type": "string", |
| 28 | + "description": "Repository identifier from the hosting service (e.g., GitHub repo ID). Owned and determined by the source forge. Should remain stable across repository renames and may be used to detect repository resurrection attacks - if a repository is deleted and recreated, the ID should change. For GitHub, use: gh api repos/<owner>/<repo> --jq '.id'", |
26 | 29 | "example": "b94b5f7e-c7c6-d760-2c78-a5e9b8a5b8c9" |
27 | | - } |
28 | | - } |
29 | | - }, |
30 | | - "VersionDetail": { |
31 | | - "type": "object", |
32 | | - "description": "Version information for this server. Defined as an object to allow for downstream extensibility (e.g. release_date)", |
33 | | - "required": [ |
34 | | - "version" |
35 | | - ], |
36 | | - "properties": { |
37 | | - "version": { |
| 30 | + }, |
| 31 | + "subfolder": { |
38 | 32 | "type": "string", |
39 | | - "maxLength": 255, |
40 | | - "example": "1.0.2", |
41 | | - "description": "Version string for this server. SHOULD follow semantic versioning (e.g., '1.0.2', '2.1.0-alpha'). Equivalent of Implementation.version in MCP specification. Non-semantic versions are allowed but may not sort predictably." |
| 33 | + "description": "Optional relative path from repository root to the server location within a monorepo or nested package structure. Must be a clean relative path.", |
| 34 | + "example": "src/everything" |
42 | 35 | } |
43 | 36 | } |
44 | 37 | }, |
|
47 | 40 | "required": [ |
48 | 41 | "name", |
49 | 42 | "description", |
50 | | - "version_detail" |
| 43 | + "version" |
51 | 44 | ], |
52 | 45 | "properties": { |
53 | 46 | "name": { |
54 | 47 | "type": "string", |
55 | | - "description": "Server name/identifier", |
56 | | - "example": "io.modelcontextprotocol/filesystem" |
| 48 | + "description": "Server name in reverse-DNS format. Must contain exactly one forward slash separating namespace from server name.", |
| 49 | + "example": "io.github.user/weather", |
| 50 | + "pattern": "^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$", |
| 51 | + "minLength": 3, |
| 52 | + "maxLength": 200 |
57 | 53 | }, |
58 | 54 | "description": { |
59 | 55 | "type": "string", |
60 | | - "description": "Human-readable description of the server's functionality", |
61 | | - "example": "Node.js server implementing Model Context Protocol (MCP) for filesystem operations." |
| 56 | + "description": "Clear human-readable explanation of server functionality. Should focus on capabilities, not implementation details.", |
| 57 | + "example": "MCP server providing weather data and forecasts via OpenWeatherMap API", |
| 58 | + "minLength": 1, |
| 59 | + "maxLength": 100 |
62 | 60 | }, |
63 | 61 | "status": { |
64 | 62 | "type": "string", |
65 | | - "enum": ["active", "deprecated"], |
| 63 | + "enum": ["active", "deprecated", "deleted"], |
66 | 64 | "default": "active", |
67 | | - "description": "Server lifecycle status. 'deprecated' indicates the server is no longer recommended for new usage." |
| 65 | + "description": "Server lifecycle status. 'deprecated' indicates the server is no longer recommended for new usage. 'deleted' indicates the server should never be installed and existing installations should be uninstalled - this is rare, and usually indicates malware or a legal takedown." |
68 | 66 | }, |
69 | 67 | "repository": { |
70 | | - "$ref": "#/$defs/Repository" |
| 68 | + "$ref": "#/$defs/Repository", |
| 69 | + "description": "Optional repository metadata for the MCP server source code. Recommended for transparency and security inspection." |
71 | 70 | }, |
72 | | - "version_detail": { |
73 | | - "$ref": "#/$defs/VersionDetail" |
| 71 | + "version": { |
| 72 | + "type": "string", |
| 73 | + "maxLength": 255, |
| 74 | + "example": "1.0.2", |
| 75 | + "description": "Version string for this server. SHOULD follow semantic versioning (e.g., '1.0.2', '2.1.0-alpha'). Equivalent of Implementation.version in MCP specification. Non-semantic versions are allowed but may not sort predictably." |
74 | 76 | } |
75 | 77 | } |
76 | 78 | }, |
77 | 79 | "Package": { |
78 | 80 | "type": "object", |
79 | | - "required": [ |
80 | | - "registry_name", |
81 | | - "name", |
82 | | - "version" |
83 | | - ], |
84 | 81 | "properties": { |
85 | | - "registry_name": { |
| 82 | + "registry_type": { |
86 | 83 | "type": "string", |
87 | | - "description": "Package registry type", |
88 | | - "example": "npm" |
| 84 | + "description": "Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'oci', 'nuget', 'mcpb')", |
| 85 | + "examples": ["npm", "pypi", "oci", "nuget", "mcpb"] |
89 | 86 | }, |
90 | | - "name": { |
| 87 | + "registry_base_url": { |
91 | 88 | "type": "string", |
92 | | - "description": "Package name in the registry", |
93 | | - "example": "io.modelcontextprotocol/filesystem" |
| 89 | + "format": "uri", |
| 90 | + "description": "Base URL of the package registry", |
| 91 | + "examples": ["https://registry.npmjs.org", "https://pypi.org", "https://docker.io", "https://api.nuget.org", "https://github.com", "https://gitlab.com"] |
| 92 | + }, |
| 93 | + "identifier": { |
| 94 | + "type": "string", |
| 95 | + "description": "Package identifier - either a package name (for registries) or URL (for direct downloads)", |
| 96 | + "examples": ["@modelcontextprotocol/server-brave-search", "https://github.com/example/releases/download/v1.0.0/package.mcpb"] |
94 | 97 | }, |
95 | 98 | "version": { |
96 | 99 | "type": "string", |
97 | 100 | "description": "Package version", |
98 | | - "example": "1.0.2" |
| 101 | + "example": "1.0.2", |
| 102 | + "minLength": 1 |
| 103 | + }, |
| 104 | + "file_sha256": { |
| 105 | + "type": "string", |
| 106 | + "pattern": "^[a-f0-9]{64}$", |
| 107 | + "description": "SHA-256 hash of the package file for integrity verification. Required for MCPB packages and optional for other package types. Authors are responsible for generating correct SHA-256 hashes when creating server.json. If present, MCP clients must validate the downloaded file matches the hash before running packages to ensure file integrity.", |
| 108 | + "example": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce" |
99 | 109 | }, |
100 | 110 | "runtime_hint": { |
101 | 111 | "type": "string", |
102 | 112 | "description": "A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtime_arguments` are present.", |
103 | 113 | "examples": [ |
104 | 114 | "npx", |
105 | 115 | "uvx", |
| 116 | + "docker", |
106 | 117 | "dnx" |
107 | 118 | ] |
108 | 119 | }, |
| 120 | + "transport": { |
| 121 | + "anyOf": [ |
| 122 | + { |
| 123 | + "$ref": "#/$defs/StdioTransport" |
| 124 | + }, |
| 125 | + { |
| 126 | + "$ref": "#/$defs/StreamableHttpTransport" |
| 127 | + }, |
| 128 | + { |
| 129 | + "$ref": "#/$defs/SseTransport" |
| 130 | + } |
| 131 | + ], |
| 132 | + "description": "Transport protocol configuration for the package" |
| 133 | + }, |
109 | 134 | "runtime_arguments": { |
110 | 135 | "type": "array", |
111 | 136 | "description": "A list of arguments to be passed to the package's runtime command (such as docker or npx). The `runtime_hint` field should be provided when `runtime_arguments` are present.", |
|
293 | 318 | ] |
294 | 319 | }, |
295 | 320 | "Argument": { |
| 321 | + "description": "Warning: Arguments construct command-line parameters that may contain user-provided input. This creates potential command injection risks if clients execute commands in a shell environment. For example, a malicious argument value like ';rm -rf ~/Development' could execute dangerous commands. Clients should prefer non-shell execution methods (e.g., posix_spawn) when possible to eliminate injection risks entirely. Where not possible, clients should obtain consent from users or agents to run the resolved command before execution.", |
296 | 322 | "anyOf": [ |
297 | 323 | { |
298 | 324 | "$ref": "#/$defs/PositionalArgument" |
|
302 | 328 | } |
303 | 329 | ] |
304 | 330 | }, |
305 | | - "Remote": { |
| 331 | + "StdioTransport": { |
| 332 | + "type": "object", |
| 333 | + "required": [ |
| 334 | + "type" |
| 335 | + ], |
| 336 | + "properties": { |
| 337 | + "type": { |
| 338 | + "type": "string", |
| 339 | + "enum": [ |
| 340 | + "stdio" |
| 341 | + ], |
| 342 | + "description": "Transport type", |
| 343 | + "example": "stdio" |
| 344 | + } |
| 345 | + } |
| 346 | + }, |
| 347 | + "StreamableHttpTransport": { |
| 348 | + "type": "object", |
| 349 | + "required": [ |
| 350 | + "type", |
| 351 | + "url" |
| 352 | + ], |
| 353 | + "properties": { |
| 354 | + "type": { |
| 355 | + "type": "string", |
| 356 | + "enum": [ |
| 357 | + "streamable-http" |
| 358 | + ], |
| 359 | + "description": "Transport type", |
| 360 | + "example": "streamable-http" |
| 361 | + }, |
| 362 | + "url": { |
| 363 | + "type": "string", |
| 364 | + "description": "URL template for the streamable-http transport. Variables in {curly_braces} reference argument value_hints, argument names, or environment variable names. After variable substitution, this should produce a valid URI.", |
| 365 | + "example": "https://api.example.com/mcp" |
| 366 | + }, |
| 367 | + "headers": { |
| 368 | + "type": "array", |
| 369 | + "description": "HTTP headers to include", |
| 370 | + "items": { |
| 371 | + "$ref": "#/$defs/KeyValueInput" |
| 372 | + } |
| 373 | + } |
| 374 | + } |
| 375 | + }, |
| 376 | + "SseTransport": { |
306 | 377 | "type": "object", |
307 | 378 | "required": [ |
308 | | - "transport_type", |
| 379 | + "type", |
309 | 380 | "url" |
310 | 381 | ], |
311 | 382 | "properties": { |
312 | | - "transport_type": { |
| 383 | + "type": { |
313 | 384 | "type": "string", |
314 | 385 | "enum": [ |
315 | | - "streamable", |
316 | 386 | "sse" |
317 | 387 | ], |
318 | | - "description": "Transport protocol type", |
| 388 | + "description": "Transport type", |
319 | 389 | "example": "sse" |
320 | 390 | }, |
321 | 391 | "url": { |
322 | 392 | "type": "string", |
323 | 393 | "format": "uri", |
324 | | - "description": "Remote server URL", |
| 394 | + "description": "Server-Sent Events endpoint URL", |
325 | 395 | "example": "https://mcp-fs.example.com/sse" |
326 | 396 | }, |
327 | 397 | "headers": { |
|
357 | 427 | "remotes": { |
358 | 428 | "type": "array", |
359 | 429 | "items": { |
360 | | - "$ref": "#/$defs/Remote" |
| 430 | + "anyOf": [ |
| 431 | + { |
| 432 | + "$ref": "#/$defs/StreamableHttpTransport" |
| 433 | + }, |
| 434 | + { |
| 435 | + "$ref": "#/$defs/SseTransport" |
| 436 | + } |
| 437 | + ] |
| 438 | + } |
| 439 | + }, |
| 440 | + "_meta": { |
| 441 | + "type": "object", |
| 442 | + "description": "Extension metadata using reverse DNS namespacing for vendor-specific data", |
| 443 | + "additionalProperties": true, |
| 444 | + "properties": { |
| 445 | + "io.modelcontextprotocol.registry/publisher-provided": { |
| 446 | + "type": "object", |
| 447 | + "description": "Publisher-provided metadata for downstream registries", |
| 448 | + "additionalProperties": true |
| 449 | + }, |
| 450 | + "io.modelcontextprotocol.registry/official": { |
| 451 | + "type": "object", |
| 452 | + "description": "Official MCP registry metadata (read-only, added by registry)", |
| 453 | + "additionalProperties": true |
| 454 | + } |
361 | 455 | } |
362 | 456 | } |
363 | 457 | } |
|
0 commit comments