Skip to content

Commit 7d7a965

Browse files
joelverhagentoby
authored andcommitted
Add new package registry document
1 parent 68ee3b9 commit 7d7a965

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

docs/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616

1717
[`api_examples.md`](./api_examples.md) - Examples of what data will actually look like coming from the official registry API
1818

19-
[`architecture.md`](./architecture.md) - Technical architecture, deployment strategies, and data flows
19+
[`architecture.md`](./architecture.md) - Technical architecture, deployment strategies, and data flows
20+
21+
[`server.json` README](./server-json/README.md) - description of the `server.json` purpose and schema
22+
23+
[`new_package_registry.md`](./new_package_registry.md) - steps to add a new package registry for local server packages

docs/new_package_registry.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Adding a new package registry
2+
3+
The MCP Registry project is a **metaregistry**, meaning that it hosts metadata for MCP servers but does not host the code for the servers directly.
4+
5+
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.
6+
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/schema.json). For example, this could be "npm" (for npmjs.com packages) or "pypi" (for PyPI packages).
8+
9+
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.
10+
11+
For the sake of illustration, this document will use npm (the Node.js package manager) as an example at each step.
12+
13+
## Prerequisites
14+
15+
The package registry must meet the following requirements:
16+
17+
1. The package registry supports packaging and executing CLI apps. Local MCP servers use the [stdio transport](https://modelcontextprotocol.io/docs/concepts/transports#standard-input%2Foutput-stdio).
18+
- npm CLI tools typically express their CLI commands in the [`bin` property of the package.json](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin)
19+
1. The package registry (or associated client tooling) has a widely accepted **single-shot** CLI command.
20+
- npm's `npx` tool executes CLI commands using a [documented execution heuristic](https://docs.npmjs.com/cli/v11/commands/npx#description)
21+
- 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.
22+
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.
23+
- `npx` by default connects to the public npmjs.com registry, allowing simple consumption of public npm packages.
24+
25+
## Steps
26+
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.
28+
29+
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.
30+
- Example for NuGet: https://github.com/modelcontextprotocol/registry/issues/126
31+
1. Open a PR with the following changes:
32+
- Update the [`server.json` schema](server-json/schema.json)
33+
- Add your package registry name to the `registry_name` enum value array.
34+
- 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.
37+
- 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).
39+
- Add a sample, minimal `server.json` to the [`server.json` examples](server-json/examples.md).

docs/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ components:
182182
runtime_hint:
183183
type: string
184184
description: A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtime_arguments` are present.
185-
examples: [npx, uvx]
185+
examples: [npx, uvx, dnx]
186186
runtime_arguments:
187187
type: array
188188
description: A list of arguments to be passed to the package's runtime command (such as docker or npx). The `runtime_hint` field should be provided when `runtime_arguments` are present.

0 commit comments

Comments
 (0)