Labsco
MCP SERVER

MCP Mempool

by jaducku

Bitcoin network data from mempool.space — live WebSocket subscriptions plus REST lookups in one server.

Chain State, Explorers & Contract Tooling
Summary
Subscriptions are the part you cannot get from a REST wrapper.

Most Bitcoin servers stop at lookups, which answers what is true now but not what changed. Keeping a WebSocket open — with reconnect intervals and ping timeouts as settings rather than assumptions — lets an agent be told when a block lands or when a watched address moves. The lookup tools then answer the follow-up. No key means nothing to provision before trying it, and no quota to blow through.

What it is

A wrapper over both halves of mempool.space: the WebSocket feed for anything live and the REST API for anything you look up. That means an assistant can subscribe to new blocks or watch an address in real time, and separately query balances, UTXOs, transactions and fee recommendations — without you running a Bitcoin node.

What you get
  • `subscribe_blocks`, `subscribe_mempool_blocks` and `subscribe_stats` stream new blocks, the expected next block template and mempool statistics
  • `track_address` watches a specific address for activity, and `subscribe_live_chart` streams fee movement
  • `get_address_info`, `get_address_balance`, `get_address_utxos` and `get_address_transactions` cover an address by query
  • `get_transaction_info`, `get_block_info` and `get_block_height` return transaction and block detail
  • `get_recommended_fees` and `get_mempool_info` report what a transaction should pay right now
  • `get_connection_status` and `unsubscribe_client` manage the live subscriptions
  • `validate_bitcoin_address` checks an address is well formed before you use it
Requirements

Python 3.11+, or the supplied Docker Compose setup — `docker-compose up mcp-mempool-prod` brings it up on port 8000. Locally, `uv sync` then `uv run python -m mempool_ws_mcp_server.main` (package `mcp-mempool`, version 0.1.0). No account and no API key: it reads the public mempool.space endpoints, configurable through `MEMPOOL_WS_URL` and `MEMPOOL_API_URL`. Reconnection interval, ping timing and retry counts are all environment variables.