Publish to the official MCP Registry
How to publish a remote MCP server to the official MCP Registry: server.json, namespaces, GitHub login, DNS and HTTP proof, a GitHub Action, and the errors you will meet.
The official MCP Registry at registry.modelcontextprotocol.io stores metadata about MCP servers: a name, a description, a version, and where to find the server. It does not host code. Other directories read from it, so one correct publish reaches several places. Publishing a remote server takes one JSON file, one CLI, and a proof that you control the namespace you picked.
Everything below follows the official docs: the quickstart, authentication, remote servers, versioning and GitHub Actions. The registry is marked as a preview in those docs, so breaking changes and data resets are possible. Re-check the pages before a big release.
What a remote-only server.json looks like
If your server is only available at a public URL, you can skip packages entirely. The quickstart shows a remote-only file with a remotes entry and no packages:
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.your-username/weather",
"title": "Weather",
"description": "Weather forecasts and alerts for any city.",
"repository": {
"url": "https://github.com/your-username/weather-mcp",
"source": "github"
},
"version": "1.0.0",
"remotes": [
{
"type": "streamable-http",
"url": "https://mcp.example.com/mcp"
}
]
}
Field notes:
nameisnamespace/server. The namespace depends on how you authenticate (next section).descriptionis limited to 100 characters. Longer descriptions fail validation.versionmust be unique for every publication. Once published, a version and its metadata cannot change.remotes[].typeisstreamable-httporsse. SSE is deprecated, so publish ansseremote only for existing clients.remotes[].urlmust be publicly accessible.- Headers and URL template variables are supported for tenant-specific or key-based setups. Template variables use
{curly_braces}, withdescription,isRequired,default,choicesandisSecretproperties.
A server can have remotes and packages together, so a host can choose a remote or a local install.
Namespaces: pick one that matches who you are
The authentication method you use decides your namespace.
| Method | Namespace | Example |
|---|---|---|
| GitHub | io.github.<username>/* or io.github.<org>/* | io.github.alice/weather |
| DNS or HTTP proof | reverse-DNS of your domain, com.example/* | com.example/weather |
Two things worth knowing before you choose.
The registry verifies the namespace, not the remote URL. With GitHub auth you prove you control a GitHub account. With DNS or HTTP proof you prove you control a domain. In neither case does the registry check that the remote URL is on that domain. The docs recommend DNS or HTTP auth when your URL is on a domain you control, so the name and the URL visibly belong to the same publisher. For a commercial server, a domain namespace reads as more credible than a personal GitHub one.
Organization namespaces need an Owner and a specific login path. GitHub authentication always grants your personal namespace. To publish under io.github.<org>/* you must be an Owner of the org. The docs warn that mcp-publisher login github (the interactive device flow) cannot currently publish to an organization namespace, because it authenticates through a GitHub App whose tokens cannot read org memberships. They point to two working paths: GitHub Actions with OIDC, or a personal access token with mcp-publisher login github --token <TOKEN>. A classic PAT needs read:org. A fine-grained PAT needs Organization permissions, Members, read-only. No repository scopes are needed.
Step by step: GitHub namespace
- Install the CLI. On macOS:
brew install mcp-publisher. Otherwise download a release binary from the registry repository. - Create
server.json(mcp-publisher initmakes a template; replace itspackagesblock withremotesfor a remote server). - Log in:
mcp-publisher login github. Open the device URL, enter the code, authorize. - Publish:
mcp-publisher publish. - Verify:
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.your-username/weather".
Step by step: your own domain with DNS proof
DNS authentication relies on a TXT record holding a public key. You keep the private key and the publisher signs with it.
MY_DOMAIN="example.com"
openssl genpkey -algorithm Ed25519 -out key.pem
PUBLIC_KEY="$(openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64)"
echo "${MY_DOMAIN}. IN TXT \"v=MCPv1; k=ed25519; p=${PUBLIC_KEY}\""
Add that TXT record, wait for propagation, then log in:
PRIVATE_KEY="$(openssl pkey -in key.pem -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n')"
mcp-publisher login dns --domain "${MY_DOMAIN}" --private-key "${PRIVATE_KEY}"
mcp-publisher publish
The traps, all from the docs:
- Apex only. The record goes on the domain itself (
example.com), not on a selector such as_mcp-auth.example.comor_mcp-registry.example.com. A record under a selector produces a generic signature error. The registry returns a specific error if it finds a well-formed record at a known wrong selector and none at the apex. - macOS and OpenSSL. The system LibreSSL on macOS does not support Ed25519 in
genpkeyand fails withAlgorithm Ed25519 not found. Install OpenSSL 3 (brew install openssl@3) and call it explicitly, or use ECDSA P-384, which LibreSSL handles. - Rotate cleanly. After rotating keys, delete the old TXT record. A stale record gets tried first and can cause verification to fail. Check what is published with
dig TXT example.com +short. - Key custody. The private key proves ownership. Google Cloud KMS and Azure Key Vault are supported through
mcp-publisher login dns google-kmsandazure-key-vault, so the key never sits in CI as plain text.
An alternative is HTTP proof: host the same v=MCPv1; k=...; p=... string at https://example.com/.well-known/mcp-registry-auth and run mcp-publisher login http --domain example.com --private-key .... The registry fetches that file from its own cloud infrastructure, not your laptop, so a curl that works from your desk proves nothing. The docs list what breaks it: a WAF or bot rule that challenges non-browser clients, a geo-block, an AAAA record that points at an unreachable address, a redirect (redirects are not followed, so a 3xx fails), and a 200 response with an HTML error page. Fetches time out at 10 seconds and the body is capped at 4096 bytes. A login failure shows as token exchange failed with status 401 even when the file serves correctly to everyone else. To test as the registry sees it:
curl -sS -H 'Accept: text/plain' -A 'mcp-registry/1.0' https://example.com/.well-known/mcp-registry-auth
Automate with GitHub Actions
Publishing by hand once is fine. Re-publishing on every release is where drift starts, so put it in CI. The official workflow runs on a version tag, pins mcp-publisher to a specific release, verifies its Sigstore bundle with cosign, and logs in with GitHub OIDC so no token is stored:
name: Publish to MCP Registry
on:
push:
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
MCP_PUBLISHER_VERSION: v1.8.1
steps:
- uses: actions/checkout@v5
- name: Set version in server.json from the tag
run: |
VERSION=${GITHUB_REF#refs/tags/v}
jq --arg v "$VERSION" '.version = $v' server.json > server.tmp && mv server.tmp server.json
# then: install cosign, download and verify mcp-publisher (see the official page),
- name: Authenticate to MCP Registry
run: ./mcp-publisher login github-oidc
- name: Publish server to MCP Registry
run: ./mcp-publisher publish
Copy the cosign download and verify block from the official page rather than retyping it, and bump MCP_PUBLISHER_VERSION deliberately instead of using the latest URL. OIDC login grants the io.github.<owner>/* namespace. For a domain namespace use mcp-publisher login dns --domain example.com --private-key ${{ secrets.MCP_PRIVATE_KEY }}.
If you use a PAT for an organization, the docs advise storing it as a secret on a protected environment, not a plain repository secret, because anyone who can run code in that job can publish and overwrite any server under the org namespace. Restrict the environment to your default branch or release tags and consider required reviewers. Never publish from a pull_request_target workflow that checks out PR code.
Versions are immutable
A version string must be unique per publication and cannot be changed after. The registry recommends semantic versioning and refuses range-looking strings like ^1.2.3 or 1.x. If you need to republish metadata without changing the server, use a semver prerelease such as 1.2.3-1. Mind the sort order: a prerelease sorts before its regular version, so publishing 1.2.3-1 after 1.2.3 will not become "latest". A non-semver version published after semver ones is always marked latest, even if it should sort earlier.
For a remote server, align the version with your API version, and change it whenever your tool list changes, so aggregators that cache a listing see a new version. Registry metadata is frozen per version, so a new version string is how you tell anyone reading it that something changed.
Common errors
| Error | Fix |
|---|---|
| "You do not have permission to publish this server" | Your auth method does not match the namespace. GitHub auth needs io.github.<you>/. |
| "Invalid or expired Registry JWT token" | Log in again. |
| Description validation failure | Shorten to 100 characters or fewer. |
Org namespace missing after login github | Use OIDC in Actions or a PAT with the right scope. |
invalid audience in CI | Your mcp-publisher is too old. Bump the pinned version. |
| DNS login signature error | Record is on a selector, or a stale record remains. |
| HTTP login 401 | The registry cannot fetch the file. Check WAF, redirects and AAAA. |
What publishing gets you
Aggregators read from the registry, so a correct listing here is the cheapest distribution step. PulseMCP says on its submit page that the best first step is publishing to the official registry, and that it will pick those servers up automatically once it reopens. The page was last updated September 3, 2026 and says submissions and changes are temporarily paused. See where to list your MCP server.
Check your server
Run the free scan at /scan. It checks the remote URL you plan to publish and reports reachability, transport and tool metadata before you put a version number on it.
Check your server against these rules
Scan runs the checks from this guide against a live URL and lists each failing rule with its fix.