Bitcoin MCP Server
49 Bitcoin tools for AI agents: fees, mempool, blocks, mining, price. Zero config.
Bitcoin MCP scores 69 (Good), licensed MIT and written in Python. It installs as a local process. It declares 40 tools. Filed under Finance. GitHub shows 5 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
69 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
88/100 for listing completeness. Lost points: 5 of 40 tools barely described, short summary, no docs link.
How quality is graded
Where the 69 comes from
22 + 20 + 3 + 10 + 4 + 10 = 69. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 3 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "bortlesboat-bitcoin-mcp": { "command": "uvx", "args": [ "bitcoin-mcp" ], "env": { "BITCOIN_RPC_HOST": "", "BITCOIN_RPC_PORT": "", "BITCOIN_NETWORK": "", "SATOSHI_API_URL": "", "SATOSHI_API_KEY": "YOUR_SATOSHI_API_KEY" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
BITCOIN_RPC_HOST | Optional | Bitcoin Core RPC host (default: 127.0.0.1) |
BITCOIN_RPC_PORT | Optional | Bitcoin Core RPC port (default: auto-selected by network) |
BITCOIN_NETWORK | Optional | Bitcoin network: mainnet, testnet, signet, or regtest (default: mainnet). Sets default RPC port if BITCOIN_RPC_PORT is not set. |
SATOSHI_API_URL | Optional | Override the default hosted API URL (default: https://bitcoinsapi.com). The hosted API is used automatically when no local node is detected. |
SATOSHI_API_KEYSecret | Optional | API key for authenticated access to the hosted Satoshi API (get one free at POST /api/v1/register) |
Tools40Tool docs quality grade D
All capabilitiesanalyze_blocktoolDeep analysis of any block by height or hash
analyze_mempooltoolFull mempool analysis — depth, fees, congestion
Preview of the next block template
Full transaction analysis with inscription detection
check_utxotoolCheck if a UTXO is spent or unspent
compare_blockstoolCompare two blocks side by side
Side-by-side comparison of fee sources
Decode a raw transaction hex
Fee estimate for a specific confirmation target
Exact cost estimate for a transaction before sending
Total received/sent/balance, tx count, first/last seen
Paginated transaction history with net value change
About
bitcoin-mcp
Give any AI agent Bitcoin superpowers — fee intelligence, mempool analysis, and 50 tools backed by your Bitcoin node or compatible API.
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.
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.comis 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:
{
"mcpServers": {
"bitcoin": {
"command": "uvx",
"args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]
}
}
}
Claude Code
claude mcp add bitcoin -- uvx --from "bitcoin-mcp>=0.5.2" bitcoin-mcp
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"bitcoin": {
"command": "uvx",
"args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]
}
}
}
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"bitcoin": {
"command": "uvx",
"args": ["--from", "bitcoin-mcp>=0.5.2", "bitcoin-mcp"]
}
}
}
Zed
Add to your Zed settings.json under context_servers:
{
"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
docker build -t bitcoin-mcp .
docker run -i bitcoin-mcp
Or with docker compose:
docker compose up
Pass environment variables to connect to a local Bitcoin Core node or a compatible API:
docker run -i -e BITCOIN_RPC_HOST=host.docker.internal -e BITCOIN_RPC_PORT=8332 bitcoin-mcp
# or
docker 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:
- The agent calls
get_fee_recommendation. - The answer gives a clear send now or wait recommendation with fee rates in sat/vB.
- If the backend is unavailable, configure a local node or set
SATOSHI_API_URLbefore 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:
- Local Bitcoin Core/Knots RPC settings:
BITCOIN_RPC_HOST,BITCOIN_RPC_PORT, and optional credentials or datadir - Compatible remote API:
SATOSHI_API_URLand, when required,SATOSHI_API_KEY - Satoshi API source and integration reference: https://github.com/Bortlesboat/bitcoin-api/blob/master/docs/AGENT_INTEGRATION.md
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:
| 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
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_address_transactions | Transaction history with per-transaction value details |
get_indexed_transaction | Enriched tx with resolved input addresses + spent status |
get_indexer_status | Sync progress, ETA, blocks/sec |
Security
| Tool | Description |
|---|---|
analyze_psbt_security | Security analysis of a Partially Signed Bitcoin Transaction |
explain_inscription_listing_security | Security guide for ordinal inscription listings |
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 |
decode_xpub | Decode 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:
| Flag | Values | Default | Description |
|---|---|---|---|
--transport | stdio, sse, streamable-http | stdio | MCP transport to run |
--host | hostname / IP | 127.0.0.1 for HTTP transports | Bind host for sse and streamable-http |
--port | integer | 8000 for HTTP transports | Bind port for sse and streamable-http |
--log-level | DEBUG, INFO, WARNING, ERROR | INFO | Server log verbosity |
Example:
bitcoin-mcp --transport sse --host 127.0.0.1 --port 8000 --log-level DEBUG
| 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 | Compatible Satoshi API base URL | None |
SATOSHI_API_KEY | API key for authenticated access | None |
To connect to a local Bitcoin Core node:
{
"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
- Satoshi API source — optional compatible backend implementation (public hosted service currently paused)
- MCP Registry —
io.github.Bortlesboat/bitcoin-mcp - PyPI
- GitHub
- Full tool documentation
Examples
See the examples/ folder for documented usage patterns:
- Fee Analysis — find optimal send timing
- Mempool Monitor — track congestion
- Transaction Investigation — decode and analyze transactions
- Block Analysis — inspect and compare blocks
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
Frequently asked questions
What is Bitcoin MCP Server?
49 Bitcoin tools for AI agents: fees, mempool, blocks, mining, price. Zero config.
How do I install Bitcoin MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Bitcoin MCP Server runs locally from the PyPI package bitcoin-mcp with the command uvx bitcoin-mcp.
Is Bitcoin MCP Server free and open source?
Yes. Bitcoin MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Bitcoin MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Bitcoin MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does Bitcoin MCP Server provide?
Bitcoin MCP Server provides 40 tools, including analyze_block, analyze_mempool, analyze_next_block, and analyze_transaction. See the full tool list for descriptions and parameters.
How is Bitcoin MCP Server's trust score calculated?
Bitcoin MCP Server scores 69 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.