Bitcoin MCP

io.github.Bortlesboat由 GitHub 帳號 Bortlesboat 發布v0.5.1更新於 Oct 24, 2026

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

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為 AI 助理提供約 50 個比特幣工具,涵蓋手續費、記憶池、區塊、挖礦、地址與價格資料。

可以做什麼
提供約 50 個比特幣工具,包括手續費建議與比較、記憶池壅塞分析、區塊與交易分析、挖礦與難度統計、網路與節點狀態、地址與 UTXO 查詢,以及市場價格與情緒指標。也提供用於手續費、記憶池與網路健康工作流程的提示與資源。資料來自本機 Bitcoin Core 或 Knots 節點,或來自明確設定的相容 API。
適用情境
當助理需要回答比特幣問題時適用,例如發送交易最便宜的時機、目前記憶池壅塞情況、區塊或交易詳情,以及挖礦與供給量統計。適合已經執行比特幣節點或擁有可指向的相容 API 端點的使用者。
執行需求
以 Python 套件(pip 或 uvx)或 Docker 方式在本機執行。需要資料後端:透過 BITCOIN_RPC_HOST、BITCOIN_RPC_PORT 與 BITCOIN_NETWORK 設定可連線的 Bitcoin Core 或 Knots 節點,或透過 SATOSHI_API_URL 指定相容 API,必要時搭配 SATOSHI_API_KEY。README 說明公開託管 API 已暫停,不應作為預設依賴。
安裝前請注意
此伺服器可透過 send_raw_transaction 廣播已簽章交易,並可產生新的比特幣金鑰對,因此助理可能轉移資金或建立金鑰。SATOSHI_API_KEY 是機密,應透過環境變數提供,不要寫死在程式碼中。將 SATOSHI_API_URL 指向第三方端點會把查詢傳送給該營運方。部分地址歷史工具需要額外的區塊鏈索引器。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Bitcoin MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:README.md,提交 50de748

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.5.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分