bittensor-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bittensor-mcp Which subnets have the most TAO in their pools?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bittensor-mcp
A read-only MCP server for the Bittensor chain. It runs over stdio and is built on the official mcp Python SDK (2.3)
and the bittensor 11.3 SDK.
The server never loads a wallet and does not expose any transaction. It cannot sign, stake, transfer or register.
Install
Python 3.10 to 3.14. Install it into its own environment; it pins exact versions of its dependencies.
python3 -m venv ~/bittensor-mcp-env
~/bittensor-mcp-env/bin/pip install bittensor-mcp
~/bittensor-mcp-env/bin/bittensor-mcp --versionThe latest code from GitHub instead: pip install git+https://github.com/smartguy0505/bittensor-mcp.git.
bittensor-mcp is the server. An MCP client starts it and talks to it over stdin/stdout; it takes no arguments
besides --version and --help, and is configured with environment variables (see Config).
Related MCP server: nockchain-mcp
Tools
tool | what it returns |
| Head block, finalized block, runtime spec version, block time, chain timestamp |
| Every subnet as one table: name, symbol, alpha spot price, burn, neurons, tempo, the chain's TAO flow EMA per day (with its age; see below), and the pool ( |
| One subnet: identity, owner, pool (tao_in, alpha_in, alpha_out), spot and moving price, registration settings, epoch position, all hyperparameters, neuron counts |
| A subnet's neurons as a columns + rows table: incentive, dividends, emission, stake, registration, last update, optional axon. Sort, page, filter by validators/miners/coldkey. |
| One neuron by uid or hotkey, with its rank by incentive and by stake |
| For a coldkey: free balance, stake positions, stake valued in TAO, owned hotkeys, identity |
| Owner coldkey, subnets and uids, delegate status and take, identity |
| The SDK's full catalog of about 100 named read-only queries (staking, delegation, locks, crowdloans, weights, commitments…), runnable by name |
Every tool takes an optional block: an absolute block number, or a negative number counted back from the head
(-7200 is about one day).
Examples
What a model calls for some common questions:
question | call |
Which subnets have the most TAO in their pools? |
|
Which subnets took in the most TAO over the last 7 days? |
|
Which subnets' alpha is priced highest? |
|
Top miners on subnet 19 by incentive |
|
Top validators on subnet 19 by stake |
|
Subnet 19's registration burn a week ago |
|
Units:
TAO amounts are plain numbers in TAO.
Alpha amounts are written
{"alpha": x, "netuid": n}.The metagraph's incentive, dividends and consensus are fractions from 0 to 1.
The
subnetresult has aunitsfield naming which fields were converted. Fields whose unit the chain doesn't label stay raw, inraw_rao_amounts.Plain integers returned by
readare raw chain units: rao = 1e-9 TAO or alpha, u16 fractions /65535, U64F64 /2**64.describe_readdocuments each one.
Historical reads are checked
Some public finney backends keep only recent state. Asked about an older block, they return storage defaults
instead of an error. So before any historical read, the server checks that System.Number at that block equals the
block.
If the head endpoint fails the check, the server retries on the archive endpoint.
If that also fails, the tool returns an error instead of wrong numbers.
Config (environment)
var | default | meaning |
|
| Head endpoint: |
|
| Archive endpoint used for historical reads |
|
| Cap on one result. Larger results are shortened and the cut is noted under |
|
| Log level: |
An unset or empty variable takes its default. A bad value (BT_MCP_MAX_CHARS that is not a whole number of at least
2000, an unknown log level) stops the server at start with one line on stderr naming the variable.
A small cap shortens more than table rows. Below about 4,000, the subnet record loses fields, and at 2,000 a
net_flow table also loses the last keys of its net_flow block. Each cut is listed under truncated.
From a checkout, and tests
git clone https://github.com/smartguy0505/bittensor-mcp.git && cd bittensor-mcp
python3 -m venv .venv && .venv/bin/pip install -e .
.venv/bin/python -I -m unittest discover -s tests # offline, no network
.venv/bin/python -I test_client.py # against the live chainIn a checkout, .venv/bin/python -I server.py also starts the server, without the package being installed (its
dependencies are). test_client.py --cmd ~/bittensor-mcp-env/bin/bittensor-mcp runs the live checks against an
installed command instead.
tests/test_offline.py checks the helpers, and Chain and the subnets tool with fakes, without a network.
test_client.py opens a real stdio MCP session and checks:
the handshake;
every tool;
the error paths;
a historical read 3,000,000 blocks back;
windowed net flow: window bounds, every row measured or excluded with a reason, sort order, the root split, and the error for a window before genesis;
a sweep of 94 of the 102 catalog reads.
Use with Claude Code
# sessions started in the current folder
claude mcp add bittensor -- ~/bittensor-mcp-env/bin/bittensor-mcp
# every session
claude mcp add -s user bittensor -- ~/bittensor-mcp-env/bin/bittensor-mcp
# undo (run in the same folder, or use -s user)
claude mcp remove bittensor -s localFrom a checkout, register /path/to/bittensor-mcp/.venv/bin/python -I /path/to/bittensor-mcp/server.py instead.
Registrations made that way before the package existed keep working.
The tools appear as mcp__bittensor__<tool>. Each session starts its own server process, about 88 MB idle. It opens
no chain connection until a tool is called.
Known chain/SDK gaps
The TAO flow EMA is frozen. On spec 493 (checked 2026-11-23 at block ~9,569,876), no subnet's
SubtensorModule.SubnetEmaTaoFlow had been updated after block 8,466,530, about 153 days earlier. For netuids 51 and 64,
the value was the same at each daily checkpoint across the 7 days before that check.
The
subnetstool'stao_flow_per_day, and the catalog readsubnet_tao_flows, return that old value.The
subnetsresult, and the result ofread("subnet_tao_flows"), carrytao_flow_emawith the last-update block and age, and a warning when the EMA is more than a day old. The server's instructions tell clients the same, and point them to the windowed net flow.The per-block accumulator
SubnetTaoFlow(stakes minus unstakes, in rao) is still written. For netuids 51 and 64 it showed no reset across those 7 days. Its change between two blocks is the real net flow over that window.subnets(flow_window=N)reports it; see below.That accumulator change does not equal the change in the pool's
SubnetTAO, and the gap is unexplained.
On spec 493 (2026-11-23), the catalog read subnet_convictions fails with StorageFunctionNotFound. It named
SubtensorModule.DecayingOwnerLock in one run and SubtensorModule.OwnerLock in the next: the SDK asks for storage
the live runtime doesn't have. The tool returns that message as a normal error.
Windowed net flow (subnets with flow_window)
The tool reads SubnetTaoFlow, SubnetTAO, NetworkRegisteredAt and SubnetEmaTaoFlow at both ends of the
window. The end is pinned to one block number, so head reads don't drift. The start goes through the same
System.Number check as other historical reads.
New columns:
window_net_flow_tao: the counter's change, a total over the window, not per day.window_pool_change_tao: the change in the pool's TAO over the same window.
pool_tao, the pool's TAO at the end block, is in every subnets table since 0.1.1.
The envelope's net_flow gives the window, from_block, to_block, a definition, and excluded, which maps each
null row to its reason:
Root (netuid 0): it has no alpha pool, and its own counter's change can dwarf any subnet's (+24,051 TAO over the 7 days to block 9,569,858). So its figure is
root_net_flow_tao, and its row stays out of the ranking.Re-registered: the subnet registered inside the window, so the counter belongs to a different subnet.
Counter may have been reset: the EMA's update block changed inside the window. The runtime appears to reset the counter when it updates the EMA. This is inferred from four sampled archive blocks (8,466,520, 8,466,521, 8,466,522 and 8,466,529): the counters of netuids 51, 64 and 19 read 0 at each, and netuid 51's EMA had been updated in that same block. If the chain starts updating the EMA again, most rows will show this, and
tao_flow_per_daybecomes the measure to use.
Check (2026-11-23): at block 9,569,858 with 7,200- and 50,400-block windows, all 128 subnet rows matched an
earlier SDK script. That script reads the same counter with the same formula, so this checks the tool's code, not what
the counter means. A window that starts beyond finney's retention needs the archive endpoint. The public
endpoints rate-limit historical work, so long windows can fail with RpcPolicyError; the server returns that at
once, without asking again. A 1,200,000-block window (start before
the freeze) measured no rows, as intended: 104 were excluded for the EMA reason, the rest as root or re-registered.
License
MIT: see LICENSE. How to contribute: CONTRIBUTING.md.
Available Tools
10 toolsaccountARead-only
A coldkey's position: free TAO balance, every stake position (hotkey, subnet, alpha), the stake marked to TAO at spot prices, the hotkeys it owns, and its on-chain identity.
Inputs: coldkey (required), block.
chain_statusARead-only
Current chain head, finalized block, runtime spec version, block time and chain timestamp.
Inputs: no named parameters.
describe_readARead-only
Full documentation of one named read: description, parameter docs, units and docs URL.
Inputs: name (required).
hotkeyCRead-only
A hotkey's owner coldkey, the subnets it is registered on (with its uid on each), delegate status and take, and identity.
Inputs: hotkey (required), block.
list_readsARead-only
The SDK's catalog of named read-only chain queries (about 100), grouped by category, with their parameters. Use describe_read for one read's full documentation, then read to run it.
Inputs: category.
metagraphARead-only
A subnet's neurons as a table (columns + rows), sorted (descending except uid/registered) and paged. Per neuron: uid, hotkey, coldkey, active, validator_permit, incentive / dividends / consensus (0..1), emission (alpha per epoch), alpha/tao/total stake, registration block, last weight update; optionally axon ip:port.
Inputs: netuid (required), block, limit, offset, +5 more.
neuronARead-only
One neuron on a subnet by uid or hotkey, with its rank by incentive and by stake among all neurons.
Inputs: netuid (required), uid, block, hotkey.
readARead-only
Run any named read from the SDK catalog (see list_reads / describe_read). Balance amounts are converted
(TAO number, or {"alpha", "netuid"}); plain integers are raw chain units (rao = 1e-9, u16 /65535, U64F64
/2**64) as describe_read documents. Large results are cut to the first limit items and to the size cap;
prefer the curated tools for metagraph-sized data.
Inputs: name (required), block, limit, params.
subnetARead-only
One subnet's state: identity, owner, pool (tao_in TAO, alpha_in/alpha_out), per-block emission, spot and moving price, registration (burn TAO, limits, immunity), weights settings, epoch position, all hyperparameters (raw encodings), and neuron counts. The result's "units" field says which fields are converted and which are raw chain integers.
Inputs: netuid (required), block.
subnetsARead-only
Every subnet as one table (columns + rows): name, token symbol, alpha spot price (TAO per alpha), registration burn (TAO),
neuron count, tempo, the chain's net TAO flow EMA (TAO per day; negative = net outflow), and the pool: pool_tao
and pool_alpha are its reserves (the subnet tool's tao_in and alpha_in), alpha_out is the subnet's alpha held
outside the pool. sort_by="pool" ranks by pool_tao; root (netuid 0) has no pool, so it comes last. The chain updates
that EMA lazily: tao_flow_ema in the result gives its last-update block and age, and warns when it is stale
(on spec 493 it has not moved since block 8,466,530), so check it before reading tao_flow_per_day as current.
With flow_window (or sort_by="net_flow"), it also measures the real net flow over a window of blocks: the change in the chain's stake-minus-unstake counter between the window's two ends, as a total in TAO, not per day. A subnet re-registered inside the window, or whose counter may have been reset there, gets null and a reason under net_flow.excluded.
Inputs: block, limit, sort_by, flow_window.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools map to a distinct resource (account, hotkey, subnet, subnets, metagraph, neuron) or a distinct step in the read workflow (list_reads → describe_read → read). The only real overlap is the generic `read` versus the curated tools, but the description explicitly tells the agent to prefer curated tools for large data, which resolves the boundary. The singular/plural pair `subnet`/`subnets` is distinguishable but easy to misclick on.
The set mixes verb_noun names (list_reads, describe_read, chain_status) with bare nouns (account, hotkey, read, subnets, subnet, metagraph, neuron). The noun names are resource-oriented and readable, and the read-workflow trio is consistent within itself, but `subnet` vs `subnets` and the bare verb `read` break any single predictable pattern.
Ten tools is well-scoped, and the ~100 SDK reads are collapsed into a three-tool gateway (list_reads / describe_read / read) instead of exploding the surface. Every tool corresponds to a real Bittensor concept an agent would need.
The curated surface covers the main read paths (chain head, account/stake positions, hotkeys, subnet state, metagraph, single neuron) and the generic `read` escape hatch prevents dead ends for niche queries. Gaps remain around historical/block-scoped data (extrinsics, past events, stake-flow history) and there is no write/staking surface, though the server appears intentionally read-only.
Maintenance
Related MCP Connectors
Read-only QIE chain data: balances, tx status, tokens, network facts. Chains 1990 and 1983. No keys.
Read-only BlockReq docs, EVM JSON-RPC, and on-chain DEX and wallet data
Read EVM and Solana chains for balances, tokens, eth_call, logs, receipts, gas, blocks and ENS.
Read-only market and on-chain data for Bitcoin, Ethereum and more; on-chain from our own nodes.
Related MCP Servers
AlicenseAqualityCmaintenanceProvides read-only, real-time access to TON blockchain data including wallet balances, token holdings, transactions, prices, NFTs, DNS resolution, and address validation, without requiring private keys.816 npmMIT- AlicenseNot gradedqualityCmaintenanceEnables agents to read Nockchain data through seven read-only tools, including accurate balance lookups, payment verification with confirmations, block and transaction inspection, and endpoint health monitoring. It resolves balances missed by the public address selector and avoids answering from stale nodes.Apache 2.0

QoreChain MCPofficial
AlicenseNot gradedqualityBmaintenanceGives AI agents and developer tools read access to a blockchain network's blocks, transactions, accounts, validators, staking tiers, contract reads and fee estimates, plus post-quantum signature status checks and unsigned transfers for the user's own wallet to sign. It never signs, holds keys, or broadcasts.Apache 2.0- AlicenseBqualityBmaintenanceEnables read-only access to public Star Atlas-inspired game data, profile key audits, DAO treasury/proposal/revenue/Ecosystem Fund information, and signed hub updates, listings, and claims through MCP tools, without signing or writing to any chain.22Apache 2.0