How to Publish an MCP Server to the Official MCP Registry
Updated 2026-11-18
To publish an MCP server to the official MCP Registry, install the mcp-publisher CLI, describe your server in a server.json file, log in to prove you own the namespace, and run mcp-publisher publish. Servers published there also appear on Agents Index automatically, usually within a day.
What the registry is
The MCP Registry is the official metadata repository for publicly accessible MCP servers. It stores metadata only, not code. A listing points to an npm package, a Docker image, or a remote URL. The registry does not support private servers, meaning servers reachable only on a private network or from a private package registry.
The registry is in preview. Its documentation warns that breaking changes or data resets may occur before general availability. Check the quickstart for current details before you publish.
Step 1: Choose a namespace and auth method
Every server name has the form namespace/name. The namespace proves who is publishing, and the method you log in with must match it.
| Namespace | Login command | Proves |
|---|---|---|
io.github.username/* or io.github.orgname/* | mcp-publisher login github | You control that GitHub account or org |
com.example/* (reverse DNS) | mcp-publisher login dns --domain example.com | You control the domain, via a DNS TXT record |
com.example/* (reverse DNS) | mcp-publisher login http --domain example.com | You control the domain, via a file at /.well-known/mcp-registry-auth |
Use GitHub if you are an individual or small project. Use a domain if you want the name to match your company. A reverse-DNS name is how a listing such as Notion ties back to a domain.
Step 2: Install mcp-publisher
brew install mcp-publisher
# or download the binary (macOS and Linux)
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher && sudo mv mcp-publisher /usr/local/bin/
mcp-publisher --help
The CLI has these commands: init, login, logout, publish, status and validate.
Step 3: Write server.json
Run mcp-publisher init in your project to generate a template, then edit it. The registry limits description to 100 characters, and longer values fail validation.
A remote server (no package)
If your server runs at a public URL, use remotes and omit packages:
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.my-username/weather",
"title": "Weather",
"description": "A remote MCP server for weather information.",
"repository": {
"url": "https://github.com/my-username/mcp-weather-server",
"source": "github"
},
"version": "1.0.0",
"remotes": [
{
"type": "streamable-http",
"url": "https://weather.example.com/mcp"
}
]
}
A remote type is streamable-http or sse. The docs recommend Streamable HTTP and call SSE deprecated, so publish SSE only for existing clients. You can add headers to describe required headers, and use {curly_braces} variables in the URL.
A package (npm, PyPI, Docker and others)
If users run your server locally, describe the package:
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.my-username/weather",
"description": "An MCP server for weather information.",
"repository": {
"url": "https://github.com/my-username/mcp-weather-server",
"source": "github"
},
"version": "1.0.1",
"packages": [
{
"registryType": "npm",
"identifier": "@my-username/mcp-weather-server",
"version": "1.0.1",
"transport": { "type": "stdio" }
}
]
}
A server can have both packages and remotes, so host applications can choose an install method.
Step 4: Prove you own the package
For package-based servers the registry checks that the package matches the metadata. For npm, add mcpName to package.json. It must equal the name in server.json:
{
"name": "@my-username/mcp-weather-server",
"version": "1.0.1",
"mcpName": "io.github.my-username/weather"
}
Publish the package to npm first (npm publish --access public). For PyPI and NuGet, the marker is an mcp-name: <server-name> line in the package README. Other package types are listed in the registry's Package Types guide. Remote-only servers skip this step.
Step 5: Log in
GitHub
mcp-publisher login github
Visit https://github.com/login/device, enter the code shown, and authorize. GitHub login always grants your personal namespace. Organization namespaces require the Owner role, and mcp-publisher login github cannot currently publish to an org namespace. Use GitHub Actions (OIDC) or a personal access token with mcp-publisher login github --token <YOUR_TOKEN>.
DNS
Generate an Ed25519 key and publish its public half as a TXT record at the apex of your domain:
openssl genpkey -algorithm Ed25519 -out key.pem
PUBLIC_KEY="$(openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64)"
# TXT record at example.com:
# v=MCPv1; k=ed25519; p=${PUBLIC_KEY}
MCP_PRIVATE_KEY="$(openssl pkey -in key.pem -noout -text | sed -n '/priv:/,/pub:/p' | sed '1d;$d' | tr -d ' :\n')" \
mcp-publisher login dns --domain example.com
On macOS, Ed25519 needs OpenSSL 3.0 or newer (brew install openssl@3).
HTTP
Write the same v=MCPv1; k=ed25519; p=... line to a file and host it at https://example.com/.well-known/mcp-registry-auth. The registry fetches it with a GET that must return 200 with no redirects, and the body must be 4096 bytes or less. Then run mcp-publisher login http --domain example.com with MCP_PRIVATE_KEY set as above.
Step 6: Publish and check
mcp-publisher publish
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.my-username/weather"
If publishing fails, the common causes are a missing ownership marker ("Registry validation failed for package"), an expired token (log in again), or a name that does not match your login method ("You do not have permission to publish this server").
One limit to know: with any auth method, the registry verifies that you control the namespace in name. It does not verify that you control the remote URL. A DNS or HTTP-verified name such as com.example/weather at least lets users see that the name and URL share a publisher.
What happens next on Agents Index
Agents Index lists servers from the official registry, so a published server appears in the official registry listing automatically, usually within a day, and then in new listings. Each remote endpoint is probed daily. See our methodology for how. Publishing metadata is only the first step: users still need a working endpoint, good tool descriptions and docs. The guide to getting your AI agent discovered covers those. According to Agents Index probe data, Nov 2026, 7,189 remote endpoints in the registry were unreachable, so uptime matters. See the State of MCP report.
Sources
- Quickstart: Publish an MCP Server to the MCP Registry - modelcontextprotocol.io
- The MCP Registry - modelcontextprotocol.io
- Registry authentication - modelcontextprotocol.io
- Publishing remote servers - modelcontextprotocol.io
- modelcontextprotocol/registry - GitHub
FAQ
How do I publish an MCP server to the official registry?
Install mcp-publisher, run mcp-publisher init to create server.json, run mcp-publisher login github (or dns or http), then run mcp-publisher publish. Package servers also need an ownership marker such as mcpName in package.json.
What namespace should I use?
With GitHub login, names start with io.github.<username>/ or io.github.<org>/. With DNS or HTTP verification, use the reverse-DNS form of a domain you control, such as com.example/server.
Can I publish a remote-only server without a package?
Yes. Put a remotes array in server.json with a type (streamable-http or sse) and a public url, and omit packages. The URL must be publicly accessible.
How long until my server appears on Agents Index?
Agents Index pulls from the official MCP Registry automatically, so a published server shows up within about a day. Our probes then check its remote endpoint daily.