// 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 zone file
Create an agentroot.json describing your MCP server, its transport, and the tools it exposes.
// agentroot.json
{
"domain": "dbtools.io",
"records": [
{
"id": "postgres-mcp",
"type": "mcp",
"name": "Postgres MCP Server",
"description": "Query, inspect, and manage PostgreSQL databases through natural language",
"transport": "sse",
"endpoint": "https://dbtools.io/mcp/postgres",
"auth": "api-key",
"tools": ["query", "describe-table", "list-tables", "explain-plan", "create-migration"],
"install": {
"npm": "@dbtools/postgres-mcp",
"command": "npx @dbtools/postgres-mcp --connection $POSTGRES_URL"
}
}
]
}
Key fields for MCP records:
type must be "mcp"
transport — connection method: sse, stdio, or streamable-http
tools — array of tool names your server exposes
install — optional install configuration with npm package and command
Transport selection matters. Use 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 zone file
Upload your zone file to a public URL on your domain.
# Recommended locations
https://dbtools.io/.well-known/agentroot.json
https://dbtools.io/agentroot.json
3Add the DNS record
Add a TXT record to prove domain ownership and link to your zone file.
# Add this TXT record to your DNS
_agentroot.dbtools.io TXT "v=ar1 zone=https://dbtools.io/.well-known/agentroot.json"
4Submit to AgentRoot
Submit your domain to trigger DNS verification and zone file indexing.
$ npx agent-root publish dbtools.io
Or via the API:
$ curl -X POST https://agentroot.io/api/zones \
-H "Content-Type: application/json" \
-d '{"domain": "dbtools.io"}'
5Verify it worked
Search for your MCP server and confirm the install config is correct.
$ npx agent-root search "postgres" --type mcp
# Expected output:
dbtools.io/postgres-mcp mcp Postgres MCP Server
transport: sse | auth: api-key
tools: query, describe-table, list-tables, explain-plan, create-migration
Test that the install config works with your preferred tool:
$ npx agent-root install dbtools.io/postgres-mcp --tool claude
# Adds MCP server config to Claude Code settings
// next_steps