home / mcp / mempool mcp server

Mempool MCP Server

Mempool.space MCP server implementation to get info from Bitcoin with support for getting it on your local Bitcoin node such as Umbrel, MyNode and others.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "alexandresanlim-mempool-mcp-server": {
      "command": "npx",
      "args": [
        "@sanlim/mempool-mcp-server"
      ],
      "env": {
        "MEMPOOL_BASE_URL": "http://umbrel.local:3006/api"
      }
    }
  }
}

You can access real-time Bitcoin blockchain and mempool data through a compact MCP server that exposes a suite of tools via the Model Context Protocol. Run it locally or invoke it via your MCP client to query current network statistics, fees, price data, blocks, transactions, and more in real-time.

How to use

Launch the server as an MCP tool provider and connect your MCP client to its standard input/output interface. You can use it directly with an MCP client such as Claude, Cursor, or your own client to query Bitcoin network data through the available tools. To run locally, start the server using the provided commands and then configure your client to point at the local process.

Practical usage patterns you can follow include: querying the current difficulty and price data, fetching mempool information, retrieving block and transaction details, and obtaining UTXO and address-related information. Use these tools to build real-time dashboards, trading tooling, or monitoring that reacts to network conditions.

How to install

Prerequisites you need before installing are: a recent Node.js runtime and npm. The following steps show two common ways to run the MCP server: via npx for quick start and a local build for development.

# Quick start: use the MCP server via npx
"mempool-mcp-server": {
  "command": "npx",
  "args": [
    "@sanlim/mempool-mcp-server"
  ]
}

Optionally run a local build for development and full control over the runtime. The steps below assume you clone the project, install dependencies, build the project, and run the server from the built output.

git clone https://github.com/alexandresanlim/mempool-mcp-server.git
cd mempool-mcp-server
npm install
npm run build
npm run server

Additional configuration and notes

If you want to connect to a private or local mempool API, you can replace the default API endpoint by setting an environment variable when you run the server. For example, you can point to a local mempool API provided by a Bitcoin node or hosting environment.

Example local configuration for using a local mempool API in a client setup:

"mempool-mcp-server-local": {
  "command": "npx",
  "args": [
    "@sanlim/mempool-mcp-server"
  ],
  "env": {
    "MEMPOOL_BASE_URL": "http://umbrel.local:3006/api"
  }
}

Available tools

get-difficulty-adjustment

Get current and next Bitcoin difficulty adjustment info.

get-price

Get the current BTC price in various fiat currencies.

get-historical-price

Get the BTC price for a specific date (YYYY-MM-DD).

get-recommended-fees

Get recommended Bitcoin transaction fees.

get-stats-info

Get general Bitcoin network statistics.

get-mining-pools

Get mining pools info.

get-mining-pool

Get info for a specific mining pool.

get-mining-blocks-fees-24h

Get mining blocks fees for the last 24h.

get-mempool-info

Get mempool info.

get-mempool-txids

Get mempool txids.

get-mempool-recent

Get recent mempool transactions.

get-blocks

Get the latest blocks.

get-block

Get details about a block from its hash.

get-block-txids

Get txids for a block.

get-block-txs

Get transactions for a block.

get-block-status

Get block status.

get-block-raw

Get raw block hex.

get-block-txid-by-index

Get block txid by index.

get-block-header

Get the block header in hex.

get-address-info

Get details about an address.

get-address-txs

Get transactions for an address.

get-address-txs-chain

Get chain transactions for an address.

get-address-txs-mempool

Get mempool transactions for an address.

get-address-utxo

Get UTXOs for an address.

get-tx-info

Get details about a transaction.

get-tx-status

Get transaction status.

get-tx-raw

Get raw transaction hex.

get-tx-merkleblock-proof

Get transaction merkleblock proof.

get-tx-outspend

Get outspend info for a transaction output.

get-tx-outspends

Get outspends for all outputs of a transaction.