// publish_mcp
Publishing an MCP Server
Register your Model Context Protocol server on AgentRoot so AI coding tools can discover, install, and connect to it. MCP servers expose tools, resources, and prompts that extend what AI assistants can do.
// prerequisites
- A domain you control (e.g.
dbtools.io) - An MCP server with an accessible transport endpoint
- DNS access to add TXT records
1Create your manifest
Create an agentroot.json describing your MCP server, its transport, and the tools it exposes.
Remote MCP (sse / streamable-http)
Local MCP (stdio)
Advanced: per-user args and secrets
If your server needs per-user args (e.g. a directory path) or env vars (e.g. an API key), document them in your package README. After running agent-root install, the consumer edits the generated mcpServers block to add them. The discovery record itself stays free of user-specific data and secrets.
Key fields for MCP records (validated by the protocol schema):
typemust be"mcp"(one of the five enum values:agent | mcp | skill | a2a | payment)transportis required:sse,stdio, orstreamable-httptoolsis an optional array of{ name, description }objects. Bare-string arrays still parse, but objects render better in the registry UI.installis required forstdiotransport. Provideinstall.package(npm/pypi name) — the install command defaults tonpx -y <package>. Useinstall.commandonly if you need a non-npxlauncher (e.g.uvxfor Python).
stdio for local-only servers started by the client. Use sse for remote servers with server-sent events. Use streamable-http for the newer HTTP-based streaming protocol.2Host the manifest
Upload your manifest to a public URL on your domain.
3Add the DNS record
Add a TXT record to prove domain ownership and link to your manifest.
4Submit to AgentRoot
Submit your domain to trigger DNS verification and manifest indexing. The CLI does a local DNS probe first, then posts to /api/submit:
Or via the API directly:
5Verify it worked
Search for your MCP server and confirm the install config is correct.
Test that the install command prints the right config block: