Ergo Blockchain MCP Server: Address & Transaction Analysis
Analyze Ergo addresses and transactions with an MCP server to check balances, view history, search tokens, perform forensics, and monitor network status.
npx -y @marctheshark3/ergo-mcpOverview
This MCP (Model Context Protocol) server provides a focused API for analyzing Ergo blockchain addresses and transactions. It consolidates on-chain data, indexing, and lightweight heuristics so developers and analysts can check balances, fetch transaction history, search tokens, and perform forensic queries without running a full explorer frontend. The server implements MCP endpoints to deliver contextual data to AI agents, dashboards, or automated tooling.
Designed for developers who need programmatic access to address-level and token-level insights, the server is useful for building monitoring systems, compliance tools, wallets, and investigation workflows. It can be run alongside an Ergo node or indexer and exposes HTTP endpoints for querying balances, histories, token metadata, and network status.
Features
- Query Ergo address balances and UTXO details
- Fetch transaction details and decoded inputs/outputs
- Token search by ID, name, or holder addresses
- Address and token history (chronological transactions)
- Forensic utilities: chain of custody tracing, transaction ancestry
- Network status and node/indexer health checks
- Lightweight API meant to be integrated with MCP-compatible agents and tools
Installation / Configuration
Requirements: Docker and Docker Compose or a Go/Node environment (depending on the distribution). Example steps below use Docker Compose for a quick local setup.
Clone the repository:
Create a configuration file (.env) based on the example:
PORT=8080
LOG_LEVEL=info
ERGO_NODE_URL=INDEXER_API_URL=
DATABASE_URL=
MCP_MAX_HISTORY=1000
Start with Docker Compose:
Or run locally (example Node/Go entrypoints may vary):
# If Node-based
# If Go-based
After startup, the API will be available at http://localhost:8080 (or the PORT you set).
Available Resources
The server exposes REST endpoints useful for integration and automation. Below is a concise reference of commonly used endpoints:
| Endpoint | Method | Description |
|---|---|---|
| /mcp/address/{address} | GET | Get balance, UTXOs, and summary for an Ergo address |
| /mcp/address/{address}/history | GET | Paginated transaction history for the address |
| /mcp/tx/{txid} | GET | Full transaction details (inputs, outputs, tokens) |
| /mcp/token/{tokenId} | GET | Token metadata and holders snapshot |
| /mcp/search | GET | Search across addresses/tokens/tx (q=…) |
| /mcp/forensic/trace | POST | Trace transaction ancestry or address link graph |
| /mcp/status | GET | Server, node and indexer health/status |
Example curl calls:
# Address summary
# Transaction details
# Token lookup
The repository includes (or can be extended with) an OpenAPI/Swagger spec and a Postman collection for rapid testing.
Use Cases
Balance monitoring for wallets: poll /mcp/address/{address} to detect incoming/outgoing funds and generate alerts when thresholds are crossed. Example: run a cron job to watch a set of addresses and push notifications when unspent outputs appear.
Token discovery and portfolio aggregation: use /mcp/token/{tokenId} and address endpoints to build holder lists and aggregate token balances for portfolio UIs.
Forensic investigation: trace a suspicious transaction chain with /mcp/forensic/trace to construct a provenance graph of inputs and related addresses. Example workflow:
- GET /mcp/tx/{txid} to retrieve tx inputs.
- POST /mcp/forensic/trace with a list of txids/addresses to return ancestor transactions and hops up to a configured depth.
Building a lightweight block explorer or search index: combine /mcp/search and /mcp/tx endpoints to power web search boxes and transaction detail pages without re-indexing everything locally.
Network and indexer monitoring: poll /mcp/status to verify node connectivity and indexing lag, enabling operational dashboards and incident detection.
Getting Help & Extensibility
- Source code and issues: https://github.com/marctheshark3/ergo-mcp
- Use the OpenAPI/Swagger file (if included) to generate client SDKs for your language of choice.
- The server is intended to be modular: adapters can be added to pull data from different indexers or to persist enriched contexts into a database for faster querying.
If you are integrating MCP agents or developing automation around Ergo analytics, this server provides a compact, API-first foundation to retrieve the contextual information those agents require.