diff --git a/docs/server-json/README.md b/docs/server-json/README.md index 6b8f6f13..b8361330 100644 --- a/docs/server-json/README.md +++ b/docs/server-json/README.md @@ -13,4 +13,5 @@ Please note: this is different from the file commonly referred to as `mcp.json`, References: - [schema.json](./schema.json) - The official JSON schema specification for this representation -- [examples.md](./examples.md) - Example manifestations of the JSON schema \ No newline at end of file +- [examples.md](./examples.md) - Example manifestations of the JSON schema +- [registry-schema.json](./registry-schema.json) - A more constrained version of `schema.json` that the official registry supports diff --git a/docs/server-json/registry-schema.json b/docs/server-json/registry-schema.json new file mode 100644 index 00000000..5b578984 --- /dev/null +++ b/docs/server-json/registry-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/registry-server.json", + "title": "MCP Server Detail - Registry Schema", + "description": "Registry-specific constraints for MCP server representation. Extends the base schema with additional validation rules.", + "$ref": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/server.json", + "properties": { + "repository": { + "properties": { + "source": { + "enum": [ + "github" + ] + } + } + }, + "packages": { + "items": { + "properties": { + "registry_name": { + "enum": [ + "npm", + "pypi", + "docker", + "nuget" + ] + }, + "runtime_hint": { + "enum": [ + "npx", + "uvx", + "docker", + "dnx" + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/server-json/schema.json b/docs/server-json/schema.json index 207a8eb0..122a9aba 100644 --- a/docs/server-json/schema.json +++ b/docs/server-json/schema.json @@ -1,5 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/server.json", "title": "MCP Server Detail", "$ref": "#/$defs/ServerDetail", "$defs": { @@ -18,10 +19,7 @@ }, "source": { "type": "string", - "enum": [ - "github", - "gitlab" - ], + "description": "Repository hosting service", "example": "github" }, "id": { @@ -32,6 +30,7 @@ }, "VersionDetail": { "type": "object", + "description": "Version information for this server. Defined as an object to allow for downstream extensibility (e.g. release_date)", "required": [ "version" ], @@ -79,13 +78,6 @@ "properties": { "registry_name": { "type": "string", - "enum": [ - "npm", - "docker", - "pypi", - "homebrew", - "nuget" - ], "description": "Package registry type", "example": "npm" },