Skip to content

Commit b5f38fc

Browse files
update schema url point to the actual location (#884)
<!-- Provide a brief summary of your changes --> ## Motivation and Context This PR ensures that the draft URL points to the actual draft schema improvement suggested in #814 ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> ## Breaking Changes <!-- Will users need to update their code or configurations? --> ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions -->
1 parent a5f2dc1 commit b5f38fc

12 files changed

Lines changed: 18 additions & 18 deletions

File tree

complete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ The MCP Registry project is a **metaregistry**, meaning that it hosts metadata f
538538

539539
For local MCP servers, the MCP Registry has pointers in the `packages` node of the [`server.json`](../../reference/server-json/generic-server-json.md) schema that refer to packages in supported package managers.
540540

541-
The list of supported package managers for hosting MCP servers is defined by the `properties.packages[N].properties.registry_type` string enum in the [`server.json` schema](../../reference/server-json/server.schema.json). For example, this could be "npm" (for npmjs.com packages) or "pypi" (for PyPI packages).
541+
The list of supported package managers for hosting MCP servers is defined by the `properties.packages[N].properties.registry_type` string enum in the [`server.json` schema](../../reference/server-json/draft/server.schema.json). For example, this could be "npm" (for npmjs.com packages) or "pypi" (for PyPI packages).
542542

543543
For remote MCP servers, the package registry is not relevant. The MCP client consumes the server via a URL instead of by downloading and running a package. In other words, this document only applies to local MCP servers.
544544

@@ -567,7 +567,7 @@ These steps may evolve as additional validations or details are discovered and m
567567
1. [Create a feature request issue](https://github.com/modelcontextprotocol/registry/issues/new?template=feature_request.md) on the MCP Registry repository to begin the discussion about adding the package registry.
568568
- Example for NuGet: https://github.com/modelcontextprotocol/registry/issues/126
569569
1. Open a PR with the following changes:
570-
- Update the [`server.json` schema](../../reference/server-json/server.schema.json)
570+
- Update the [`server.json` schema](../../reference/server-json/draft/server.schema.json)
571571
- Add your package registry name to the `registry_type` example array.
572572
- Add your package registry base url to the `registry_base_url` example array.
573573
- Add the single-shot CLI command name to the `runtime_hint` example value array.

docs/contributing/add-package-registry.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The MCP Registry project is a **metaregistry**, meaning that it hosts metadata f
44

55
For local MCP servers, the MCP Registry has pointers in the `packages` node of the [`server.json`](../../reference/server-json/generic-server-json.md) schema that refer to packages in supported package managers.
66

7-
The list of supported package managers for hosting MCP servers is defined by the `properties.packages[N].properties.registryType` string enum in the [`server.json` schema](../../reference/server-json/server.schema.json). For example, this could be "npm" (for npmjs.com packages) or "pypi" (for PyPI packages).
7+
The list of supported package managers for hosting MCP servers is defined by the `properties.packages[N].properties.registryType` string enum in the [`server.json` schema](../../reference/server-json/draft/server.schema.json). For example, this could be "npm" (for npmjs.com packages) or "pypi" (for PyPI packages).
88

99
For remote MCP servers, the package registry is not relevant. The MCP client consumes the server via a URL instead of by downloading and running a package. In other words, this document only applies to local MCP servers.
1010

@@ -33,7 +33,7 @@ These steps may evolve as additional validations or details are discovered and m
3333
1. [Create a feature request issue](https://github.com/modelcontextprotocol/registry/issues/new?template=feature_request.md) on the MCP Registry repository to begin the discussion about adding the package registry.
3434
- Example for NuGet: https://github.com/modelcontextprotocol/registry/issues/126
3535
1. Open a PR with the following changes:
36-
- Update the [`server.json` schema](../../reference/server-json/server.schema.json)
36+
- Update the [`server.json` schema](../../reference/server-json/draft/server.schema.json)
3737
- Add your package registry name to the `registryType` example array.
3838
- Add your package registry base url to the `registryBaseUrl` example array.
3939
- Add the single-shot CLI command name to the `runtimeHint` example value array.

docs/design/proposed-enhanced-validation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ The validation system supports testing against draft schemas or custom schema ve
421421

422422
#### Setup Steps
423423

424-
1. **Copy the schema file**: Copy your schema file (e.g., `docs/reference/server-json/server.schema.json`) to `internal/validators/schemas/{version}.json`
424+
1. **Copy the schema file**: Copy your schema file (e.g., `docs/reference/server-json/draft/server.schema.json`) to `internal/validators/schemas/{version}.json`
425425
- Example: Copy to `internal/validators/schemas/draft.json` for draft schema testing
426426
- Ensure the schema file's `$id` field matches: `https://static.modelcontextprotocol.io/schemas/{version}/server.schema.json`
427-
- For draft schema, the `$id` should be: `https://static.modelcontextprotocol.io/schemas/draft/server.schema.json`
427+
- For draft schema, the `$id` should be: `https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/reference/server-json/draft/server.schema.json`
428428

429429
2. **Rebuild**: Recompile the Go binary to embed the new schema file (schemas are embedded at compile time)
430430

@@ -473,10 +473,10 @@ To test with a draft schema as if it were the current schema (no warnings/errors
473473

474474
```bash
475475
# 1. Copy draft schema
476-
cp docs/reference/server-json/server.schema.json internal/validators/schemas/draft.json
476+
cp docs/reference/server-json/draft/server.schema.json internal/validators/schemas/draft.json
477477

478478
# 2. Verify the $id field in draft.json is correct
479-
# Should be: "https://static.modelcontextprotocol.io/schemas/draft/server.schema.json"
479+
# Should be: "https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/reference/server-json/draft/server.schema.json"
480480

481481
# 3. Rebuild
482482
go build ./...

docs/modelcontextprotocol-io/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The MCP Registry provides:
1616
- A REST API for MCP clients and aggregators to discover available servers
1717
- Standardized installation and configuration information
1818

19-
Server metadata is stored in a standardized [`server.json` format](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/server.schema.json), which contains:
19+
Server metadata is stored in a standardized [`server.json` format](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/draft/server.schema.json), which contains:
2020

2121
- The server's unique name (e.g., `io.github.user/server-name`)
2222
- Where to locate the server (e.g., npm package name, remote server URL)

docs/reference/server-json/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Changes to the server.json schema and format.
44

55
## Draft (Unreleased)
66

7-
This section tracks changes that are in development and not yet released. The draft schema is available at [`server.schema.json`](./server.schema.json) in this repository.
7+
This section tracks changes that are in development and not yet released. The draft schema is available at [`server.schema.json`](./draft/server.schema.json) in this repository.
88

99
### Changed
1010

docs/reference/server-json/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ When the draft changes are ready for release:
2626

2727
## Schema Versioning
2828

29-
- **Draft schema**: `https://static.modelcontextprotocol.io/schemas/draft/server.schema.json` - For in-progress changes, may change without notice.
29+
- **Draft schema**: `https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/reference/server-json/draft/server.schema.json` - For in-progress changes, may change without notice.
3030
- **Released schemas**: `https://static.modelcontextprotocol.io/schemas/YYYY-MM-DD/server.schema.json` - Stable, versioned by release date.

docs/reference/server-json/server.schema.json renamed to docs/reference/server-json/draft/server.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$comment": "This file is auto-generated from docs/reference/api/openapi.yaml. Do not edit manually. Run 'make generate-schema' to update.",
3-
"$id": "https://static.modelcontextprotocol.io/schemas/draft/server.schema.json",
3+
"$id": "https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/reference/server-json/draft/server.schema.json",
44
"$ref": "#/definitions/ServerDetail",
55
"$schema": "http://json-schema.org/draft-07/schema#",
66
"definitions": {

docs/reference/server-json/generic-server-json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Also see:
88

99
## Browse the Complete Schema
1010

11-
**📋 View the full specification interactively**: Open [server.schema.json](./server.schema.json) in a schema viewer like [json-schema.app](https://json-schema.app/view/%23?url=https%3A%2F%2Fstatic.modelcontextprotocol.io%2Fschemas%2F2025-09-29%2Fserver.schema.json).
11+
**📋 View the full specification interactively**: Open [server.schema.json](./draft/server.schema.json) in a schema viewer like [json-schema.app](https://json-schema.app/view/%23?url=https%3A%2F%2Fstatic.modelcontextprotocol.io%2Fschemas%2F2025-09-29%2Fserver.schema.json).
1212

1313
The schema contains all field definitions, validation rules, examples, and detailed descriptions.
1414

internal/validators/schema_regex_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/stretchr/testify/require"
1111
)
1212

13-
const serverSchemaPath = "../../docs/reference/server-json/server.schema.json"
13+
const serverSchemaPath = "../../docs/reference/server-json/draft/server.schema.json"
1414

1515
// schemaHelper provides utilities for extracting values from the JSON schema
1616
type schemaHelper struct {

tools/extract-server-schema/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
const (
1515
openAPIPath = "docs/reference/api/openapi.yaml"
16-
schemaOutputDir = "docs/reference/server-json"
16+
schemaOutputDir = "docs/reference/server-json/draft"
1717
)
1818

1919
func main() {
@@ -93,7 +93,7 @@ func main() {
9393
// When releasing, the schema is published to a versioned URL (e.g., 2025-10-17)
9494
// on https://github.com/modelcontextprotocol/static
9595
_ = version // version from OpenAPI spec available if needed
96-
schemaID := "https://static.modelcontextprotocol.io/schemas/draft/server.schema.json"
96+
schemaID := "https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/reference/server-json/draft/server.schema.json"
9797
jsonSchema := map[string]interface{}{
9898
"$comment": "This file is auto-generated from docs/reference/api/openapi.yaml. Do not edit manually. Run 'make generate-schema' to update.",
9999
"$schema": "http://json-schema.org/draft-07/schema#",

0 commit comments

Comments
 (0)