Content
# RustChain MCP Tool - Wallet Balance Checker
A simple Model Context Protocol (MCP) tool that queries RTC wallet balance from RustChain blockchain.
## Task
- **Bounty**: #1602 - Create an MCP tool that interacts with RustChain
- **Value**: 5 RTC
- **Status**: ✅ Complete
## Features
- Query RTC wallet balance by miner ID
- Returns balance in both RTC and i64 (smallest unit)
- Simple JSON output
- MCP-compatible tool definition
## Usage
### Command Line
```bash
python3 rustchain_balance_tool.py <miner_id>
# Example
python3 rustchain_balance_tool.py Dlove123
```
### Output
```json
{
"success": true,
"miner_id": "Dlove123",
"balance_rtc": 1.0,
"balance_i64": 1000000
}
```
### MCP Integration
```python
from rustchain_balance_tool import mcp_tool_definition, execute_tool
# Get tool definition
tool_def = mcp_tool_definition()
# {"name": "rustchain_balance", "description": "...", "inputSchema": {...}}
# Execute tool
result = execute_tool({"miner_id": "Dlove123"})
```
## MCP Tool Schema
```json
{
"name": "rustchain_balance",
"description": "Query RTC wallet balance from RustChain blockchain",
"inputSchema": {
"type": "object",
"properties": {
"miner_id": {
"type": "string",
"description": "RustChain miner ID to query"
}
},
"required": ["miner_id"]
}
}
```
## API Endpoint
- **URL**: https://50.28.86.131/wallet/balance
- **Method**: GET
- **Parameter**: miner_id
## License
MIT
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...
valuecell
Valuecell is a Python project for efficient data management.
Train-in-Silence
The first Task-Aware MCP server and automated VRAM calculator for LLM...
stacklit
108,000 lines of code. 4,000 tokens of index. One command makes any repo...
AppClaw
AI-powered mobile automation agent — describe what you want in plain...