Skip to main content

MCP server for Bitcoin — 47 tools for AI agents to save money on fees. Zero config, works out of the box.

Project description

bitcoin-mcp

Give any AI agent Bitcoin superpowers — fee intelligence, mempool analysis, and 47 tools. Zero config, one command.

PyPI Downloads Tests License: MIT Python 3.10+

pip install bitcoin-mcp

Quick Start

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "bitcoin": {
      "command": "uvx",
      "args": ["bitcoin-mcp"]
    }
  }
}

Claude Code

claude mcp add bitcoin -- uvx bitcoin-mcp

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "bitcoin": {
      "command": "uvx",
      "args": ["bitcoin-mcp"]
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "bitcoin": {
      "command": "uvx",
      "args": ["bitcoin-mcp"]
    }
  }
}

Why bitcoin-mcp?

  • Fee intelligence that saves real money — know the cheapest time to send, compare fee tiers, estimate exact costs before broadcasting
  • Zero config — works instantly with the free hosted Satoshi API, or connect your own Bitcoin Core node
  • First Bitcoin MCP server on the Anthropic Registry

Top Use Cases

Ask your AI agent:

Prompt What it does
"What's the cheapest time to send Bitcoin today?" Fee recommendation with savings breakdown
"Analyze the current mempool congestion" Real-time mempool depth, fee tiers, pending tx count
"How much would I save waiting 6 blocks vs next block?" Side-by-side fee comparison across confirmation targets
"Search for this transaction: abc123..." Full transaction decode with inscription detection
"Give me a situation summary of Bitcoin right now" Price, fees, mempool, mining, difficulty — one call

Full Tool Reference

All 47 tools by category

Fee Intelligence

Tool Description
get_fee_recommendation Optimal fee rate with urgency tiers and savings tips
get_fee_estimates Fee estimates across all confirmation targets
estimate_smart_fee Fee estimate for a specific confirmation target
compare_fee_estimates Side-by-side comparison of fee sources
estimate_transaction_cost Exact cost estimate for a transaction before sending

Blocks & Transactions

Tool Description
analyze_block Deep analysis of any block by height or hash
get_block_stats Statistical breakdown of a block
get_block_count Current chain height
compare_blocks Compare two blocks side by side
search_blocks Search a range of blocks
analyze_transaction Full transaction analysis with inscription detection
decode_raw_transaction Decode a raw transaction hex
send_raw_transaction Broadcast a signed transaction
check_utxo Check if a UTXO is spent or unspent

Mempool

Tool Description
analyze_mempool Full mempool analysis — depth, fees, congestion
get_mempool_info Mempool size, bytes, fee floor
get_mempool_entry Details for a specific unconfirmed transaction
get_mempool_ancestors Ancestor chain for a mempool transaction

Mining

Tool Description
get_mining_info Current mining difficulty, hashrate, block reward
analyze_next_block Preview of the next block template
get_mining_pool_rankings Top mining pools by recent blocks
get_difficulty_adjustment Time and percentage of next difficulty change
get_halving_countdown Blocks and estimated time until next halving

Network & Status

Tool Description
get_blockchain_info Chain state, verification progress, softfork status
get_network_info Node version, connections, relay info
get_node_status Connection status and node health
get_peer_info Connected peer details
get_chain_tips Active and stale chain tips
get_chain_tx_stats Transaction throughput over N blocks
get_utxo_set_info UTXO set size and total supply
get_supply_info Circulating supply, inflation rate, percent mined
get_situation_summary Aggregated overview — price, fees, mempool, mining
get_btc_price Current BTC/USD price
get_market_sentiment Fear/greed index and market indicators

Address & UTXO

Tool Description
get_address_utxos UTXOs for an address
validate_address Validate and classify a Bitcoin address

Indexed Address (requires blockchain indexer)

Tool Description
get_address_balance Total received/sent/balance, tx count, first/last seen
get_address_history Paginated transaction history with net value change
get_indexed_transaction Enriched tx with resolved input addresses + spent status
get_indexer_status Sync progress, ETA, blocks/sec

Utility

Tool Description
search_blockchain Universal search — address, txid, block hash, or height
generate_keypair Generate a new Bitcoin keypair
explain_script Decode and explain a Bitcoin script
decode_bolt11_invoice Decode a Lightning Network BOLT11 invoice
describe_rpc_command Help text for any Bitcoin Core RPC command
list_rpc_commands List all available RPC commands

Configuration

All environment variables are optional. bitcoin-mcp falls back to the free hosted Satoshi API when no local node is configured.

Variable Description Default
BITCOIN_RPC_HOST Bitcoin Core RPC host 127.0.0.1
BITCOIN_RPC_PORT Bitcoin Core RPC port Auto by network
BITCOIN_NETWORK mainnet, testnet, signet, or regtest mainnet
SATOSHI_API_URL Override hosted API URL https://bitcoinsapi.com
SATOSHI_API_KEY API key for authenticated access None

To connect to a local Bitcoin Core node:

{
  "mcpServers": {
    "bitcoin": {
      "command": "uvx",
      "args": ["bitcoin-mcp"],
      "env": {
        "BITCOIN_RPC_HOST": "127.0.0.1",
        "BITCOIN_RPC_PORT": "8332"
      }
    }
  }
}

Prompts & Resources

6 built-in prompts for common workflows: analyze_fee_environment, investigate_transaction, monitor_mempool_fees, taproot_adoption_report, network_health_report, track_transaction

7 resources for context injection: bitcoin://connection/status, bitcoin://node/status, bitcoin://fees/current, bitcoin://mempool/snapshot, bitcoin://protocol/script-opcodes, bitcoin://protocol/address-types, bitcoin://protocol/sighash-types

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitcoin_mcp-0.5.0.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitcoin_mcp-0.5.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file bitcoin_mcp-0.5.0.tar.gz.

File metadata

  • Download URL: bitcoin_mcp-0.5.0.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bitcoin_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4cac5aa39051050b2057cacbce1454087520ce1e7845d74c868284f52cbfebed
MD5 d93570d019ce14a04f9cdb76ed8c6c23
BLAKE2b-256 2007451eb67f51e3932f41ec5df69cf66b2cf4252764ed9c34901d41174d8327

See more details on using hashes here.

File details

Details for the file bitcoin_mcp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: bitcoin_mcp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bitcoin_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09e79e5c1b382df5f4a0218609d18ad892dc3f8a40000c212b6b5f07fdde3209
MD5 6b15017e7efbb3328942d3d69081d3bb
BLAKE2b-256 da84762093de170f6ee71248135cf1d315c9e8c3a1f9442967b6a64df2fcc5a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page