Bitcoin MCP Server
Real-time Bitcoin blockchain data server for MCP clients.
Key Features
Use Cases
README
Bitcoin MCP Server
A Model Context Protocol (MCP) server that provides real-time Bitcoin blockchain data by querying the mempool.space API.
Features
This MCP server offers five specialized tools for querying Bitcoin blockchain data:
🔍 Address Tools
get-address-stats
Get basic statistics for any Bitcoin address.
Input:
address(string): Bitcoin address to query
Output:
- Chain statistics (funded/spent amounts, transaction counts)
- Mempool statistics (pending transactions)
Example:
Address: 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
Chain Stats:
- Funded TXOs: 10
- Funded Sum: 150.07686949 BTC
- Spent TXOs: 5
- Spent Sum: 150.07599040 BTC
- Total Transactions: 12
Mempool Stats:
- Pending TXOs: 0
- Pending Sum: 0.00000000 BTC
- Pending Transactions: 0
get-address-transactions
Get transaction history for a Bitcoin address.
Input:
address(string): Bitcoin address to querylimit(optional, number): Number of transactions to return (1-50, default: 10)
Output:
- List of recent transactions with status, dates, fees, and sizes
get-address-utxos
Get current UTXOs (unspent transaction outputs) for a Bitcoin address.
Input:
address(string): Bitcoin address to querylimit(optional, number): Number of UTXOs to return (1-50, default: 10)
Output:
- List of current UTXOs with amounts, confirmation status, and dates
🔗 Transaction Tools
get-transaction
Get detailed information about a specific Bitcoin transaction.
Input:
txid(string): Transaction ID (hash) to query
Output:
- Complete transaction details including:
- Basic info (version, size, weight, fee)
- Confirmation status and block information
- Input and output details with amounts and addresses
🧱 Block Tools
get-block
Get information about a specific Bitcoin block.
Input:
block_height(number): Block height to query
Output:
- Block details including:
- Hash, version, merkle root
- Previous block hash and timestamp
- Size, weight, and transaction count
- Fee statistics
Installation
Quick Setup (Recommended)
- Install the package globally:
npm install -g @jamesanz/bitcoin-mcp
- Run the automated setup script:
# For Claude Desktop
npx @jamesanz/bitcoin-mcp setup claude
# Or show manual instructions
npx @jamesanz/bitcoin-mcp setup manual
- Restart your MCP client (e.g., Claude Desktop)
Manual Setup
If the automated setup doesn't work, you can configure manually:
For Claude Desktop
- Install the package:
npm install -g @jamesanz/bitcoin-mcp
- Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bitcoin-mcp": {
"command": "npx",
"args": ["@jamesanz/bitcoin-mcp"]
}
}
}
- Restart Claude Desktop
For Other MCP Clients
- Install the package:
npm install -g @jamesanz/bitcoin-mcp
-
Configure your MCP client to use:
- Command:
npx - Args:
["@jamesanz/bitcoin-mcp"]
- Command:
-
Restart your MCP client
Development Setup
If you want to run from source:
- Clone this repository:
git clone https://github.com/JamesANZ/bitcoin-mcp.git
cd bitcoin-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
- Run the setup script:
npm run setup claude
Usage
Running the Server
Start the MCP server:
npm start
The server runs on stdio and can be connected to any MCP-compatible client.
Example Queries
Here are some example queries you can make with this MCP server:
Get Address Statistics
{
"tool": "get-address-stats",
"arguments": {
"address": "1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv"
}
}
Get Recent Transactions
{
"tool": "get-address-transactions",
"arguments": {
"address": "1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv",
"limit": 5
}
}
Get Transaction Details
{
"tool": "get-transaction",
"arguments": {
"txid": "15e10745f15593a899cef391191bdd3d7c12412cc4696b7bcb669d0feadc8521"
}
}
Get Block Information
{
"tool": "get-block",
"arguments": {
"block_height": 857808
}
}
API Endpoints
This MCP server uses the following mempool.space API endpoints:
GET /api/address/{address}- Address statisticsGET /api/address/{address}/txs- Address transaction historyGET /api/address/{address}/utxo- Address UTXOsGET /api/tx/{txid}- Transaction detailsGET /api/block/{height}- Block information
Data Format
All amounts are displayed in BTC (converted from satoshis) for better readability. Timestamps are converted to ISO format for easy parsing.
Error Handling
The server includes comprehensive error handling:
- Network errors are caught and reported with descriptive messages
- Invalid addresses or transaction IDs return appropriate error messages
- Rate limiting and API errors are handled gracefully
Dependencies
@modelcontextprotocol/sdk- MCP SDK for server implementationsuperagent- HTTP client for API requestszod- Schema validation for tool parameters
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
Bitcoin & Lightning Network MCP Server
Enable AI models to safely interact with Bitcoin and Lightning Network in a standardized way.
The Bitcoin & Lightning Network MCP Server implements the Model Context Protocol, allowing AI models to interface with Bitcoin and Lightning Network functionalities such as key generation, address validation, transaction decoding, blockchain queries, and lightning payments. It provides standardized endpoints for AI model integration, including support for Claude Desktop and Goose. The solution supports querying blockchain data, parsing transactions and invoices, and managing cryptographic operations in a secure and extensible manner.
- ⭐ 65
- MCP
- AbdelStark/bitcoin-mcp
Hive Intelligence MCP Server
Unified MCP server delivering advanced cryptocurrency and Web3 analytics.
Hive Intelligence MCP Server provides comprehensive cryptocurrency, DeFi, and Web3 analytics via the Model Context Protocol. It enables AI assistants to access and orchestrate over 200 specialized tools covering market data, on-chain analytics, portfolio tracking, and security analysis. The server offers both dynamic and category-specific analytics through a unified MCP interface, facilitating intelligent tool orchestration for diverse crypto data needs.
- ⭐ 7
- MCP
- hive-intel/hive-crypto-mcp
IPLocate MCP Server
Comprehensive IP address geolocation and network intelligence via MCP.
Provides an MCP server interface to IPLocate.io, delivering detailed IP address intelligence including geolocation, network details, privacy detection, and abuse contact information. Easily integrates with popular MCP clients like Cursor and Claude Desktop for seamless IP lookups. Enables users to retrieve geographic, organizational, and security-related data associated with IPv4 and IPv6 addresses by connecting to the IPLocate.io API.
- ⭐ 11
- MCP
- iplocate/mcp-server-iplocate
Web3 MCP
A Model Context Protocol server for unified blockchain data access.
Web3 MCP is a Model Context Protocol server that provides access to blockchain data through Ankr's Advanced API. It allows large language models to interact seamlessly with multiple blockchain networks such as Ethereum, BSC, Polygon, and Avalanche. With support for NFT, token, and blockchain query APIs, it enables users and AI agents to retrieve on-chain data, statistics, and analytics efficiently within an MCP context.
- ⭐ 3
- MCP
- tumf/web3-mcp
NyxDocs
MCP server for real-time cryptocurrency project documentation and insights.
NyxDocs is a Model Context Protocol (MCP) compatible server built in Python for managing and serving up-to-date documentation for cryptocurrency projects. It aggregates information from multiple sources such as CoinGecko, GitHub, GitBook, Notion, and official websites, providing real-time data and updates on blockchain ecosystems. Featuring tools for searching projects, retrieving detailed info, extracting documentation, and monitoring changes, it is tailored for developers and AI contexts needing access to accurate crypto documentation. The architecture leverages a FastMCP-based server core, automated document scrapers, and supports multi-blockchain environments.
- ⭐ 3
- MCP
- nyxn-ai/NyxDocs
ShopSavvy Data API MCP Server
MCP server providing AI assistants with live product data, pricing, and price tracking from ShopSavvy.
ShopSavvy Data API MCP Server implements the Model Context Protocol to enable AI assistants to access and interact with ShopSavvy's extensive product database. It supports product lookup, retrieves current and historical pricing from multiple retailers, and allows scheduled monitoring of product prices. The server also manages API usage analytics and credit consumption, offering robust error handling and developer tools for integration.
- ⭐ 5
- MCP
- shopsavvy/shopsavvy-mcp-server
Didn't find tool you were looking for?