|
1 | 1 | { |
2 | | - "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
3 | 3 | "$id": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json", |
4 | 4 | "title": "MCP Server Detail", |
5 | | - "$ref": "#/$defs/ServerDetail", |
6 | | - "$defs": { |
| 5 | + "$ref": "#/definitions/ServerDetail", |
| 6 | + "definitions": { |
7 | 7 | "Repository": { |
8 | 8 | "type": "object", |
9 | 9 | "description": "Repository metadata for the MCP server source code. Enables users and security experts to inspect the code, improving transparency.", |
|
65 | 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." |
66 | 66 | }, |
67 | 67 | "repository": { |
68 | | - "$ref": "#/$defs/Repository", |
| 68 | + "$ref": "#/definitions/Repository", |
69 | 69 | "description": "Optional repository metadata for the MCP server source code. Recommended for transparency and security inspection." |
70 | 70 | }, |
71 | 71 | "version": { |
72 | 72 | "type": "string", |
73 | 73 | "maxLength": 255, |
74 | 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." |
| 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. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3', '>=1.2.3', '1.x', '1.*')." |
| 76 | + }, |
| 77 | + "website_url": { |
| 78 | + "type": "string", |
| 79 | + "format": "uri", |
| 80 | + "description": "Optional URL to the server's homepage, documentation, or project website. This provides a central link for users to learn more about the server. Particularly useful when the server has custom installation instructions or setup requirements.", |
| 81 | + "example": "https://modelcontextprotocol.io/examples" |
76 | 82 | } |
77 | 83 | } |
78 | 84 | }, |
79 | 85 | "Package": { |
80 | 86 | "type": "object", |
| 87 | + "additionalProperties": false, |
| 88 | + "required": [ |
| 89 | + "registry_type", |
| 90 | + "identifier", |
| 91 | + "version", |
| 92 | + "transport" |
| 93 | + ], |
81 | 94 | "properties": { |
82 | 95 | "registry_type": { |
83 | 96 | "type": "string", |
|
97 | 110 | }, |
98 | 111 | "version": { |
99 | 112 | "type": "string", |
100 | | - "description": "Package version", |
| 113 | + "description": "Package version. Must be a specific version. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3', '>=1.2.3', '1.x', '1.*').", |
| 114 | + "not": { |
| 115 | + "const": "latest" |
| 116 | + }, |
101 | 117 | "example": "1.0.2", |
102 | 118 | "minLength": 1 |
103 | 119 | }, |
|
120 | 136 | "transport": { |
121 | 137 | "anyOf": [ |
122 | 138 | { |
123 | | - "$ref": "#/$defs/StdioTransport" |
| 139 | + "$ref": "#/definitions/StdioTransport" |
124 | 140 | }, |
125 | 141 | { |
126 | | - "$ref": "#/$defs/StreamableHttpTransport" |
| 142 | + "$ref": "#/definitions/StreamableHttpTransport" |
127 | 143 | }, |
128 | 144 | { |
129 | | - "$ref": "#/$defs/SseTransport" |
| 145 | + "$ref": "#/definitions/SseTransport" |
130 | 146 | } |
131 | 147 | ], |
132 | 148 | "description": "Transport protocol configuration for the package" |
|
135 | 151 | "type": "array", |
136 | 152 | "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.", |
137 | 153 | "items": { |
138 | | - "$ref": "#/$defs/Argument" |
| 154 | + "$ref": "#/definitions/Argument" |
139 | 155 | } |
140 | 156 | }, |
141 | 157 | "package_arguments": { |
142 | 158 | "type": "array", |
143 | 159 | "description": "A list of arguments to be passed to the package's binary.", |
144 | 160 | "items": { |
145 | | - "$ref": "#/$defs/Argument" |
| 161 | + "$ref": "#/definitions/Argument" |
146 | 162 | } |
147 | 163 | }, |
148 | 164 | "environment_variables": { |
149 | 165 | "type": "array", |
150 | 166 | "description": "A mapping of environment variables to be set when running the package.", |
151 | 167 | "items": { |
152 | | - "$ref": "#/$defs/KeyValueInput" |
| 168 | + "$ref": "#/definitions/KeyValueInput" |
153 | 169 | } |
154 | 170 | } |
155 | 171 | } |
|
202 | 218 | "InputWithVariables": { |
203 | 219 | "allOf": [ |
204 | 220 | { |
205 | | - "$ref": "#/$defs/Input" |
| 221 | + "$ref": "#/definitions/Input" |
206 | 222 | }, |
207 | 223 | { |
208 | 224 | "type": "object", |
|
211 | 227 | "type": "object", |
212 | 228 | "description": "A map of variable names to their values. Keys in the input `value` that are wrapped in `{curly_braces}` will be replaced with the corresponding variable values.", |
213 | 229 | "additionalProperties": { |
214 | | - "$ref": "#/$defs/Input" |
| 230 | + "$ref": "#/definitions/Input" |
215 | 231 | } |
216 | 232 | } |
217 | 233 | } |
|
222 | 238 | "description": "A positional input is a value inserted verbatim into the command line.", |
223 | 239 | "allOf": [ |
224 | 240 | { |
225 | | - "$ref": "#/$defs/InputWithVariables" |
| 241 | + "$ref": "#/definitions/InputWithVariables" |
226 | 242 | }, |
227 | 243 | { |
228 | 244 | "type": "object", |
|
267 | 283 | "description": "A command-line `--flag={value}`.", |
268 | 284 | "allOf": [ |
269 | 285 | { |
270 | | - "$ref": "#/$defs/InputWithVariables" |
| 286 | + "$ref": "#/definitions/InputWithVariables" |
271 | 287 | }, |
272 | 288 | { |
273 | 289 | "type": "object", |
|
300 | 316 | "KeyValueInput": { |
301 | 317 | "allOf": [ |
302 | 318 | { |
303 | | - "$ref": "#/$defs/InputWithVariables" |
| 319 | + "$ref": "#/definitions/InputWithVariables" |
304 | 320 | }, |
305 | 321 | { |
306 | 322 | "type": "object", |
|
321 | 337 | "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.", |
322 | 338 | "anyOf": [ |
323 | 339 | { |
324 | | - "$ref": "#/$defs/PositionalArgument" |
| 340 | + "$ref": "#/definitions/PositionalArgument" |
325 | 341 | }, |
326 | 342 | { |
327 | | - "$ref": "#/$defs/NamedArgument" |
| 343 | + "$ref": "#/definitions/NamedArgument" |
328 | 344 | } |
329 | 345 | ] |
330 | 346 | }, |
|
368 | 384 | "type": "array", |
369 | 385 | "description": "HTTP headers to include", |
370 | 386 | "items": { |
371 | | - "$ref": "#/$defs/KeyValueInput" |
| 387 | + "$ref": "#/definitions/KeyValueInput" |
372 | 388 | } |
373 | 389 | } |
374 | 390 | } |
|
398 | 414 | "type": "array", |
399 | 415 | "description": "HTTP headers to include", |
400 | 416 | "items": { |
401 | | - "$ref": "#/$defs/KeyValueInput" |
| 417 | + "$ref": "#/definitions/KeyValueInput" |
402 | 418 | } |
403 | 419 | } |
404 | 420 | } |
|
407 | 423 | "description": "Schema for a static representation of an MCP server. Used in various contexts related to discovery, installation, and configuration.", |
408 | 424 | "allOf": [ |
409 | 425 | { |
410 | | - "$ref": "#/$defs/Server" |
| 426 | + "$ref": "#/definitions/Server" |
411 | 427 | }, |
412 | 428 | { |
413 | 429 | "type": "object", |
|
421 | 437 | "packages": { |
422 | 438 | "type": "array", |
423 | 439 | "items": { |
424 | | - "$ref": "#/$defs/Package" |
| 440 | + "$ref": "#/definitions/Package" |
425 | 441 | } |
426 | 442 | }, |
427 | 443 | "remotes": { |
428 | 444 | "type": "array", |
429 | 445 | "items": { |
430 | 446 | "anyOf": [ |
431 | 447 | { |
432 | | - "$ref": "#/$defs/StreamableHttpTransport" |
| 448 | + "$ref": "#/definitions/StreamableHttpTransport" |
433 | 449 | }, |
434 | 450 | { |
435 | | - "$ref": "#/$defs/SseTransport" |
| 451 | + "$ref": "#/definitions/SseTransport" |
436 | 452 | } |
437 | 453 | ] |
438 | 454 | } |
|
0 commit comments