bitcoin-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bitcoin-mcpCheck Bitcoin price and mempool status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bitcoin-mcp
MCP server giving AI agents Bitcoin and Lightning superpowers.
pip install bitcoin-mcpPlug it into Claude Desktop, Cursor, or any MCP-compatible client and your AI can instantly:
π Check Bitcoin price (USD / EUR / GBP)
βοΈ Inspect mempool, fee rates, blocks, and transactions
β‘ Decode Lightning invoices
π Query the Lightning Network global stats
π Pay Lightning invoices via Nostr Wallet Connect (NWC)
π Fetch L402-protected content, auto-paying the invoice
Quick start
pip install bitcoin-mcp
bitcoin-mcp # starts MCP server on stdioClaude Desktop integration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"bitcoin": {
"command": "bitcoin-mcp",
"env": {
"NWC_CONNECTION_STRING": "nostr+walletconnect://your-nwc-uri-here"
}
}
}
}Restart Claude Desktop. You'll see Bitcoin tools appear in the tool picker.
Lightning payments (optional)
Requires a Nostr Wallet Connect connection string from a compatible wallet (Alby, Mutiny, etc.):
export NWC_CONNECTION_STRING="nostr+walletconnect://..."
export NWC_MAX_SATS=5000 # spending cap per payment (default: 10000)Also requires Node.js (npx) for the @getalby/cli NWC backend.
Related MCP server: Lightning Enable MCP
Available tools
Read-only (no auth needed)
Tool | Description |
| BTC price in USD, EUR, GBP |
| Unconfirmed tx count, vsize, fee rates (fastest/hour/economy) |
| Most recent block: height, hash, timestamp, tx count |
| Block by height or hash |
| Decode a bolt11: amount, description, expiry, payee |
| LN node count, channel count, total capacity |
| On-chain balance (confirmed + unconfirmed) in satoshis |
| Recent transactions for a Bitcoin address |
| Transaction details: confirmations, fee, inputs, outputs |
Lightning (requires NWC_CONNECTION_STRING)
Tool | Description |
| Lightning wallet balance in satoshis |
| Pay a bolt11 invoice (capped by |
| Create a Lightning invoice |
L402 (requires NWC_CONNECTION_STRING)
Tool | Description |
| Fetch an L402-protected URL, auto-paying the Lightning invoice |
Example session
Once connected, you can ask Claude:
"What's the current Bitcoin price and mempool congestion?"
"Decode this invoice: lnbc1000n1p..."
"What's the balance on bc1q...?"
"Pay this invoice for me: lnbc..." (requires NWC)
Python API
The library can also be used directly in Python:
import asyncio
from bitcoin_mcp import BitcoinAPIClient, NWCClient
async def main():
async with BitcoinAPIClient() as api:
price = await api.get_price()
print(f"BTC: ${price['usd']:,.0f}")
mempool = await api.get_mempool_info()
print(f"Mempool: {mempool['count']:,} txs")
print(f"Fastest fee: {mempool['fees']['fastest_sat_vb']} sat/vB")
# Decode an invoice
decoded = await api.decode_invoice("lnbc1000n1p...")
print(f"Invoice for {decoded['amount_sat']} sats: {decoded['description']}")
asyncio.run(main())Data sources
All data is fetched from free public APIs:
mempool.space β blocks, transactions, addresses, fees, Lightning
blockchain.info β BTC price ticker
No API keys required for read-only tools.
Development
git clone https://github.com/spcpza/bitcoin-mcp
cd bitcoin-mcp
pip install -e ".[dev]"
pytestSupport
This is open-source infrastructure for autonomous AI agents. If your agent uses it or you're building on top of it, consider donating:
β‘ sensiblefield821792@getalby.com
Issues and PRs welcome.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that provides AI agents with real-time and historical Bitcoin network data by wrapping the mempool.space WebSocket and REST APIs. It enables tracking addresses, monitoring blocks, and retrieving transaction details or fee estimates through natural language.MIT
- AlicenseAqualityBmaintenanceMCP server that enables AI agents to make autonomous Bitcoin Lightning Network payments using the L402 protocol. Agents can pay for API access, purchase resources, and complete transactions without human intervention β invoice comes in, sats go out, done.179MIT
- AlicenseBqualityCmaintenanceMCP server offering 26 Lightning-paid tools for Bitcoin mempool intelligence and sovereign on-prem AI inference, with no third-party APIs and pay-per-call in sats.26181MIT
- Alicense-qualityFmaintenanceMCP server that gives AI agents Lightning payments, L402 API access, trust verification, and service discovery.12MIT
Related MCP Connectors
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
MCP server for Gainium β manage trading bots, deals, and balances via AI assistants
HiveCapital MCP Server β autonomous investment layer for AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/spcpza/bitcoin-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server