Skip to content

Conversation

@domdomegg
Copy link
Member

@domdomegg domdomegg commented Aug 26, 2025

Summary

  • Add optional $schema property to ServerDetail specification
  • Update JSON Schema, OpenAPI spec, Go models, examples, and publisher template
  • Enable schema versioning and IDE validation support

Changes

  • Added $schema as optional string property with URI format in specs
  • Updated Go ServerDetail struct with new Schema field
  • Added $schema to examples and publisher template
  • Copy schema file to ../static for GitHub Pages hosting

Fixes #139

Add optional $schema property to ServerDetail to enable schema versioning and IDE support. Updates JSON Schema, OpenAPI spec, Go models, examples, and publisher template.

The $schema property points to https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json and provides:
- Schema version identification for future breaking changes
- Self-describing server.json files
- IDE validation and autocomplete support
- Better tooling integration

Addresses #139
@domdomegg domdomegg changed the title Add property to server.json specification Add $schema to server.json specification to enable versioning, IDE autocomplete Aug 26, 2025
domdomegg added a commit to modelcontextprotocol/static that referenced this pull request Aug 26, 2025
Add JSON schema file for MCP server.json format to enable schema versioning and IDE support. This schema will be served at https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json to support the $schema property added in modelcontextprotocol/registry#308.

The hosted schema enables:
- Self-describing server.json files
- IDE validation and autocomplete
- Version tracking for schema evolution
- Better tooling integration

Supports modelcontextprotocol/registry#308
Copy link
Member

@johnw188 johnw188 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, otherwise looks good.

# Repository References in server.json

The [`server.json` schema](schema.json) MAY contain a `repository` property at the root of the JSON object. The `repository` object provides metadata about the MCP server's source code. This enables users and security experts to inspect the code of the MCP service, thereby improving the transparency of what the MCP server is doing at runtime.
The [`server.json` schema](server.schema.json) MAY contain a `repository` property at the root of the JSON object. The `repository` object provides metadata about the MCP server's source code. This enables users and security experts to inspect the code of the MCP service, thereby improving the transparency of what the MCP server is doing at runtime.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be The [server.schema.json schema]?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good q - we expect people to create server.json files, but then we want a schema to describe these server.json files. Which is 'the server.json schema', or 'server.schema.json'. So this is correct :)

@domdomegg domdomegg merged commit 5fb6ee2 into main Aug 27, 2025
9 checks passed
@domdomegg domdomegg deleted the adamj/add-schema-property branch August 27, 2025 00:30
domdomegg added a commit to modelcontextprotocol/static that referenced this pull request Aug 27, 2025
Add JSON schema file for MCP server.json format to enable schema versioning and IDE support. This schema will be served at https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json to support the $schema property added in modelcontextprotocol/registry#308.

The hosted schema enables:
- Self-describing server.json files
- IDE validation and autocomplete
- Version tracking for schema evolution
- Better tooling integration

Supports modelcontextprotocol/registry#308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan for schema version changes in the ServerDetail model

3 participants