Mempool.space MCP server

Integrates with mempool.space APIs to provide real-time Bitcoin network data including transaction details, block information, address balances, mining statistics, and fee recommendations for developers and traders.
Back to servers
Setup instructions
Provider
Alexandre Sanlim
Release date
Jul 24, 2025
Stats
2 stars

This server provides a Model Context Protocol (MCP) implementation for accessing real-time Bitcoin blockchain and mempool data through mempool.space APIs. It allows AI assistants and other MCP-compatible clients to query Bitcoin network information directly.

Installation

You can use this MCP server in two ways:

Using NPX (Recommended)

The simplest way to use the server is by configuring it as a tool provider in your MCP-compatible client (such as Claude or Cursor):

"mempool-mcp-server": {
  "command": "npx",
  "args": [
    "@sanlim/mempool-mcp-server"
  ]
}

Local Connection for Privacy and Unlimited Calls

For privacy and unlimited API calls, you can connect to your local Bitcoin node:

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

Manual Installation

If you prefer to build from source:

  1. Clone the repository:
git clone https://github.com/alexandresanlim/mempool-mcp-server.git
  1. Install dependencies and build:
npm install
npm run build
npm run server
  1. Configure your MCP client:
"mempool-mcp-server-debug": {
  "command": "node",
  "args": [
    "/path/to/mempool-mcp-server/build/main.js"
  ]
}

Available Tools

The server provides numerous Bitcoin-related tools that you can use in your MCP client:

Network Information

  • 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

Mining Information

  • 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

Mempool Information

  • get-mempool-info - Get mempool info
  • get-mempool-txids - Get mempool txids
  • get-mempool-recent - Get recent mempool transactions

Block Information

  • 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

Address Information

  • 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

Transaction Information

  • 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

Troubleshooting

  • For the full API reference, visit mempool.space API docs
  • If you encounter issues, ensure your build is up to date and your MCP client is configured to use standard input/output
  • You can verify your connection is working by asking your AI assistant to check the "mempool url"

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mempool-mcp-server" '{"command":"npx","args":["@sanlim/mempool-mcp-server"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mempool-mcp-server": {
            "command": "npx",
            "args": [
                "@sanlim/mempool-mcp-server"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mempool-mcp-server": {
            "command": "npx",
            "args": [
                "@sanlim/mempool-mcp-server"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later