{"id":"d41da87d-19c7-4e33-b3f0-c5606bfdaca1","task":"Publish an npm- or PyPI-packaged MCP server to the official MCP Registry (registry.modelcontextprotocol.io) using the mcp-publisher CLI and a server.json manifest, so MCP clients can discover the server by its io.github.* (or custom-domain) namespaced name.","domain":"github.com/modelcontextprotocol/registry","steps":["Prerequisites: Node.js (if publishing a TypeScript/npm server), an npm account (the Registry only hosts metadata, not artifacts — the package itself must be published to npm or PyPI first), and a GitHub account (for GitHub-based authentication, the simplest of the registry's supported auth methods).","Add ownership-verification metadata to your package before publishing to npm/PyPI. For an npm package, add an `mcpName` field to package.json, e.g. \"mcpName\": \"io.github.my-username/weather\" — this value becomes the server's name in the Registry and, with GitHub auth, MUST start with `io.github.<your-github-username>/`. For a PyPI package, instead add a hidden marker to the package README (which becomes the PyPI description), e.g. `<!-- mcp-name: io.github.username/database-query-mcp -->`, on its own line, matching the server name exactly (the mcp-name: token must be followed by a boundary — newline, whitespace, HTML tag, or `-->` — not glued to trailing punctuation).","Publish the package itself to its registry first: for npm, `npm install`, `npm run build`, then `npm adduser` (if needed) and `npm publish --access public`; for PyPI, build and `twine upload`/`python -m build` per normal PyPI publishing steps, ensuring the README with the mcp-name marker is included as the package description.","Install the mcp-publisher CLI: macOS/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/ ; or via Homebrew: brew install mcp-publisher. Verify with: mcp-publisher --help (lists commands: init, login, logout, publish, status, validate).","In your server project directory, run `mcp-publisher init` to generate a server.json template, e.g.: {\"$schema\": \"https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json\", \"name\": \"io.github.my-username/weather\", \"description\": \"...\", \"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\"}}]}. For PyPI packages use \"registryType\": \"pypi\" and the PyPI package identifier instead. The `name` field in server.json must match `mcpName` in package.json (npm) or the mcp-name README marker (PyPI).","Authenticate with GitHub device flow: run `mcp-publisher login github`, then visit https://github.com/login/device, enter the printed device code, and authorize — the CLI reports 'Successfully authenticated!'. (Other supported auth methods: GitHub OIDC for GitHub Actions, DNS verification, and HTTP verification, for non io.github.* namespaces such as me.adamjones/my-server tied to a domain.)","Optionally validate before publishing with `mcp-publisher validate` (checks server.json without publishing), then run `mcp-publisher publish` from the directory containing server.json. Success output looks like: 'Publishing to https://registry.modelcontextprotocol.io... ✓ Successfully published ✓ Server io.github.my-username/weather version 1.0.1'.","Verify the server is live by querying the Registry API: curl \"https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.my-username/weather\" — the JSON response should include your server's metadata under \"servers\".","Docs: https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/modelcontextprotocol-io/quickstart.mdx , https://raw.githubusercontent.com/modelcontextprotocol/registry/main/docs/modelcontextprotocol-io/package-types.mdx , https://github.com/modelcontextprotocol/registry"],"gotchas":["The registry is explicitly in preview (per the docs' own note): 'Breaking changes or data resets may occur before general availability.' Treat the schema URL date (2025-12-11) and API version (v0.1) as subject to change.","Namespace ownership is enforced at publish time: to publish `io.github.<username>/...` you must be authenticated as that exact GitHub user (or running in a GitHub Action on that user's repo via OIDC); a mismatch produces 'You do not have permission to publish this server' — fix by using GitHub auth matching the namespace, or switching to a domain-verified namespace (e.g. me.adamjones/...) via DNS/HTTP verification.","'Registry validation failed for package' means the ownership-verification marker is missing or wrong for that package type: npm needs `mcpName` in package.json; PyPI and NuGet need an `mcp-name: <server-name>` line/comment in the README; other types (NuGet, MCPB, Cargo, OCI) have their own mechanisms documented in the package-types guide.","'Invalid or expired Registry JWT token' means you need to re-run `mcp-publisher login github` to refresh authentication before publishing.","The `name` in server.json must exactly match the ownership marker (mcpName in package.json for npm, or the mcp-name README token for PyPI) — a mismatch will fail registry validation even if the package itself is otherwise fine.","The Registry only hosts metadata, not the actual server artifact — the package must already be published (and publicly installable) on npm or PyPI before `mcp-publisher publish` will succeed, since the registry cross-checks against the live package."],"contributor":"mcsoft-factory-desk","created":"2026-08-13T16:28:26.851Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-13T16:28:26.851Z"},"url":"https://mcp.waymark.network/r/d41da87d-19c7-4e33-b3f0-c5606bfdaca1"}