Changes on the server.json format and the API#562
Changes on the server.json format and the API#562rdimitrov merged 45 commits intomodelcontextprotocol:mainfrom
Conversation
1afb104 to
2b0cbd9
Compare
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
…et endpoints Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
|
|
||
| // Get server details endpoint | ||
| // Get server details endpoint (latest version) | ||
| huma.Register(api, huma.Operation{ |
There was a problem hiding this comment.
(optional) I would be tempted to delete this endpoint completely, and just have people use /v0/servers/{name}/versions/latest
domdomegg
left a comment
There was a problem hiding this comment.
I am generally happy with this! Only blocking change is the bug with pagination: https://github.com/modelcontextprotocol/registry/pull/562/files#r2388526356
The UUIDs -> name + version string change I think makes things a lot easier, although might want to give @tadasant some time to review (at least just on this point) as I think he was a proponent of the IDs in the past?
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
I was at first but have since been convinced otherwise: #333 (comment) |
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
| if _, err := uuid.Parse(cursor); err != nil { | ||
| return nil, "", fmt.Errorf("invalid cursor format: %w", err) | ||
| // Parse cursor format: "serverName:version" | ||
| parts := strings.SplitN(cursor, ":", 2) |
There was a problem hiding this comment.
for me to check: is this always safe? i.e. can we have : in server names/versions?
There was a problem hiding this comment.
I believe we don't allow this on server names and, assuming we follow proper semver, it is not allowed there too, but you have a good point since it was discussed to not enforce semver so potentially this can become an issue. Do you have any suggestions to replace it with another delimiter? Although as long as we allow the version to be everything this wouldn't work either I guess
There was a problem hiding this comment.
Yep I came back to this later, it's not possible to put a : in the server name by the server.json spec so this is fine to use as delimiter 👍
I think in the ideal implementation we:
- split at
:- first part is name
- rest joined with
:is version string (and for most cases, this should just be one. but if there's more it's them joined by:
This should handle all cases reliably right now
In the future if we do want to change this, because we're treating it as opaque string we could properly escape it e.g. make this actually a json stringified thing like {"n":"io.github.domdomegg/airtable-mcp-server","v":"1.2.3"} (but don't need to do this rn)
There was a problem hiding this comment.
Happy to prioritise a follow up if you think we should get this before the freeze?
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
|
@rdimitrov I am happy to merge, if you are? |
Yep, let's go 🙏 |
## Summary - Remove the `status` field from all server.json examples in documentation - Remove the deprecated server example that was primarily about demonstrating the status field - Update example count validation from 13 to 12 ## Context The `status` field was removed from the server.json schema in commit b21c6f5 (#562). This PR cleans up the documentation to reflect that change. ## Why didn't tests catch this? The schema validation didn't catch the invalid `status` field because the JSON schema doesn't have `additionalProperties: false` set. This means the schema allows arbitrary additional properties by default. ## Test plan - [x] All validation checks pass (`make check`) - [x] Example count updated to match the new total (12 examples) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
…ocol#575) ## Summary - Remove the `status` field from all server.json examples in documentation - Remove the deprecated server example that was primarily about demonstrating the status field - Update example count validation from 13 to 12 ## Context The `status` field was removed from the server.json schema in commit b21c6f5 (modelcontextprotocol#562). This PR cleans up the documentation to reflect that change. ## Why didn't tests catch this? The schema validation didn't catch the invalid `status` field because the JSON schema doesn't have `additionalProperties: false` set. This means the schema allows arbitrary additional properties by default. ## Test plan - [x] All validation checks pass (`make check`) - [x] Example count updated to match the new total (12 examples) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
Motivation and Context
The following PR will address some of the changes we've discussed on Discord along with superseding the PR around ensuring the immutability of server.json (#527). My main reason behind combining these changes is I find it much easier to implement them together instead of separately.
The goal is to ensure better stability of both the format but also the registry API that will get us closer to GA.
The changes that will be introduced are:
statusout fromserver.jsonand have it under the official registry extensions. Also moving the registry extensions out ofserver.jsonand wrap them together with the server as part of the returned response.What's left:
How Has This Been Tested?
Breaking Changes
Migration Summary: UUID -> Server Name/Version
API Endpoints (Before/After)
Before (UUID-based):
/v0/servers/{server_id}/v0/servers/{server_id}/v0/servers/{server_id}/versionsAfter (Name/Version-based):
/v0/servers/{server_name}# Latest version/v0/servers/{server_name}/versions/{version}# Specific version/v0/servers/{server_name}/versions# All versions/v0/servers/{server_name}/versions/{version}# Edit specific versionExamples:
GET
/v0/servers/com.example%2Fmy-server (URL-encoded)PUT
/v0/servers/com.example%2Fmy-server/versions/1.2.0?status=deprecatedServer.json Format
Before:
{ "name": "com.example/my-server", "version": "1.0.0", "description": "My MCP server", "status": "active", "meta": { "io.modelcontextprotocol.registry/publisher-provided": { "tags": ["database", "postgresql"], "category": "data-access", "maturity": "beta" }, "io.modelcontextprotocol.registry/official": { "publishedAt": "2025-01-01T00:00:00Z", "isLatest": true } } }After (MCP Spec Only):
{ "name": "com.example/my-server", "version": "1.0.0", "description": "My MCP server", "repository": { "url": "https://github.com/user/repo" }, "packages": [...], "_meta": { "io.modelcontextprotocol.registry/publisher-provided": { "tags": ["database", "postgresql"], "category": "data-access", "maturity": "beta" } } }Key Changes:
❌ Removed status and meta.official (now registry-only metadata)
✅ Pure MCP specification format for server.json
API Response Format
Before (Mixed):
{ "id": "uuid-123", "name": "com.example/my-server", "version": "1.0.0", "status": "active", "_meta": { "io.modelcontextprotocol.registry/official": { "publishedAt": "2025-01-01T00:00:00Z", "isLatest": true }, "io.modelcontextprotocol.registry/publisher-provided": { "tags": ["database", "postgresql"], "category": "data-access", "maturity": "beta" } }After (Separated):
{ "server": { "name": "com.example/my-server", "version": "1.0.0", "description": "My MCP server", "repository": {...}, "packages": [...], "_meta": { "io.modelcontextprotocol.registry/publisher-provided": { "tags": ["database", "postgresql"], "category": "data-access", "maturity": "beta" } }, "_meta": { "io.modelcontextprotocol.registry/official": { "status": "active", "publishedAt": "2025-01-01T00:00:00Z", "updatedAt": "2025-01-01T00:00:00Z", "isLatest": true } } }Key Changes:
Types of changes
Checklist
Additional context