Bitcoin MCP

io.github.BortlesboatPublished by GitHub account Bortlesboatv0.5.1Updated Oct 24, 2026

49 Bitcoin tools for AI agents: fees, mempool, blocks, mining, price. Zero config.

VerifiedSTDIODesktop onlyFinanceData & Analytics

Overview

AI-generated overview

A local MCP server that gives an AI assistant about 50 Bitcoin tools for fees, mempool, blocks, mining, addresses, and price data.

What you can do
Exposes roughly 50 Bitcoin tools covering fee recommendations and comparisons, mempool congestion, block and transaction analysis, mining and difficulty statistics, network and node status, address and UTXO lookups, and market price or sentiment. It also provides prompts and resources for fee, mempool, and network-health workflows. Data comes from a local Bitcoin Core or Knots node, or from an explicitly configured compatible API.
When to use it
Use it when an assistant needs to answer Bitcoin questions such as the cheapest time to send a transaction, current mempool congestion, block or transaction details, or mining and supply statistics. It is aimed at users who already run a Bitcoin node or have a compatible API endpoint to point it at.
Requirements
Runs locally as a Python package (pip or uvx) or via Docker. Needs a data backend: a reachable Bitcoin Core or Knots node configured with BITCOIN_RPC_HOST, BITCOIN_RPC_PORT, and BITCOIN_NETWORK, or a compatible API set through SATOSHI_API_URL, optionally with SATOSHI_API_KEY. The README states the public hosted API is paused and should not be relied on as a default.
Before you install
The server can broadcast a signed transaction through send_raw_transaction and can generate a new Bitcoin keypair, so an assistant may be able to move funds or create keys. SATOSHI_API_KEY is a secret and should be supplied through the environment, not hardcoded. Pointing SATOSHI_API_URL at a third-party endpoint sends queries to that operator. Some address-history tools require an additional blockchain indexer.

Installation

In SourceWeft

  1. Open Bitcoin MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

bitcoin-mcp

Give any AI agent Bitcoin superpowers — fee intelligence, mempool analysis, and 50 tools backed by your Bitcoin node or compatible API.

[PyPI] [Downloads] [Tests] [License: MIT] [Python 3.10+] [GitHub Sponsors]

50 standard tools · 6 prompts · 8 resources · Bitcoin Core or compatible API backend · MIT licensed

If bitcoin-mcp is useful to you, consider giving it a star — it helps others discover the project.

bash
pip install "bitcoin-mcp>=0.5.2"

bitcoin-mcp needs a Bitcoin data backend. It auto-detects a local Bitcoin Core/Knots node from its cookie or RPC settings. Without a local node, set SATOSHI_API_URL to a compatible deployment.

Service status: the public Satoshi API previously hosted at bitcoinsapi.com is paused and should not be treated as a working default. Use a local node or an explicitly configured compatible API.

Install status

Version 0.5.2 includes the MCP SDK 1.x compatibility constraint and explicit backend selection. Upgrade older installations to receive these fixes.

Quick Start

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "bitcoin": {      "command": "uvx",      "args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]    }  }}

Claude Code

bash
claude mcp add bitcoin -- uvx --from "bitcoin-mcp>=0.5.2" bitcoin-mcp

Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "bitcoin": {      "command": "uvx",      "args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]    }  }}

VS Code

Add to .vscode/mcp.json:

json
{  "servers": {    "bitcoin": {      "command": "uvx",      "args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]    }  }}

Zed

Add to your Zed settings.json under context_servers:

json
{  "context_servers": {    "bitcoin": {      "command": "uvx",      "args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]    }  }}

See the Zed MCP docs for the current settings location and custom server flow.

Docker

bash
docker build -t bitcoin-mcp .docker run -i bitcoin-mcp

Or with docker compose:

bash
docker compose up

Pass environment variables to connect to a local Bitcoin Core node or a compatible API:

bash
docker run -i -e BITCOIN_RPC_HOST=host.docker.internal -e BITCOIN_RPC_PORT=8332 bitcoin-mcp# ordocker run -i -e SATOSHI_API_URL=https://your-api.example bitcoin-mcp

Ask whether to send Bitcoin now

Use this as the first useful activation path after install:

"I need to send a Bitcoin transaction today. Use bitcoin-mcp to decide whether to send now or wait, and show the fee rate you used."

Expected path:

  1. The agent calls get_fee_recommendation.
  2. The answer gives a clear send now or wait recommendation with fee rates in sat/vB.
  3. If the backend is unavailable, configure a local node or set SATOSHI_API_URL before retrying.

After it works, Star this repo and share a short showcase with the prompt, tool call, and outcome so other Bitcoin agent builders can see the path.

Agent Integration

For repos that need Bitcoin tools, add bitcoin-mcp to the agent's MCP config and configure one of its supported backends:

Generated HTTP examples should use canonical Satoshi API /api/v1 paths.

Why bitcoin-mcp?

  • Fee intelligence that saves real money — know the cheapest time to send, compare fee tiers, estimate exact costs before broadcasting
  • Backend choice — use your own Bitcoin Core/Knots node or an explicitly configured compatible API
  • Open source MCP tooling — tool definitions, tests, and client configuration examples are available in this repository

Top Use Cases

Ask your AI agent:

PromptWhat 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 50 standard tools by category

Fee Intelligence

ToolDescription
get_fee_recommendationOptimal fee rate with urgency tiers and savings tips
get_fee_estimatesFee estimates across all confirmation targets
estimate_smart_feeFee estimate for a specific confirmation target
compare_fee_estimatesSide-by-side comparison of fee sources
estimate_transaction_costExact cost estimate for a transaction before sending

Blocks & Transactions

ToolDescription
analyze_blockDeep analysis of any block by height or hash
get_block_statsStatistical breakdown of a block
get_block_countCurrent chain height
compare_blocksCompare two blocks side by side
search_blocksSearch a range of blocks
analyze_transactionFull transaction analysis with inscription detection
decode_raw_transactionDecode a raw transaction hex
send_raw_transactionBroadcast a signed transaction
check_utxoCheck if a UTXO is spent or unspent

Mempool

ToolDescription
analyze_mempoolFull mempool analysis — depth, fees, congestion
get_mempool_infoMempool size, bytes, fee floor
get_mempool_entryDetails for a specific unconfirmed transaction
get_mempool_ancestorsAncestor chain for a mempool transaction

Mining

ToolDescription
get_mining_infoCurrent mining difficulty, hashrate, block reward
analyze_next_blockPreview of the next block template
get_mining_pool_rankingsTop mining pools by recent blocks
get_difficulty_adjustmentTime and percentage of next difficulty change
get_halving_countdownBlocks and estimated time until next halving

Network & Status

ToolDescription
get_blockchain_infoChain state, verification progress, softfork status
get_network_infoNode version, connections, relay info
get_node_statusConnection status and node health
get_peer_infoConnected peer details
get_chain_tipsActive and stale chain tips
get_chain_tx_statsTransaction throughput over N blocks
get_utxo_set_infoUTXO set size and total supply
get_supply_infoCirculating supply, inflation rate, percent mined
get_situation_summaryAggregated overview — price, fees, mempool, mining
get_btc_priceCurrent BTC/USD price
get_market_sentimentFear/greed index and market indicators

Address & UTXO

ToolDescription
get_address_utxosUTXOs for an address
validate_addressValidate and classify a Bitcoin address

Indexed Address (requires blockchain indexer)

ToolDescription
get_address_balanceTotal received/sent/balance, tx count, first/last seen
get_address_historyPaginated transaction history with net value change
get_address_transactionsTransaction history with per-transaction value details
get_indexed_transactionEnriched tx with resolved input addresses + spent status
get_indexer_statusSync progress, ETA, blocks/sec

Security

ToolDescription
analyze_psbt_securitySecurity analysis of a Partially Signed Bitcoin Transaction
explain_inscription_listing_securitySecurity guide for ordinal inscription listings

Utility

ToolDescription
search_blockchainUniversal search — address, txid, block hash, or height
generate_keypairGenerate a new Bitcoin keypair
explain_scriptDecode and explain a Bitcoin script
decode_bolt11_invoiceDecode a Lightning Network BOLT11 invoice
describe_rpc_commandHelp text for any Bitcoin Core RPC command
list_rpc_commandsList all available RPC commands
decode_xpubDecode and inspect an extended public key

Optional Remote API Tool

query_remote_api is registered only when SATOSHI_API_URL is set and the l402 extra is installed. It queries canonical /api/v1 routes on that explicitly configured endpoint.

Configuration

Configure either a local Bitcoin Core/Knots node or a compatible remote API. If neither is available, bitcoin-mcp exits its connection check with a setup error instead of silently selecting an unavailable public service.

CLI Flags

bitcoin-mcp supports the following runtime flags:

FlagValuesDefaultDescription
--transportstdio, sse, streamable-httpstdioMCP transport to run
--hosthostname / IP127.0.0.1 for HTTP transportsBind host for sse and streamable-http
--portinteger8000 for HTTP transportsBind port for sse and streamable-http
--log-levelDEBUG, INFO, WARNING, ERRORINFOServer log verbosity

Example:

bash
bitcoin-mcp --transport sse --host 127.0.0.1 --port 8000 --log-level DEBUG
VariableDescriptionDefault
BITCOIN_RPC_HOSTBitcoin Core RPC host127.0.0.1
BITCOIN_RPC_PORTBitcoin Core RPC portAuto by network
BITCOIN_NETWORKmainnet, testnet, signet, or regtestmainnet
SATOSHI_API_URLCompatible Satoshi API base URLNone
SATOSHI_API_KEYAPI key for authenticated accessNone

To connect to a local Bitcoin Core node:

json
{  "mcpServers": {    "bitcoin": {      "command": "uvx",      "args": ["--from", "bitcoin-mcp>=0.5.2", "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

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

Links

Examples

See the examples/ folder for documented usage patterns:

Support This Project

bitcoin-mcp is free, open-source Bitcoin infrastructure. Support development through GitHub Sponsors, reproducible issue reports, documentation improvements, and tested patches.

Contributing

Run the unit suite with python -m pytest tests/. For the optional Core/Knots checks over the MCP interface, see real-node integration tests.

Contributions are welcome. See CONTRIBUTING.md for guidelines, including how to add new tools and the PR checklist.

Please report security vulnerabilities privately — see SECURITY.md.

About

bitcoin-mcp is created and maintained by Andrew Barnes, bridging AI agents and Bitcoin infrastructure through the Model Context Protocol.

Related projects:

  • Satoshi API — Bitcoin fee intelligence API, 108 endpoints, usable as a self-hosted compatible backend
  • ChainPulse — AI-powered Bitcoin network intelligence CLI
  • BAIP-1 — Bitcoin Agent Identity Protocol
  • bitcoin-fee-observatory — Fee market analytics dashboard

License

MIT

Source: README.md at commit 50de748

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.5.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts