Skip to content

Commit e4002fd

Browse files
Update docs for new package registry contributions (#362)
Following PR #350, added documentation for new validation requirements: - Registry validators now require ownership verification metadata - Updated prerequisites to include validation mechanism requirement - Added implementation steps for registry validators - Included validation examples for existing registries (npm, pypi, nuget, oci, mcpb) Fixes #361 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: adam jones <[email protected]>
1 parent 8d28eed commit e4002fd

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

docs/new_package_registry.md

Lines changed: 19 additions & 6 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`](server-json/README.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.registry_name` string enum in the [`server.json` schema](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.registry_type` string enum in the [`server.json` schema](server-json/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

@@ -21,19 +21,32 @@ The package registry must meet the following requirements:
2121
- For example, the MCP client can map the `server.json` metadata to an `npx` CLI execution, with args and environment variables populated via user input.
2222
1. The package registry supports anonymous package downloads. This allows the MCP client software to use the metadata found in the MCP registry to discover, download, and execute package-based local MCP servers with minimal user intervention.
2323
- `npx` by default connects to the public npmjs.com registry, allowing simple consumption of public npm packages.
24+
1. The package registry should support a validation mechanism to verify ownership of the server name. This prevents misattribution and ensures that only the actual package owner can reference their packages in server registrations. For example:
25+
- npm requires an `mcpName` field in `package.json` that matches the server name being registered
26+
- PyPI requires a `mcp-name:` line in the package README/description
27+
- Each registry type must implement a validation mechanism accessible via public API
2428

2529
## Steps
2630

27-
These steps are currently very brief because the MCP Registry service is not yet deployed to production. These steps may evolve as additional validations or details are discovered and mandated.
31+
These steps may evolve as additional validations or details are discovered and mandated.
2832

2933
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.
3034
- Example for NuGet: https://github.com/modelcontextprotocol/registry/issues/126
3135
1. Open a PR with the following changes:
3236
- Update the [`server.json` schema](server-json/server.schema.json)
33-
- Add your package registry name to the `registry_name` enum value array.
37+
- Add your package registry name to the `registry_type` example array.
38+
- Add your package registry base url to the `registry_base_url` example array.
3439
- Add the single-shot CLI command name to the `runtime_hint` example value array.
35-
- Update the [`openapi.yaml`](openapi.yaml)
36-
- Add your package registry name to the `registry_name` enum value array.
40+
- Update the [`openapi.yaml`](server-registry-api/openapi.yaml)
41+
- Add your package registry name to the `registry_type` enum value array.
42+
- Add your package registry base url to the `registry_base_url` enum value array.
3743
- Add the single-shot CLI command name to the `runtime_hint` example value array.
38-
- This duplicates the previous step and will be improved with [issue #159](https://github.com/modelcontextprotocol/registry/issues/159).
3944
- Add a sample, minimal `server.json` to the [`server.json` examples](server-json/examples.md).
45+
- Implement a registry validator:
46+
- Create a new validator file: `internal/validators/registries/yourregistry.go`, following the pattern of existing validators. Examples:
47+
- **npm**: Checks for an `mcpName` field in `package.json` that matches the server name
48+
- **PyPI**: Searches for `mcp-name: server-name` format in the package README content
49+
- **NuGet**: Looks for `mcp-name: server-name` format in the package README file
50+
- **Docker/OCI**: Validates a Docker image label `io.modelcontextprotocol.server.name` in the image manifest
51+
- Add corresponding unit tests: `internal/validators/registries/yourregistry_test.go`
52+
- Register your validator in `internal/validators/validators.go`

0 commit comments

Comments
 (0)