Fix misleading server.json schema URL label (#803)

The schema in this repo may contain unreleased changes, so labeling it
with a dated version URL is misleading. Change to use a `draft` URL
instead, and add documentation for the schema contribution process.

- Update $id in server.schema.json to use draft URL
- Update example $schema URL in openapi.yaml
- Add Draft (Unreleased) section to CHANGELOG.md
- Add CONTRIBUTING.md with process for making/releasing schema changes

Written by Claude Code, reviewed and tweaked by me.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Tadas Antanavicius 2025-12-03 08:44:30 -08:00 • committed by GitHub
commit 51c70ba034
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,8 +88,12 @@ func main() {
}
}
// Build the JSON Schema document with dynamic version from OpenAPI spec
schemaID := fmt.Sprintf("https://static.modelcontextprotocol.io/schemas/%s/server.schema.json", version)
// Build the JSON Schema document with draft URL
// The in-repo schema uses "draft" since it may contain unreleased changes.
// When releasing, the schema is published to a versioned URL (e.g., 2025-10-17)
// on https://github.com/modelcontextprotocol/static
_ = version // version from OpenAPI spec available if needed
schemaID := "https://static.modelcontextprotocol.io/schemas/draft/server.schema.json"
jsonSchema := map[string]interface{}{
"$comment": "This file is auto-generated from docs/reference/api/openapi.yaml. Do not edit manually. Run 'make generate-schema' to update.",
"$schema": "http://json-schema.org/draft-07/schema#",