AgentRoot
Navigate

// 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)

// agentroot.json { "domain": "dbtools.io", "records": [ { "id": "postgres-mcp", "type": "mcp", "name": "Postgres MCP Server", "description": "Query Postgres via natural language", "transport": "streamable-http", "endpoint": "https://dbtools.io/mcp/postgres" } ] }

Local MCP (stdio)

// agentroot.json { "domain": "dbtools.io", "records": [ { "id": "postgres-mcp", "type": "mcp", "name": "Postgres MCP Server", "description": "Query Postgres via natural language", "transport": "stdio", "install": { "package": "@dbtools/postgres-mcp", "command": "npx" } } ] }

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):

  • type must be "mcp" (one of the five enum values: agent | mcp | skill | a2a | payment)
  • transport is required: sse, stdio, or streamable-http
  • tools is an optional array of { name, description } objects. Bare-string arrays still parse, but objects render better in the registry UI.
  • install is required for stdio transport. Provide install.package (npm/pypi name) — the install command defaults to npx -y <package>. Use install.command only if you need a non-npx launcher (e.g. uvx for Python).
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 manifest

Upload your manifest 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 manifest.

# Add this TXT record to your DNS _agentroot.dbtools.io TXT "v=ar1 manifest=https://dbtools.io/.well-known/agentroot.json"

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:

$ npx -p @agent-root/cli agent-root submit dbtools.io

Or via the API directly:

$ curl -X POST https://agentroot.io/api/submit \ -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 -p @agent-root/cli 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

Test that the install command prints the right config block:

$ npx -p @agent-root/cli agent-root install dbtools.io/postgres-mcp --tool claude # Prints the mcpServers JSON snippet for you to paste into # .claude/mcp.json (or ~/.claude/mcp.json for global)

// next_steps