Listing pallets and their storage entries at runtime means an agent can discover what a chain offers instead of being told. The cost is the setup: the metadata file has to be exported and placed correctly before the build, and the server holds a signing key that can submit transactions — so give it a key whose account you are willing to see spend.
A Rust MCP server for Substrate-based blockchains, built on the subxt crate. It reads chain state dynamically from the runtime metadata rather than against a fixed set of pallets, so the same binary works with whatever chain you point it at — and it can sign and submit extrinsics as well as read.
- An account's balance and arbitrary storage read by pallet and entry — `query_balance`, `query_storage`
- The runtime explored rather than assumed: every pallet, and every storage entry within one — `list_pallets`, `list_pallet_entries`
- Events and extrinsics from the latest block, or specific events found by pallet and variant — `get_latest_events`, `find_events`, `find_extrinsics`
- Block detail by height or by hash — `get_latest_block`, `get_block_by_hash`
- A runtime API call executed dynamically, and system information over RPC — `dynamic_runtime_call`, `get_system_info`
- A signed transaction constructed, signed and sent — `send_dynamic_signed_transaction`
- Any other RPC call the node exposes — `custom_rpc`
Rust, and three things specific to your chain. A WebSocket node endpoint in `RPC_URL`. A signing keypair as hex in `SIGNING_KEYPAIR_HEX` — the secret seed from `subkey generate --scheme Sr25519 --output-type Json`, with the `0x` prefix stripped. And the runtime metadata exported to `artifacts/metadata.scale` with `subxt metadata -f bytes` before you build: the build fails if the file is missing or misnamed. Then `cargo build --release` and point your client at the binary; it serves over stdio.
