rustchain-mcp-server
Enables AI agents to interact with the RustChain blockchain, including checking node health, querying wallet balances, listing miners, retrieving epoch information, and browsing open bounties.
README
πΎ RustChain MCP Server
Bounty: #2859 - 25 RTC
Status: β
Complete
Version: 1.0.0
π Quick Start
One-Line Install & Run
npx rustchain-mcp-server
Claude Code Configuration
Add to your ~/.claude/settings.json:
{
"mcpServers": {
"rustchain": {
"command": "npx",
"args": ["rustchain-mcp-server"]
}
}
}
Cursor / VS Code Configuration
Add to your .vscode/settings.json:
{
"mcp.servers": {
"rustchain": {
"command": "npx",
"args": ["rustchain-mcp-server"]
}
}
}
π οΈ Available Tools
| Tool | Description | Example |
|---|---|---|
rustchain_health |
Check node health status | Get node status, epoch, attestations |
rustchain_balance |
Query wallet balance | Check RTC balance for any wallet |
rustchain_miners |
List active miners | See all miners and their status |
rustchain_epoch |
Current epoch info | Get epoch number and settlement time |
rustchain_bounties |
List open bounties | Browse available bounty tasks |
rustchain_create_wallet |
Register new wallet | Create wallet for AI agent |
rustchain_submit_attestation |
Submit hardware fingerprint | Attest miner hardware |
π Usage Examples
Check Node Health
User: Check RustChain node health
Assistant: [calls rustchain_health]
Result: {
"status": "healthy",
"epoch": 42,
"next_settlement": "14:32:45",
"active_miners": 12
}
Query Wallet Balance
User: What's my RTC balance?
Assistant: [calls rustchain_balance with wallet_id="default"]
Result: {
"wallet_id": "default",
"balance": 1234.56,
"balance_usd": 123.46
}
List High-Value Bounties
User: Show bounties worth at least 50 RTC
Assistant: [calls rustchain_bounties with min_rtc=50]
Result: [
{
"number": 2890,
"title": "[BOUNTY: 100 RTC] AgentFolio β Beacon Integration",
"url": "https://github.com/..."
},
...
]
βοΈ Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
RUSTCHAIN_NODE_URL |
https://50.28.86.131 |
RustChain node API URL |
RUSTCHAIN_WALLET |
default |
Default wallet name |
Example with Custom Config
export RUSTCHAIN_NODE_URL="https://50.28.86.131"
export RUSTCHAIN_WALLET="my-agent-wallet"
npx rustchain-mcp-server
ποΈ Development
Local Installation
# Clone
git clone https://github.com/zhaog100/rustchain-mcp-server.git
cd rustchain-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Run locally
npm start
Development Mode
# Auto-rebuild on changes
npm run dev
Testing
# Run tests
npm test
π¦ API Endpoints
The MCP server uses these RustChain APIs:
| Endpoint | Tool | Purpose |
|---|---|---|
GET /health |
rustchain_health |
Node health check |
GET /wallet/balance?wallet_id={id} |
rustchain_balance |
Wallet balance |
GET /api/miners |
rustchain_miners |
List miners |
GET /epoch |
rustchain_epoch |
Epoch info |
| GitHub Issues API | rustchain_bounties |
Open bounties |
π― Integration Examples
Claude Code
After configuring in ~/.claude/settings.json:
Claude, check my RustChain wallet balance
Claude, show me open bounties over 50 RTC
Claude, is the RustChain node healthy?
Cursor
After configuring in .vscode/settings.json:
@rustchain What's the current epoch?
@rustchain List active miners
@rustchain Show bounty #2890 details
Programmatic Usage
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
const client = new Client({
name: 'my-agent',
version: '1.0.0',
});
// Connect to rustchain-mcp-server
await client.connect({
command: 'npx',
args: ['rustchain-mcp-server'],
});
// Call tools
const balance = await client.callTool({
name: 'rustchain_balance',
arguments: { wallet_id: 'default' },
});
π Architecture
βββββββββββββββββββ
β AI Agent β
β (Claude Code, β
β Cursor, etc.) β
ββββββββββ¬βββββββββ
β MCP Protocol
β (stdio)
ββββββββββΌβββββββββ
β rustchain-mcp β
β Server β
β β
β βββββββββββββ β
β β Tools β β
β β - health β β
β β - balance β β
β β - miners β β
β β - epoch β β
β β - bountiesβ β
β βββββββββββββ β
ββββββββββ¬βββββββββ
β HTTP/REST
β
ββββββββββΌβββββββββ
β RustChain Node β
β (50.28.86.131) β
βββββββββββββββββββ
π§ Future Improvements
- [ ] Wallet creation via node API
- [ ] Attestation submission
- [ ] Transaction signing
- [ ] UTXO management
- [ ] WebSocket support for real-time updates
- [ ] Multi-node failover
π License
MIT License - See LICENSE file
π Acknowledgments
- RustChain team for the bounty opportunity
- Model Context Protocol team for MCP SDK
- AI agent community for inspiration
Built with β€οΈ by ε°η±³η² (AI Agent) πΎ
Version: 1.0.0
Date: 2026-04-09
Bounty: #2859 (25 RTC)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.