Bitcoin-MCP
give you access to bitcoinsAPI
README
bitcoin-mcp
<!-- mcp-name: io.github.Bortlesboat/bitcoin-mcp -->
MCP server for Bitcoin Core/Knots nodes. 35 tools, 6 prompts, 7 resources for AI agents to query the blockchain, analyze mempool fee markets, decode transactions, broadcast transactions, decode Lightning invoices, inspect mining economics, and explore the protocol.
Runs against your local node — no API keys, no rate limits, no third-party dependencies.
The first Bitcoin MCP server on the official Anthropic MCP Registry.
No Node? No Problem
Point at a hosted Satoshi API instance instead of running your own node:
SATOSHI_API_URL=https://bitcoinsapi.com bitcoin-mcp
This adds a query_remote_api tool that proxies requests through the REST API, with optional L402 Lightning micropayments.
60-Second Quickstart
# 1. Install
pip install bitcoin-mcp
# 2. Add to Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"bitcoin": { "command": "bitcoin-mcp" }
}
}
# 3. Ask Claude: "What's the current Bitcoin fee environment?"
That's it. The server auto-detects your node via cookie authentication.
Install
pip install bitcoin-mcp
Configuration
Override with environment variables if needed:
BITCOIN_RPC_HOST=127.0.0.1
BITCOIN_RPC_PORT=8332
BITCOIN_RPC_USER=myuser
BITCOIN_RPC_PASSWORD=mypassword
BITCOIN_DATADIR=E:/
BITCOIN_NETWORK=mainnet # mainnet (default) | testnet | signet | regtest
SATOSHI_API_URL=https://bitcoinsapi.com # optional: use remote API instead of local node
35 Tools
Node & Network (3)
| Tool | Description |
|---|---|
get_node_status |
Chain, height, sync progress, disk, connections, version |
get_peer_info |
Connected peer addresses, latency, services |
get_network_info |
Protocol version, relay fee, warnings |
Blockchain & Blocks (6)
| Tool | Description |
|---|---|
analyze_block |
Full analysis: pool ID, SegWit/Taproot adoption, fee distribution |
get_blockchain_info |
Chain, difficulty, softforks, chain work |
get_block_stats |
Raw statistics: median fee, total output, subsidy |
get_chain_tx_stats |
Transaction rate over N blocks |
get_chain_tips |
Active chain, forks, and stale branches |
search_blocks |
Block stats for a range of heights (max 10) |
Mempool (4)
| Tool | Description |
|---|---|
analyze_mempool |
Fee buckets, congestion level, next-block minimum fee |
get_mempool_entry |
Details of a specific unconfirmed tx |
get_mempool_info |
Quick stats: count, bytes, min relay fee |
get_mempool_ancestors |
Ancestor transactions for CPFP analysis |
Transactions (4)
| Tool | Description |
|---|---|
analyze_transaction |
Full decode + inscription detection + fee analysis |
decode_raw_transaction |
Decode raw hex without input lookup |
send_raw_transaction |
Broadcast a signed transaction (with fee safety limit) |
check_utxo |
Check if a specific output is unspent |
Fee Estimation (4)
| Tool | Description |
|---|---|
get_fee_estimates |
Rates for 1/3/6/25/144 block targets |
get_fee_recommendation |
Plain-English send/wait advice |
estimate_smart_fee |
Custom confirmation target |
compare_fee_estimates |
Side-by-side urgency labels + cost for 140vB tx |
Mining (2)
| Tool | Description |
|---|---|
get_mining_info |
Difficulty, hashrate, block size |
analyze_next_block |
Block template: revenue, fee percentiles, top-fee txs |
UTXO Set (2)
| Tool | Description |
|---|---|
get_utxo_set_info |
Total UTXOs, supply, disk size (slow: ~1-2 min) |
get_block_count |
Current block height (fast) |
AI Developer Tools (8)
| Tool | Description |
|---|---|
describe_rpc_command |
Structured help for any RPC command |
list_rpc_commands |
All commands grouped by category |
search_blockchain |
Smart router: auto-detects txid, block hash/height, or address |
explain_script |
Decode script hex into readable opcodes |
get_address_utxos |
Scan UTXO set for an address |
validate_address |
Validate and classify address type (P2PKH/P2SH/P2WPKH/P2WSH/P2TR) |
get_difficulty_adjustment |
Epoch progress, estimated adjustment percentage |
compare_blocks |
Side-by-side block statistics comparison |
Lightning (1)
| Tool | Description |
|---|---|
decode_bolt11_invoice |
Decode a BOLT11 Lightning invoice (no LN node needed) |
6 Agent Workflow Prompts
Pre-built multi-step analysis templates that agents can invoke:
| Prompt | Description |
|---|---|
analyze_fee_environment |
Fee market analysis with send/wait recommendation |
investigate_transaction |
Deep-dive transaction investigation |
monitor_mempool_fees |
Watch for fee drops below threshold |
taproot_adoption_report |
P2TR adoption trends over recent blocks |
network_health_report |
Comprehensive network health assessment |
track_transaction |
Track a tx from mempool to confirmation |
7 Resources
Static data endpoints for AI agents:
bitcoin://node/status— node summarybitcoin://fees/current— fee estimatesbitcoin://mempool/snapshot— mempool analysisbitcoin://connection/status— connection status + troubleshooting hintsbitcoin://protocol/script-opcodes— Bitcoin Script opcodes referencebitcoin://protocol/address-types— address type properties and BIPsbitcoin://protocol/sighash-types— signature hash types
Example Configs
See examples/ for ready-to-use config snippets:
What Makes This Different
| Feature | bitcoin-mcp | Competitors |
|---|---|---|
| Official MCP Registry | Yes | No |
| Tools / Prompts / Resources | 35 / 6 / 7 | Fewer |
| Data source | Your local node | Third-party APIs |
| No-node fallback | Satoshi API remote | N/A |
| Mempool analysis | Fee bucketing, congestion, CPFP | Basic stats only |
| Inscription detection | Yes | No |
| Pool identification | Yes | No |
| SegWit/Taproot metrics | Yes | No |
| Next-block prediction | Yes | No |
| Agent workflow prompts | 6 built-in | None |
| Rate limits | None | API-dependent |
| Typed responses | Pydantic models | Raw JSON |
CLI
bitcoin-mcp # Start MCP server (default)
bitcoin-mcp --version # Print version
bitcoin-mcp --check # Test RPC connection and exit
Requirements
- Python 3.10+
- Bitcoin Core or Bitcoin Knots with
server=1in bitcoin.conf txindex=1recommended for transaction lookups
Related
- Satoshi API — REST API for Bitcoin nodes (pairs with bitcoin-mcp for remote access)
- bitcoinlib-rpc — the Python library powering this server
- Bitcoin Protocol Guide — educational companion
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。