Bitcoin MCP Server

Bitcoin MCP Server

Real-time Bitcoin blockchain data server for MCP clients.

0
Stars
2
Forks
0
Watchers
0
Issues
Provides tools to deliver real-time Bitcoin blockchain data for use with Model Context Protocol (MCP) clients. Offers specialized endpoints for querying blockchain addresses, transactions, UTXOs, and block information by interfacing with the mempool.space API. Supports easy installation and integration with popular MCP clients, enabling seamless access to blockchain analytics.

Key Features

Provides real-time Bitcoin address statistics
Retrieves transaction history for Bitcoin addresses
Fetches UTXO information for specified addresses
Delivers detailed Bitcoin transaction data
Returns block information by height
Integrates easily with MCP clients (e.g. Claude Desktop)
Supports both automated and manual setup
Runs as a server over stdio for flexibility
Utilizes mempool.space API for up-to-date data
Configurable and extensible for development use cases

Use Cases

Tracking the balances and activity of specific Bitcoin addresses
Monitoring and analyzing recent or historical Bitcoin transactions
Detecting and reviewing unspent transaction outputs for wallet auditing
Obtaining comprehensive information about specific Bitcoin blocks
Integrating blockchain data feeds into AI-powered applications or bots
Supporting research and analytics on Bitcoin transaction patterns
Facilitating compliance and anti-fraud investigations
Powering dashboards with live Bitcoin mempool and blockchain data
Generating alerts or reports for address or transaction events
Enhancing cryptocurrency tools with standardized blockchain data access

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 query
  • limit (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 query
  • limit (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)

  1. Install the package globally:
bash
npm install -g @jamesanz/bitcoin-mcp
  1. Run the automated setup script:
bash
# For Claude Desktop
npx @jamesanz/bitcoin-mcp setup claude

# Or show manual instructions
npx @jamesanz/bitcoin-mcp setup manual
  1. Restart your MCP client (e.g., Claude Desktop)

Manual Setup

If the automated setup doesn't work, you can configure manually:

For Claude Desktop

  1. Install the package:
bash
npm install -g @jamesanz/bitcoin-mcp
  1. 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

json
{
  "mcpServers": {
    "bitcoin-mcp": {
      "command": "npx",
      "args": ["@jamesanz/bitcoin-mcp"]
    }
  }
}
  1. Restart Claude Desktop

For Other MCP Clients

  1. Install the package:
bash
npm install -g @jamesanz/bitcoin-mcp
  1. Configure your MCP client to use:

    • Command: npx
    • Args: ["@jamesanz/bitcoin-mcp"]
  2. Restart your MCP client

Development Setup

If you want to run from source:

  1. Clone this repository:
bash
git clone https://github.com/JamesANZ/bitcoin-mcp.git
cd bitcoin-mcp
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build
  1. Run the setup script:
bash
npm run setup claude

Usage

Running the Server

Start the MCP server:

bash
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

json
{
  "tool": "get-address-stats",
  "arguments": {
    "address": "1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv"
  }
}

Get Recent Transactions

json
{
  "tool": "get-address-transactions",
  "arguments": {
    "address": "1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv",
    "limit": 5
  }
}

Get Transaction Details

json
{
  "tool": "get-transaction",
  "arguments": {
    "txid": "15e10745f15593a899cef391191bdd3d7c12412cc4696b7bcb669d0feadc8521"
  }
}

Get Block Information

json
{
  "tool": "get-block",
  "arguments": {
    "block_height": 857808
  }
}

API Endpoints

This MCP server uses the following mempool.space API endpoints:

  • GET /api/address/{address} - Address statistics
  • GET /api/address/{address}/txs - Address transaction history
  • GET /api/address/{address}/utxo - Address UTXOs
  • GET /api/tx/{txid} - Transaction details
  • GET /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 implementation
  • superagent - HTTP client for API requests
  • zod - Schema validation for tool parameters

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Star History

Star History Chart

Repository Owner

JamesANZ
JamesANZ

User

Repository Details

Language TypeScript
Default Branch main
Size 30 KB
Contributors 2
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
63.14%
JavaScript
36.86%

Tags

Topics

bitcoin llms mcp-server

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Bitcoin & Lightning Network MCP Server

    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

    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

    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

    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

    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

    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?

    Be as detailed as possible for better results