Substrate MCP Server
About
A Model Context Protocol (MCP) server for Substrate blockchains, written in Rust and interfacing the subxt crate.
Details
- Author
- ThomasMarches
- GitHub stars
- 13
- Downloads
- 340
- Categories
- Developer Tools, Other
Jump to
- Query account balances and storage dynamically
- List pallets and their storage entries
- Fetch and filter events and extrinsics
- Submit and watch dynamic signed transactions
- Access system and block information
- Make custom RPC calls to Substrate nodes
Clone the repository, place a runtime metadata file at artifacts/metadata.scale, create a .env file with RPC_URL and SIGNING_KEYPAIR_HEX variables, then build with cargo build --release and run with cargo run --release. The server communicates via stdio. Integrate with Cursor by adding the binary path to .cursor/mcp.json.
Substrate MCP Server
A Model Context Protocol (MCP) server for Substrate blockchains, written in Rust. This project exposes dynamic Substrate blockchain operations (querying balances, blocks, pallets, storage, events, and more) via the MCP protocol, and is fully configurable via environment variables.
Designed to interface with the subxt crate.
✨ Features
- Query account balances and storage dynamically
- List pallets and their entries
- Fetch and filter events and extrinsics
- Submit and watch dynamic signed transactions
- Access system and block information
- Custom RPC calls to Substrate nodes
🚀 Potential Use Cases
1. AI-Driven Blockchain Operations
- Integrate with LLMs (like Cursor or Claude) to allow users to ask questions in natural language (e.g., "What was the last transfer from Alice?"), which are translated into MCP tool calls.
- Build a chatbot that can answer questions, fetch balances, or explain on-chain activity using your MCP server as the backend.
- Use the MCP server to provide live updates on-chain activity, such as balance changes or transaction statuses, to development tools like VSCode, Cursor, Claude Code, etc.
2. Custom Dashboards and Monitoring
- Create custom dashboards and monitoring systems for your Substrate blockchain
- Display real-time data and analytics on your blockchain operations
- Set up alerts and notifications for critical events
- Use AI agents to detect suspicious activity by analyzing events and extrinsics in real time.
🛠️ Requirements
- Rust
- Access to a Substrate node endpoint (WebSocket)
- A valid signing keypair (as hex)
- Runtime metadata file for your target chain (see below for naming and placement)
📦 Installation
Clone the repository and build:
git clone https://github.com/ThomasMarches/substrate-mcp-rs.git
cd substrate-mcp-rs
cargo build --release
⚙️ Configuration
Create a .env file in the project root with the following variables:
```env
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





