Migrate MCP registry from v0 to v0.1 API specification #11960
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The MCP registry client was using the deprecated v0 API endpoint. The v0.1 specification introduces a significantly different response structure and field naming conventions per the official OpenAPI schema.
Changes
API Endpoint
https://api.mcp.github.com/v0→https://api.mcp.github.com/v0.1Response Structure
Before (v0):
{ "servers": [{ "name": "example/server", "status": "active", "packages": [{ "registry_type": "npm", "transport": {"type": "stdio"} }] }] }After (v0.1):
{ "servers": [{ "server": { "name": "example/server", "packages": [{ "registryType": "npm", "transport": {"type": "stdio"} }] }, "_meta": { "io.modelcontextprotocol.registry/official": { "status": "active" } } }] }Type System Updates (
mcp_registry_types.go)ServerResponsewrapper withserverand_metafieldsregistry_type→registryType,runtime_hint→runtimeHint, etc.Transportfrom string to objectRepositoryandTransportArgumenttype with additional fields from specParsing Logic (
mcp_registry.go)SearchServersandGetServerto unwrap nested response structurestatusto_meta["io.modelcontextprotocol.registry/official"]["status"]Tests
mcp_registry_live_test.go) that validate against the production registry:TestMCPRegistryClient_LiveSearchServers: Tests fetching and filtering servers from live APITestMCPRegistryClient_LiveGetServer: Tests retrieving specific servers with complete metadataTestMCPRegistryClient_LiveResponseStructure: Validates v0.1 field parsing with real dataOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.