Content
# 🦞 RustChain MCP Server
Query the RustChain blockchain directly from Claude Code or any MCP-compatible client.
## 🚀 Quick Start
### Installation
```bash
# Clone or download this repository
cd rustchain-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Register with Claude Code
claude mcp add rustchain -- npx rustchain-mcp-server
```
### Usage in Claude Code
Once registered, you can use RustChain tools directly:
```
@rustchain Check my balance at 0x123...
@rustchain What's the current epoch?
@rustchain Show me active miners
@rustchain Check node health
```
## 🛠️ Available Tools
### Required Tools
| Tool | Description | Parameters |
|------|-------------|------------|
| `rustchain_balance` | Get wallet balance | `address` (string) |
| `rustchain_miners` | List active miners | `limit` (number, default: 10) |
| `rustchain_epoch` | Get current epoch info | none |
| `rustchain_health` | Check node health | none |
| `rustchain_transfer` | Transfer RTC tokens | `from`, `to`, `amount`, `privateKey` |
### Bonus Tools
| Tool | Description | Parameters |
|------|-------------|------------|
| `rustchain_ledger` | Get ledger entries | `limit`, `offset` |
| `rustchain_register_wallet` | Register new wallet | `address` |
| `rustchain_bounties` | Get active bounties | `status` (open/closed/all) |
## 🔧 Configuration
### Node Configuration
The server uses a primary node with automatic fallback:
- **Primary:** `https://50.28.86.131`
- **Fallback 1:** `https://node2.rustchain.io`
- **Fallback 2:** `https://node3.rustchain.io`
### Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `RUSTCHAIN_PRIMARY_NODE` | `https://50.28.86.131` | Primary RPC node |
| `RUSTCHAIN_FALLBACK_NODES` | (see above) | Comma-separated fallback nodes |
## 📋 Example Sessions
### Check Balance
```
User: What's the balance of 0xABC123...?
Assistant: [calls rustchain_balance]
The balance of 0xABC123... is 1,234.56 RTC.
```
### Check Node Health
```
User: Is RustChain healthy?
Assistant: [calls rustchain_health]
✅ Primary node (50.28.86.131): healthy (45ms)
✅ Fallback 1: healthy (120ms)
⚠️ Fallback 2: unhealthy (timeout)
```
### Transfer Tokens
```
User: Send 100 RTC to 0xDEF456...
Assistant: [calls rustchain_transfer with user's wallet]
Transaction submitted: 0x789abc... (pending confirmation)
```
## 🔒 Security Notes
- **Private keys** are never stored by this server
- **Transfer operations** require explicit user authorization
- **Read-only tools** (balance, miners, epoch, health) don't require authentication
## 🧪 Testing
```bash
# Run in development mode
npm run dev
# Test a specific tool
echo '{"method":"tools/call","params":{"name":"rustchain_health"}}' | npm run dev
```
## 📦 Development
```bash
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
```
## 🤝 Contributing
This is a bounty implementation for RustChain. See issue #1152 for details.
## 📄 License
MIT
---
**Bounty:** #1152 - 75-100 RTC
**Author:** Lobster Bot
**Date:** 2026-03-14
Connection Info
You Might Also Like
Vibe-Trading
Vibe-Trading: Your Personal Trading Agent
ai-berkshire
Berkshire in the AI Era: A Value Investment Research Framework Based on...
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
valuecell
Valuecell is a Python project for efficient data management.
tradingview-mcp
AI-assisted TradingView chart analysis — connect Claude Code to your...
tradingview-mcp
TradingView MCP Server offers real-time market analysis for crypto and stocks.