rustchain-mcp-server

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.

Category
Visit Server

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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured