modelcontextprotocol / modelcontextprotocol/registry

Create envelope structure for server.json with versioning and servers list

Open
#301 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
7.3k
Forks
994
Avg merge
4d 12h
Merged PRs (30d)
19

Description

Problem

The current server.json schema directly references ServerDetail without an envelope structure. This makes it difficult to:

  1. Include explicit versioning information in the data structure
  2. Properly structure server lists with metadata
  3. Evolve the format while maintaining backward compatibility

Current State

{
  "$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"
}

Proposed Solution

Create an envelope structure that wraps server data with versioning and proper list structure:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/server-envelope.json",
  "title": "MCP Server Registry Envelope",
  "type": "object",
  "required": ["version", "servers"],
  "properties": {
    "version": {
      "type": "string",
      "description": "Schema version using date-based versioning (YYYY-MM-DD)",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "example": "2025-07-09"
    },
    "servers": {
      "type": "array",
      "description": "List of MCP servers",
      "items": {
        "$ref": "https://modelcontextprotocol.io/schemas/draft/2025-07-09/server.json#/$defs/ServerDetail"
      }
    },
    "metadata": {
      "type": "object",
      "description": "Optional metadata about the server list",
      "properties": {
        "total_count": {
          "type": "integer",
          "description": "Total number of servers in the registry"
        },
        "last_updated": {
          "type": "string",
          "format": "date-time",
          "description": "When this server list was last updated"
        }
      }
    }
  }
}

Benefits

  1. Explicit Versioning: Version is part of the data structure, not just the schema ID
  2. Future-Proof: Can evolve the envelope without breaking existing server definitions
  3. Structured Lists: Proper container for multiple servers with metadata
  4. Backward Compatibility: Existing ServerDetail schemas remain unchanged
  5. API Consistency: Aligns with REST API patterns for collections

Example Usage

{
  "version": "2025-07-09",
  "servers": [
    {
      "name": "io.modelcontextprotocol/filesystem",
      "description": "Filesystem operations server",
      "version_detail": {
        "version": "1.0.2"
      },
      "packages": [...]
    }
  ],
  "metadata": {
    "total_count": 1,
    "last_updated": "2025-07-09T10:30:00Z"
  }
}

Files to Update

  • Create new docs/server-json/envelope-schema.json
  • Update documentation to reference the envelope structure
  • Consider migration path for existing implementations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the current server.json schema with the proposed envelope and create docs/server-json/envelope-schema.json as described. Update the documentation to reference the envelope, and document the migration path for existing ServerDetail implementations; done means the versioned servers list, optional metadata, and compatibility guidance are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
backend-api-design, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.