Bitcoin MCP

平台与服务

by bortlesboat

面向 Bitcoin Core 节点的 MCP server,提供 32 个工具,供 AI agents 查询区块链数据。

什么是 Bitcoin MCP

面向 Bitcoin Core 节点的 MCP server,提供 32 个工具,供 AI agents 查询区块链数据。

README

bitcoin-mcp

<!-- mcp-name: io.github.Bortlesboat/bitcoin-mcp -->

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

PyPI Downloads Tests License: MIT Python 3.10+ Powered by Satoshi API OpenSats

49 tools · 126 tests · 6 prompts · 8 resources · Zero config · 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

Quick Start

Claude Desktop

Add to your claude_desktop_config.json:

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

Claude Code

bash
claude mcp add bitcoin -- uvx bitcoin-mcp

Cursor

Add to .cursor/mcp.json:

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

VS Code

Add to .vscode/mcp.json:

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

Zed

Add to your Zed settings.json under context_servers:

json
{
  "context_servers": {
    "bitcoin": {
      "command": "uvx",
      "args": ["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 set your API key:

bash
docker run -i -e SATOSHI_API_KEY=your-key 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 you will repeat this check, register a free Satoshi API key and add SATOSHI_API_KEY to your MCP config.
  4. If you need a one-off paid API call instead of the MCP tool, use https://bitcoinsapi.com/x402/start.

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 link the Satoshi API integration kit:

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
  • 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:

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

<details> <summary>All 49 tools by category</summary>

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_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
query_remote_apiQuery the Satoshi API directly
</details>

Get More Requests (Free)

bitcoin-mcp works immediately with 1,000 requests/day (anonymous). Register for a free API key to get 10,000/day (10x):

  1. Visit bitcoinsapi.com
  2. Register for a free key (takes 10 seconds)
  3. Set the SATOSHI_API_KEY environment variable in your MCP config

Configuration

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

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_URLOverride hosted API URLhttps://bitcoinsapi.com
SATOSHI_API_KEYAPI key for authenticated accessNone

To connect to a local Bitcoin Core node:

json
{
  "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

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 OpenSats.

Contributing

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. It is the most comprehensive Bitcoin MCP server available, bridging AI agents and Bitcoin infrastructure through the Model Context Protocol.

Related projects:

License

MIT

常见问题

Bitcoin MCP 是什么?

面向 Bitcoin Core 节点的 MCP server,提供 32 个工具,供 AI agents 查询区块链数据。

相关 Skills

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描165.3k

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描165.3k

接口测试套件

by alirezarezvani

Universal
热门

扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。

帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。

平台与服务
未扫描23.5k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
89.1k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
79.9k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
71.9k

评论