Add $schema to server.json specification to enable versioning, IDE autocomplete (#308)

## 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
This commit is contained in:
adam jones 2025-08-27 01:30:25 +01:00 • committed by GitHub
commit 5fb6ee2982
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,14 +12,14 @@ All of these scenarios (and more) would benefit from an agreed-upon, standardize
Please note: this is different from the file commonly referred to as `mcp.json`, which is _an MCP client's configuration file for **running** a specific set of MCP servers_. See [this issue](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/292).
References:
- [schema.json](./schema.json) - The official JSON schema specification for this representation
- [server.schema.json](./server.schema.json) - The official JSON schema specification for this representation
- [examples.md](./examples.md) - Example manifestations of the JSON schema
- [registry-schema.json](./registry-schema.json) - A more constrained version of `schema.json` that the official registry supports
- [registry-schema.json](./registry-schema.json) - A more constrained version of `server.schema.json` that the official registry supports
## Validation Tools
Two validation tools are provided in the repository's `tools/` directory:
- **validate-schemas** - Validates that `schema.json` and `registry-schema.json` are valid JSON Schema documents
- **validate-schemas** - Validates that `server.schema.json` and `registry-schema.json` are valid JSON Schema documents
- **validate-examples** - Validates that all JSON examples in `examples.md` conform to both schemas
### Usage