MCP Setup

Connect any AI agent to Bitcoin blockchain data in under 60 seconds. Real-time fees, blocks, mempool, transactions, and mining stats — all through the Model Context Protocol.


What is MCP?

The Model Context Protocol is an open standard that lets AI agents call external tools during a conversation. Instead of copying and pasting data into a chat window, MCP gives your agent direct access to live APIs — structured, typed, and on-demand.

Without MCP

You manually look up fees on a block explorer, copy the numbers, paste them into your AI chat, and ask for analysis. Every query is a round-trip through your clipboard.

With MCP

You ask "Should I send Bitcoin now or wait?" and your agent automatically queries live fee data, analyzes mempool congestion, and gives you an answer with real numbers.


Zero-Config Setup

bitcoin-mcp auto-detects a local Satoshi API instance. If no local node is found, it falls back to the hosted endpoint at bitcoinsapi.com. No Bitcoin Core installation required to get started.

1. Install

Terminal
pip install bitcoin-mcp

2. Configure your AI client

Add this to your Claude Desktop config (claude_desktop_config.json):

claude_desktop_config.json
{
  "mcpServers": {
    "bitcoin": {
      "command": "bitcoin-mcp"
    }
  }
}

Config location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).

3. Start asking questions

You:  What are current Bitcoin fees? Should I send now or wait?

Agent: Let me check the fee environment.
[Calling get_recommended_fees...]
[Calling get_fee_landscape...]

Current fees are 12 sat/vB for high priority. The mempool is
clearing steadily — good time to send at medium priority (8 sat/vB)
for confirmation within ~30 minutes.

That's it. No API key, no node, no configuration files to edit.

bitcoin-mcp ships ready to use. It discovers tools automatically and falls back to the hosted Satoshi API when no local node is running. You can point it at your own node later for full sovereignty.


Client Configuration

bitcoin-mcp works with any MCP-compatible AI client. Here are configs for the most popular ones.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "bitcoin": {
      "command": "bitcoin-mcp"
    }
  }
}

Claude Code (CLI)

Terminal
claude mcp add bitcoin -- bitcoin-mcp

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "bitcoin": {
      "command": "bitcoin-mcp"
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "bitcoin": {
      "command": "bitcoin-mcp"
    }
  }
}

Available Tools

43+ tools your AI agent can call. Each returns structured JSON with a consistent {data, meta} envelope.

Fee Intelligence

Know when to send and how much to pay.

get_fee_estimates
Multi-target fee rates
get_fee_recommendation
Send now or wait?
estimate_transaction_cost
Cost for your tx shape
compare_fee_estimates
Fee trends over time

Block Analysis

Inspect any block in the chain.

analyze_block
Full block breakdown
get_block_stats
Statistical summary
compare_blocks
Side-by-side comparison
search_blocks
Find blocks by criteria

Mempool & Transactions

Real-time mempool state and transaction details.

analyze_mempool
Congestion & distribution
analyze_transaction
Decode any tx
analyze_next_block
What's about to confirm
get_mempool_entry
Single tx in mempool

Network & Mining

Hashrate, difficulty, peers, and chain state.

get_mining_info
Hashrate & difficulty
get_difficulty_adjustment
Next retarget
get_blockchain_info
Chain state overview
get_halving_countdown
Blocks to next halving

More Tools

get_btc_price
get_supply_info
validate_address
check_utxo
decode_raw_transaction
explain_script
generate_keypair
get_node_status
get_market_sentiment
get_peer_info
decode_bolt11_invoice
get_situation_summary

Full tool reference: github.com/Bortlesboat/bitcoin-mcp


With a Local Node

For full sovereignty and privacy, connect bitcoin-mcp to your own Bitcoin Core node through Satoshi API. No third party sees your queries.

1. Install and run Satoshi API

Terminal
pip install satoshi-api
export BITCOIN_RPC_USER=your_user
export BITCOIN_RPC_PASSWORD=your_password
satoshi-api

2. Point bitcoin-mcp at your node

claude_desktop_config.json
{
  "mcpServers": {
    "bitcoin": {
      "command": "bitcoin-mcp",
      "env": {
        "SATOSHI_API_URL": "http://localhost:9332"
      }
    }
  }
}

Self-hosted = full privacy

When you run your own node, all blockchain queries stay on your machine. Satoshi API provides a read-only REST layer over Bitcoin Core's RPC — the AI agent never touches your node directly. Rate limiting, input validation, and auth are built in.


REST API Fallback

Don't need MCP? All the same data is available as standard HTTP endpoints. The Satoshi API also exposes a JSON-RPC proxy at /api/v1/rpc for direct Bitcoin Core method calls.

Fee estimates
curl https://bitcoinsapi.com/api/v1/fees/recommended
Latest block
curl https://bitcoinsapi.com/api/v1/blocks/latest
JSON-RPC proxy
curl -X POST https://bitcoinsapi.com/api/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"method": "getblockcount"}'

Full interactive API docs at /docs. No API key required for GET endpoints.


Try It Now

Explore Bitcoin data right in your browser, or install bitcoin-mcp and start asking questions.


bitcoin-mcp and Satoshi API are open source under the Apache-2.0 License. The hosted endpoint at bitcoinsapi.com is provided as-is for development and evaluation. For production use, self-hosting is recommended. By using this service you agree to the Terms of Service and Privacy Policy.