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 Code
claude mcp add --transport http subtensor https://subtensor.com/mcp
Cursor

Add to ~/.cursor/mcp.json:

{"mcpServers":{"subtensor":{"type":"http","url":"https://subtensor.com/mcp"}}}
Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{"mcpServers":{"subtensor":{"type":"http","url":"https://subtensor.com/mcp"}}}
ChatGPT (Custom GPT)

In GPT Builder → Actions → Import from URL:

https://subtensor.com/openapi.yaml
Any AI (no setup needed)

Just use the REST API directly:

https://subtensor.com/api/v1/subtensor/search?q=stake

REST API

Standard HTTP endpoints for any language. Perfect for scripts, apps, and custom integrations.

https://subtensor.com/api/v1/subtensor

MCP (AI Agents)

Direct integration via Model Context Protocol. Works with Claude, Cursor, Windsurf.

https://subtensor.com/mcp

Quick 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.

DataREST EndpointMCP Tool
List pallets/palletssubtensor_list(category="pallets")
Get pallet/pallets/{name}subtensor_lookup(type="pallet")
List events/eventssubtensor_list(category="events")
Get event/events/{key}subtensor_lookup(type="event")
List calls/callssubtensor_list(category="calls")
Get call/calls/{key}subtensor_lookup(type="call")
List storage/storagesubtensor_list(category="storage")
Get storage/storage/{key}subtensor_lookup(type="storage")
List constants/constantssubtensor_list(category="constants")
Get constant/constants/{key}subtensor_lookup(type="constant")
List errors/errorssubtensor_list(category="errors")
Get error/errors/{key}subtensor_lookup(type="error")
Search/search?q=...subtensor_search
Get type/types/{name}subtensor_lookup(type="type")
Get changelog/changelogs/{pallet}subtensor_explore(topic="changelog")
Related items/related/{type}/{key}subtensor_explore(topic="relationships")
Removed items/removedsubtensor_explore(topic="removed")
RPC methods/rpc-methods/{name}subtensor_lookup(type="rpc_method")
List pallets

All 28 pallets with item counts

REST: /pallets
MCP: subtensor_list(category="pallets")
Get pallet

Pallet details including all item names

REST: /pallets/{name}
MCP: subtensor_lookup(type="pallet")
List events

All events across pallets

REST: /events
MCP: subtensor_list(category="events")
Get event

Event arguments, version history, emitting calls

REST: /events/{key}
MCP: subtensor_lookup(type="event")
List calls

All calls/extrinsics across pallets

REST: /calls
MCP: subtensor_list(category="calls")
Get call

Call parameters, events emitted, storage modified

REST: /calls/{key}
MCP: subtensor_lookup(type="call")
List storage

All storage items across pallets

REST: /storage
MCP: subtensor_list(category="storage")
Get storage

Storage keys, value type, modifying calls

REST: /storage/{key}
MCP: subtensor_lookup(type="storage")
List constants

All runtime constants with values

REST: /constants
MCP: subtensor_list(category="constants")
Get constant

Constant type, value, description

REST: /constants/{key}
MCP: subtensor_lookup(type="constant")
List errors

All pallet errors with descriptions

REST: /errors
MCP: subtensor_list(category="errors")
Get error

Error details, throwing calls, resolution hints

REST: /errors/{key}
MCP: subtensor_lookup(type="error")
Search

Full-text search across all items

REST: /search?q=...
MCP: subtensor_search
Get type

Type definition (fields, variants, inner types)

REST: /types/{name}
MCP: subtensor_lookup(type="type")
Get changelog

Version history with additions, removals, modifications

REST: /changelogs/{pallet}
MCP: subtensor_explore(topic="changelog")
Related items

Item relationships (calls→events→storage)

REST: /related/{type}/{key}
MCP: subtensor_explore(topic="relationships")
Removed items

Items removed from runtime (migration guides)

REST: /removed
MCP: subtensor_explore(topic="removed")
RPC methods

JSON-RPC method details (params, returns, flags)

REST: /rpc-methods/{name}
MCP: 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.

C

Claude

MCP

Claude 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

MCP

Add to your Cursor MCP config:

{
  "mcpServers": {
    "subtensor": {
      "type": "http",
      "url": "https://subtensor.com/mcp"
    }
  }
}

Config: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project)

W

Windsurf

MCP

Add to your Windsurf MCP config:

{
  "mcpServers": {
    "subtensor": {
      "serverUrl": "https://subtensor.com/mcp"
    }
  }
}

Config: ~/.codeium/windsurf/mcp_config.json

G

ChatGPT (GPT Actions)

OpenAPI

Create a custom GPT with Subtensor documentation access:

  1. 1. Open GPT Builder and go to "Configure"
  2. 2. Click "Create new action"
  3. 3. Import from URL: https://subtensor.com/openapi.yaml
  4. 4. Test and save

Code Examples

Python
import requests

response = requests.get(
    "https://subtensor.com/api/v1/subtensor/search",
    params={"q": "stake"}
)
print(response.json())
TypeScript
const response = await fetch(
  "https://subtensor.com/api/v1/subtensor/search?q=stake"
);
const data = await response.json();
console.log(data);
cURL
# 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/mcp

If 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/mcp

MCP-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.