MCP
Connect an AI client through four discovery tools, then load complete schemas only for the task you need. All MCP capabilities remain available.
Last updated
Point any MCP client at the registry and it gets metagraphed as callable tools: subnet discovery and comparison, per-subnet health and economics, OpenAPI schemas for every registered subnet API (callable through the registry itself), chain blocks/extrinsics/events, account lookup, and grounded question-answering — the same data every REST route serves, shaped for agents. Bittensor in a box: connect, sign in for free, and use the full catalog without a local install.
https://api.metagraph.sh/mcpWhich endpoint
Default to /mcp. It advertises four discovery tools: search_tools, invoke_read_tool,
invoke_tool, and get_more_tools. Your client loads complete tool definitions as needed instead
of putting the full catalog into chat context at connection time.
| Endpoint | Initial listing | Choose it when |
|---|---|---|
/mcp | Four discovery and invocation tools | You want a small initial catalog and task-based search. |
/mcp/core | Common tools, directly advertised | Your client needs the common tools listed up front. |
/mcp?catalog=full | Every tool with its complete schemas | Your integration requires an eager catalog. |
Every profile can call every tool with the same authentication, permissions, and limits. Selecting a smaller listing does not change an individual tool's schema or result.
search_tools accepts task keywords or an exact tool name and returns up to three complete
matching definitions. Each includes the input and output schemas, annotations, and authentication
requirements. Follow next_cursor with the same query to see more matches. Search by exact name
when you already know the tool you need, so unrelated schemas do not enter the conversation.
For a tighter per-response budget, configure https://api.metagraph.sh/mcp?search_page_size=1
(or 2). This optional setting keeps the initial catalog unchanged and returns at most one
(or two) complete matching definitions per search page. The default remains three. Following
all pages can require more requests; individual schemas and target results stay complete.
Clients that only allow advertised tools can use invoke_read_tool for a discovered tool with
readOnlyHint: true, or invoke_tool for other targets. Both validate the target's arguments and
apply its permissions. Sign in before calling MCP; individual tools retain their existing account permissions.
get_more_tools records a missing capability. Use it only when the catalog cannot do what you
need and describe the goal in context; it acknowledges the gap rather than returning extra tools.
Authentication
Authentication is required; sign-in is free. Every MCP profile requires an account. Clients that support MCP authorization follow the server's 401 challenge to the existing OAuth sign-in (GitHub), then retry with an access token. For automation, send an Authorization: Bearer mg_… API key header.
Free accounts can discover and invoke the full tool catalog, subject to existing permissions and history-depth limits. The free per-minute ceiling is 500 requests/60s per account; higher tiers retain their current limits. A session ID is not an authentication credential.
OAuth metadata, client registration and the MCP server card remain public. Public REST API reads retain their existing access policy. If an already-validated OAuth account cannot be resolved, a 503 response with Retry-After asks the client to retry rather than request consent again.
Connect a client
Claude Code
One CLI command, no config file to hand-edit:
claude mcp add --transport http metagraphed https://api.metagraph.sh/mcpClaude Desktop & claude.ai
Both take the endpoint as a custom connector: Settings → Connectors → Add custom connector, then paste https://api.metagraph.sh/mcp. Claude Desktop also accepts a config-file entry:
{
"mcpServers": {
"metagraphed": {
"transport": { "type": "http", "url": "https://api.metagraph.sh/mcp" }
}
}
}Cursor
{
"mcpServers": {
"metagraphed": { "url": "https://api.metagraph.sh/mcp" }
}
}VS Code
{
"servers": {
"metagraphed": { "type": "http", "url": "https://api.metagraph.sh/mcp" }
}
}Any other client
Any client that speaks Streamable HTTP MCP and supports OAuth can connect directly, then sign in:
{
"type": "streamable-http",
"url": "https://api.metagraph.sh/mcp"
}First calls to try
Start with discovery, then invoke the selected tool using the complete arguments its schema requires:
| Goal | search_tools query | Next step |
|---|---|---|
| Find inference subnets | search_subnets | Pass the search query to the discovered read-only tool through invoke_read_tool. |
| Ask a grounded registry question | ask | Follow the returned schema to ask the question through invoke_read_tool. |
| Call a subnet's registered API | call_subnet_surface | Discover the API and required arguments, then choose the bridge from its annotations. |
Keep tool discovery specific to the current task. A broad query can match many tools; load another page only when the current definitions do not cover what you need. API schemas and tool responses remain complete, so select supported filters and bounded pagination instead of asking for every record at once.
Every tool mirrors a documented REST route — the API reference covers the request/response shapes behind them, and For agents has the rest of the machine surface: playbooks, llms.txt, the served skill, and prompt-ready links.
Limits and access
Per-minute ceilings for every surface, the daily unit budget, what each tier gets, and how to move up one. Generated from the rate-limit config that enforces them.
Subnet metagraph & validators
GET /api/v1/subnets/{netuid}/metagraph, /validators, /neurons/{uid}, and the global /api/v1/validators surface — trust, incentive, consensus, dividends, and nominators explained. No API key.