Replies: 6 comments 18 replies
-
@claude can you review the proposal above? Read in all the context about the repo including the docs and relevant issues. Be critical, fair, honest, succinct and clear. Provide examples if helpful for understanding. You can include any non crucial, but maybe relevant extra information in |
Beta Was this translation helpful? Give feedback.
-
Linking a comment from a discussion where I had mentioned the vendor extensions too -
My point is I think the extensions are useful not only on the high-level server object, but also per package/remote, wdyt? |
Beta Was this translation helpful? Give feedback.
-
I realised I put my comment in Discord, but missed to share it here - should we agree on having the extensions under a top-level property like |
Beta Was this translation helpful? Give feedback.
-
Taking a step back for a second - do we actually need #201 right now? I guess it might be valuable to be clear on extensions at the server.json level, but I'm not sure what the use cases look like. I'm finding it hard to reason about what the right solution there is without having some use cases in mind. #81, on the other hand, has some pretty clear examples:
I'm also not sure of the use case on this. I don't think we want publishers to be able to inject arbitrary data that the registry then turns around and hosts - we're already putting in a lot of effort on sanitization and minimizing the surface area for what can be stored. And I'm not sure what the use case is for a server maintainer wanting to push their own data in their DNS namespace here. Commenting further on just section "1. Make server.json Immutable (Issue #263)" and the Registry API side of "Add Vendor Extensions Support (Issues #201 & #81)" --
I think you're right on this. This response makes sense to me, exactly as written:
Indeed, it dodges wrestling with server.json-pollution, hence me thinking we can actually just skip on #201 for now.
Agree with the approach to the Registry API (as above). I don't think using Am I missing some use cases we'd fail to cover by skipping on those concerns right now? |
Beta Was this translation helpful? Give feedback.
-
EDIT: see the thread below for new thing we've aligned on [outdated] Original content
Just to help unblock us and ensure @rdimitrov can get on with implementing this, I think I'm going to declare that we can go ahead and implement this, as we seem largely aligned on these points:
Please shout if you think this is very wrong (i.e. you think implementing the above would be harmful/mostly unused - noting that we can fiddle with the smaller stuff e.g. if we should or shouldn't accept extensions into |
Beta Was this translation helpful? Give feedback.
-
Okay, I think after the discussion above we're more properly aligned! Gonna declare this as what we've aligned on and good to implement now: Currently the get server endpoint just returns a server.json. And the list servers endpoint returns a wrapper that has a list of server.jsons. Instead we should replace the server.jsons with some wrapper of server.json like More concrete example
Current GET /v0/servers/{id} example response: (effectively server.json) {
"description": "string",
"id": "string",
"name": "string",
"packages": [...]
// other properties from server.json here
} Future GET /v0/servers/{id} example response: (API wrapper) {
"server": {
"description": "string",
"id": "string",
"name": "string",
"packages": [...]
// other properties from server.json here
// 3rd party registries may NOT put extensions here
},
"x-io.modelcontextprotocol.registry": {
"is_latest": true,
"published_at": ...
}
// 3rd party registries may put extensions here, e.g. `"x-com.anthropic"`
} Current GET /v0/servers example response: {
"metadata": {
"count": 2,
"next_cursor": "string",
"total": 42
},
"servers": [
{
"description": "A server for interacting with GitHub",
"id": "github-mcp-server",
"name": "GitHub MCP Server",
"repository": {
"id": "modelcontextprotocol/servers",
"source": "github",
"url": "https://github.com/modelcontextprotocol/servers"
},
"status": "active",
"version_detail": {
"is_latest": true,
"release_date": "2024-01-15T10:30:00Z",
"version": "1.2.3"
}
},
{
"description": "Another server description",
"id": "another-server",
"name": "Another Server",
"repository": {
"id": "someorg/another-repo",
"source": "github",
"url": "https://github.com/someorg/another-repo"
},
"status": "active",
"version_detail": {
"is_latest": false,
"release_date": "2024-01-10T08:00:00Z",
"version": "0.9.5"
}
}
]
} Future GET /v0/servers example response: {
"metadata": {
"count": 2,
"next_cursor": "string",
"total": 42
},
"servers": [
{
"server": {
"description": "A server for interacting with GitHub",
"id": "github-mcp-server",
"name": "GitHub MCP Server",
"packages": [...]
// immutable server.json content - no extensions allowed here
},
"x-io.modelcontextprotocol.registry": {
"is_latest": true,
"published_at": "2024-01-15T10:30:00Z",
"repository": {
"id": "modelcontextprotocol/servers",
"source": "github",
"url": "https://github.com/modelcontextprotocol/servers"
},
"status": "active",
"version": "1.2.3",
"release_date": "2024-01-15T10:30:00Z"
}
// 3rd party registries may add their extensions here
},
{
"server": {
"description": "Another server description",
"id": "another-server",
"name": "Another Server",
"packages": [...]
},
"x-io.modelcontextprotocol.registry": {
"is_latest": false,
"published_at": "2024-01-10T08:00:00Z",
"repository": {
"id": "someorg/another-repo",
"source": "github",
"url": "https://github.com/someorg/another-repo"
},
"status": "active",
"version": "0.9.5",
"release_date": "2024-01-10T08:00:00Z"
}
}
]
} And then I think same for the publish endpoint, where rather than sending just a raw server.json, you send a similar wrapped object. But the only Publish endpoint concrete examples
Current POST /v0/servers/publish request body: (raw server.json) {
"description": "A server for interacting with GitHub",
"id": "github-mcp-server",
"name": "GitHub MCP Server",
"packages": [...],
"repository": {
"id": "modelcontextprotocol/servers",
"source": "github",
"url": "https://github.com/modelcontextprotocol/servers"
}
// other server.json properties
} Future POST /v0/servers/publish request body: (wrapped server.json with publisher metadata) {
"server": {
"description": "A server for interacting with GitHub",
"id": "github-mcp-server",
"name": "GitHub MCP Server",
"packages": [...],
// other server.json properties
// no extensions allowed here, and no _meta
},
"x-publisher": { // literally "x-publisher", and NOT "x-<domain>"
// Metadata for other registries, not for MCP clients. Limited to 4KB
"contact_email": "maintainer@example.com",
"build_metadata": {
"commit": "abc123",
"timestamp": "2024-01-15T10:30:00Z"
},
"x-com.anthropic/suggested": {
"marketplace_icon": "https://example.com/icon.png",
"category": ["software_development"],
"documentation_url": "https://docs.example.org",
"verified_publisher": true,
}
}
// Publishers cannot add other x- namespaces here
} Key differences:
Flag: the 4KB number is arbitrary and made up, haven't thought too hard beyond 'seems probably large enough for most cases', and 'small enough to not be very expensive to serve'. I think it should be part of the official registry API, not part of the generic registry API spec. Could go with a different number. My guess is changing this number is pretty easy. For now, we won't change the publisher CLI as we haven't quite figured out what this looks like. The two ideas floating around (I think all the names of these files are also very much subject to change):
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Discussion Topic
There's a few threads across issues like #81, #201 and #263 that I think might be possible to solve with the below proposal:
1. Make server.json Immutable (Issue #263)
2. Add Vendor Extensions Support (Issues #201 & #81)
Why reverse DNS instead of forward DNS? I don't think there's a very strong case either way, but leant towards this because it's the same format we use in names and everywhere else, so figured we should be consistent even if the consistency isn't crucial here. Reverse DNS also has a few nice properties, e.g. being able to prefix match and sort things and have similar annotations appear in the same place (e.g.
x-com.microsoft.azure
appears next tox-com.microsoft
, but this doesn't happen with forward DNS).3. Publisher Security Validation
"x-io.modelcontextprotocol.registry": {...}
(reserved for registry)"x-com.anthropic": {...}
(reduces confusion for consumers of official registry for when extensions are added, and keeps us open to allowing namespaced select providers to add trusted extension annotations to the top level official registry)Beta Was this translation helpful? Give feedback.
All reactions