One API, Multiple Transports
Access Subtensor reference documentation through REST or MCP. Same data, choose your integration method.
AI Auto-Setup
Tell your AI to set up Subtensor docs. It will run the right command for your platform.
Setup commands by platform
claude mcp add --transport http subtensor https://subtensor.com/mcpAdd to ~/.cursor/mcp.json:
{"mcpServers":{"subtensor":{"type":"http","url":"https://subtensor.com/mcp"}}}Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{"mcpServers":{"subtensor":{"type":"http","url":"https://subtensor.com/mcp"}}}In GPT Builder → Actions → Import from URL:
https://subtensor.com/openapi.yamlJust use the REST API directly:
https://subtensor.com/api/v1/subtensor/search?q=stakeREST API
Standard HTTP endpoints for any language. Perfect for scripts, apps, and custom integrations.
https://subtensor.com/api/v1/subtensorMCP (AI Agents)
Direct integration via Model Context Protocol. Works with Claude, Cursor, Windsurf.
https://subtensor.com/mcpQuick Start
28 pallets, 1550+ items including events, calls, storage, constants, and errors. No authentication required for reference data.
Try it now
Search for staking-related items:
curl "https://subtensor.com/api/v1/subtensor/search?q=stake" Endpoints
Every REST endpoint has an equivalent MCP tool. Use whichever fits your workflow.
| Data | REST Endpoint | MCP Tool | Description |
|---|---|---|---|
| List pallets | /pallets | subtensor_list(category="pallets") | All 28 pallets with item counts |
| Get pallet | /pallets/{name} | subtensor_lookup(type="pallet") | Pallet details including all item names |
| List events | /events | subtensor_list(category="events") | All events across pallets |
| Get event | /events/{key} | subtensor_lookup(type="event") | Event arguments, version history, emitting calls |
| List calls | /calls | subtensor_list(category="calls") | All calls/extrinsics across pallets |
| Get call | /calls/{key} | subtensor_lookup(type="call") | Call parameters, events emitted, storage modified |
| List storage | /storage | subtensor_list(category="storage") | All storage items across pallets |
| Get storage | /storage/{key} | subtensor_lookup(type="storage") | Storage keys, value type, modifying calls |
| List constants | /constants | subtensor_list(category="constants") | All runtime constants with values |
| Get constant | /constants/{key} | subtensor_lookup(type="constant") | Constant type, value, description |
| List errors | /errors | subtensor_list(category="errors") | All pallet errors with descriptions |
| Get error | /errors/{key} | subtensor_lookup(type="error") | Error details, throwing calls, resolution hints |
| Search | /search?q=... | subtensor_search | Full-text search across all items |
| Get type | /types/{name} | subtensor_lookup(type="type") | Type definition (fields, variants, inner types) |
| Get changelog | /changelogs/{pallet} | subtensor_explore(topic="changelog") | Version history with additions, removals, modifications |
| Related items | /related/{type}/{key} | subtensor_explore(topic="relationships") | Item relationships (calls→events→storage) |
| Removed items | /removed | subtensor_explore(topic="removed") | Items removed from runtime (migration guides) |
| RPC methods | /rpc-methods/{name} | subtensor_lookup(type="rpc_method") | JSON-RPC method details (params, returns, flags) |
List pallets
All 28 pallets with item counts
/palletssubtensor_list(category="pallets")Get pallet
Pallet details including all item names
/pallets/{name}subtensor_lookup(type="pallet")List events
All events across pallets
/eventssubtensor_list(category="events")Get event
Event arguments, version history, emitting calls
/events/{key}subtensor_lookup(type="event")List calls
All calls/extrinsics across pallets
/callssubtensor_list(category="calls")Get call
Call parameters, events emitted, storage modified
/calls/{key}subtensor_lookup(type="call")List storage
All storage items across pallets
/storagesubtensor_list(category="storage")Get storage
Storage keys, value type, modifying calls
/storage/{key}subtensor_lookup(type="storage")List constants
All runtime constants with values
/constantssubtensor_list(category="constants")Get constant
Constant type, value, description
/constants/{key}subtensor_lookup(type="constant")List errors
All pallet errors with descriptions
/errorssubtensor_list(category="errors")Get error
Error details, throwing calls, resolution hints
/errors/{key}subtensor_lookup(type="error")Search
Full-text search across all items
/search?q=...subtensor_searchGet type
Type definition (fields, variants, inner types)
/types/{name}subtensor_lookup(type="type")Get changelog
Version history with additions, removals, modifications
/changelogs/{pallet}subtensor_explore(topic="changelog")Related items
Item relationships (calls→events→storage)
/related/{type}/{key}subtensor_explore(topic="relationships")Removed items
Items removed from runtime (migration guides)
/removedsubtensor_explore(topic="removed")RPC methods
JSON-RPC method details (params, returns, flags)
/rpc-methods/{name}subtensor_lookup(type="rpc_method")Key format: Use {Pallet}.{Name} for item
keys.
Example: /events/SubtensorModule.StakeAdded or subtensor_lookup(type="event", pallet="SubtensorModule", name="StakeAdded")
Integrations
Connect your favorite AI tools or use code directly.
Claude
MCPClaude Code
Run this in your terminal:
claude mcp add --transport http subtensor https://subtensor.com/mcp Manual config
Or add to .mcp.json (Claude Code) or claude_desktop_config.json (Desktop):
{
"mcpServers": {
"subtensor": {
"type": "http",
"url": "https://subtensor.com/mcp"
}
}
} "type": "http" is required. Without
it, clients default to stdio which won't work for remote servers.
Cursor
MCPAdd to your Cursor MCP config:
{
"mcpServers": {
"subtensor": {
"type": "http",
"url": "https://subtensor.com/mcp"
}
}
} Config: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project)
Windsurf
MCPAdd to your Windsurf MCP config:
{
"mcpServers": {
"subtensor": {
"serverUrl": "https://subtensor.com/mcp"
}
}
} Config: ~/.codeium/windsurf/mcp_config.json
ChatGPT (GPT Actions)
OpenAPICreate a custom GPT with Subtensor documentation access:
- 1. Open GPT Builder and go to "Configure"
- 2. Click "Create new action"
- 3. Import from URL:
https://subtensor.com/openapi.yaml - 4. Test and save
Code Examples
import requests
response = requests.get(
"https://subtensor.com/api/v1/subtensor/search",
params={"q": "stake"}
)
print(response.json())const response = await fetch(
"https://subtensor.com/api/v1/subtensor/search?q=stake"
);
const data = await response.json();
console.log(data);# Get pallet details
curl "https://subtensor.com/api/v1/subtensor/pallets/SubtensorModule"
# Search for items
curl "https://subtensor.com/api/v1/subtensor/search?q=stake&type=event"Troubleshooting
"Needs authentication" error
This server does not require authentication. If your client shows this error, it has a stale auth cache from a previous connection attempt.
Fix (Claude Code):
claude mcp remove subtensor
claude mcp add --transport http subtensor https://subtensor.com/mcpIf that doesn't work, clear the auth cache:
rm ~/.claude/mcp-needs-auth-cache.json Then restart Claude Code. This file is auto-recreated and only affects MCP auth caching.
Previously configured as "subtensor-docs"?
The server was renamed from subtensor-docs to subtensor. Remove the
old entry and re-add:
claude mcp remove subtensor-docs
claude mcp add --transport http subtensor https://subtensor.com/mcpMCP-Only Features
These tools are designed for AI assistants and don't have REST equivalents.
Domain Knowledge
High-level explanations designed for AI context windows.
subtensor_explain(topic="concept")
Explain Bittensor domain concepts with related chain items.
Concepts: staking, registration, weights, delegation, children, subnets, emissions, tempo, metagraph, dtao
subtensor_explain(topic="workflow")
Step-by-step instructions for common operations.
Example: "add-stake", "register-neuron-pow", "set-weights"
subtensor_list(category="workflows")
List all available workflows grouped by category.
Example AI Queries
Ask your AI assistant questions like:
"What events does SubtensorModule emit for staking?"
"How do I register a new subnet?"
"What storage items track neuron information?"
"Explain how delegation works in Bittensor"
"What errors can add_stake throw?"
Versioning
The API is versioned via URL path (/api/v1/). Non-breaking additions (new endpoints, optional fields) won't require version bumps.
When we ship a new version, we'll maintain old versions for at least 90 days. Subscribe to
our RSS feed for updates.