MCP Blockchain Query Server

by pavel-bc

1 stars
155 downloads
Not rated
GitHub

About

πŸ€– MCP server for querying BTC data via Blockchain.com APIs

Details

Author
pavel-bc
GitHub stars
1
Downloads
155
Categories
Other

- Supports both stdio and SSE transport modes
- 17 built-in MCP tools for BTC blockchain queries
- Get block, transaction, and address details by hash
- Retrieve blockchain statistics (difficulty, hash rate, average transaction size)
- Access market price and network metrics (block reward, interval, next retarget)
- Query unconfirmed transaction count and 24-hour transaction count

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Blockchain Query Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies with pip install -r requirements.txt inside a Python virtual environment, then run python main.py for stdio mode or python main.py --transport sse --port 8000 for SSE mode. Optional CLI arguments: --port (default 8000) and --transport (stdio or sse, default stdio).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp blockchain query server": {
            "mcp-blockchain-query": {
                "command": "python",
                "args": [
                    "main.py"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-blockchain-query": {
        "command": "python",
        "args": [
            "main.py"
        ]
    }
}

MCP Blockchain Query Server

Logo

> [!WARNING]
> Majority of the code in this repository was generated using Grok 3 Beta

Model Context Protocol server providing tools for querying BTC data via Blockchain Data and Query APIs.

Demo

https://github.com/user-attachments/assets/b270979b-b22f-467c-bcb4-54bd48504073

Features

- Supports both stdio and SSE transports
- Available tools:
- Get block by hash
- Get transaction by hash
- Get address by hash
- Get block count
- Get difficulty
- Get address balance
- Get hash rate
- Get average transaction size
- Get total bitcoins
- Get probability of finding a block
- Get 24-hour market price
- Get block interval
- Get block reward
- Get next retarget
- Get latest hash
- Get unconfirmed count
- Get 24-hour transaction count

Installation

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Running

Run in stdio mode (default):

$ python main.py

Run in SSE mode:

$ python main.py --transport sse --port 8000

CLI Arguments:

- --port: Port number for SSE transport (default: 8000)
- --transport: Transport type (stdio or sse, default: stdio)

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.