Publishing a declaration
A short path, taken from the README of the public checker. The README and the spec are the full reference: README, SPEC.md.
You need a server published under a domain namespace (such as com.example/weather) with mcp-publisher login dns or mcp-publisher login http, and the private key you made for that login. Names under io.github are out of scope, because no domain key can prove them. The checker needs Node 20 or later and has no dependencies, so nothing needs installing.
Get the checker. From the folder above the one that holds your server.json, clone it, so that it sits next to that folder:
git clone https://github.com/bcrypto0/addon-declarationRun every command below from the folder that holds your server.json. They call the checker by its path,
../addon-declaration/bin/addon-declare.js; change that path if you cloned it somewhere else. Keep the private key out of that folder.Save the
tools/listresult of this exact build astools.json, as the server sent it, in UTF-8. If your server pages the list, save each page as its own file and give--toolsonce per page, in order, in every command below (for example--tools tools-1.json --tools tools-2.json). If the answer arrived as server sent events (lines starting withevent:anddata:), save only the JSON-RPC message thedata:lines carry, without that framing.Create the unsigned declaration from your server.json. Its version must be one you have not published in the registry yet, because a published version cannot be changed. If you logged in with
mcp-publisher login http, add--method http: without it the declaration names the dns method, and every check looks for a TXT record at your domain.node ../addon-declaration/bin/addon-declare.js init --server-json server.json --tools tools.json --expires-in-days 180 --out unsigned.jsonIf you change the version in server.json afterwards, run this step and the next one again; otherwise the check reports that the declaration differs from the listing (
listing_mismatch). The README lists the other options, such as a price per call, a contact and a link to your last declaration.Sign it. Give the name of an environment variable that holds the key (set from a secret store, not typed on the command line), or a key file kept outside the repository:
node ../addon-declaration/bin/addon-declare.js sign unsigned.json --key-env MCP_PRIVATE_KEY --out declaration.jsonIt prints the proof record the key matches: a TXT record at your domain for the dns method, or a line of
https://<your domain>/.well-known/mcp-registry-authfor the http method. It must be one you already published.Check it the way a reader would:
node ../addon-declaration/bin/addon-declare.js verify declaration.json --tools tools.jsonServe it at the paths
signprinted:/.well-known/addon-declaration/<namespace>/<server>/by-hash/<hex>.json(keep every one of these),.../versions/<version>.json, and.../latest.jsonwhen this is your newest declaration. Here<hex>is the 64 hex digits of the declaration hash, without itssha256:prefix.Point to it from server.json, with the same
<hex>:"_meta": { "io.modelcontextprotocol.registry/publisher-provided": { "addonDeclaration": { "url": "https://example.com/.well-known/addon-declaration/com.example/weather/by-hash/<hex>.json", "hash": "sha256:<hex>" } } }The URL must be exactly the by-hash path on the domain the namespace names (or a parent of it), with the same hash.
Publish the version with
mcp-publisher, then check the listing as this site does:node ../addon-declaration/bin/addon-declare.js check-listing com.example/weather --fetch-toolsA scan after the version is published lists it; the front page gives the time of the last scan. Each release that passes the previous signed declaration to
--previousbuilds a history that a check can follow. The checker repository has a GitHub Action and a sample workflow for signing on release.
Publishing a declaration is free and needs no account with this site. The site lists what the registry serves and what the check finds; it does not accept or remove listings by request.