Fix _meta field format for MCP spec compliance (#367)

## Summary

Updates the `_meta` field structure to be compliant with the MCP
specification by using proper `prefix/name` format for vendor
extensions.

### Changes

- **Registry metadata**: `io.modelcontextprotocol.registry` →
`io.modelcontextprotocol.registry/official`
- **Publisher metadata**: `publisher` →
`io.modelcontextprotocol.registry/publisher-provided`
- **Database migration**: Updates indexes to use new field paths
- **Updated all code**: Service layer, validators, tests, and seed data

### Format Before
```json
{
  "_meta": {
    "publisher": { "license": "MIT" },
    "io.modelcontextprotocol.registry": { "id": "...", "is_latest": true }
  }
}
```

### Format After
```json
{
  "_meta": {
    "io.modelcontextprotocol.registry/publisher-provided": { "license": "MIT" },
    "io.modelcontextprotocol.registry/official": { "id": "...", "is_latest": true }
  }
}
```

This resolves the naming collision with the planned top-level
`publisher` field and ensures compliance with MCP specification
requirements.

Fixes #356
This commit is contained in:
adam jones 2025-09-08 11:40:04 -07:00 • committed by GitHub
commit ef4607720d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,7 +105,7 @@ paths:
identifier: "@modelcontextprotocol/server-filesystem"
version: "1.0.2"
_meta:
publisher:
io.modelcontextprotocol.registry/publisher-provided:
tool: "publisher-cli"
version: "1.2.3"
build_info:
@ -128,7 +128,7 @@ paths:
identifier: "@example/mcp-demo-server"
version: "1.0.0"
_meta:
publisher:
io.modelcontextprotocol.registry/publisher-provided:
contact_email: "maintainer@example.com"
build_metadata:
commit: "abc123"
@ -496,7 +496,7 @@ components:
type: object
description: Extension metadata using reverse DNS namespacing
properties:
publisher:
io.modelcontextprotocol.registry/publisher-provided:
type: object
description: Publisher-specific metadata and build information
additionalProperties: true
@ -507,7 +507,7 @@ components:
commit: "abc123def456"
timestamp: "2023-12-01T10:30:00Z"
pipeline_id: "build-789"
io.modelcontextprotocol.registry:
io.modelcontextprotocol.registry/official:
type: object
description: Registry-specific metadata managed by the MCP registry system
required: