
MCP Blockchain Query Server
🤖 MCP server for querying BTC data via Blockchain.com APIs
What is MCP Blockchain Query Server?
MCP Blockchain Query Server is a server that provides tools for querying Bitcoin (BTC) data using Blockchain.com APIs.
How to use MCP Blockchain Query Server?
To use the server, you need to install the required Python packages and run the server in either stdio or SSE mode.
Key features of MCP Blockchain Query Server?
- Supports both stdio and SSE transports
- Provides various tools for querying BTC data, including:
- Get block by hash
- Get transaction by hash
- Get address by hash
- Get block count
- Get address balance
- Get 24-hour market price
- Get total bitcoins
- Get unconfirmed count
Use cases of MCP Blockchain Query Server?
- Retrieving real-time Bitcoin transaction data.
- Analyzing Bitcoin network statistics.
- Monitoring Bitcoin market prices and trends.
FAQ from MCP Blockchain Query Server?
- What programming language is used for MCP Blockchain Query Server?
The server is developed in Python.
- How can I run the server?
You can run the server using the command
python main.py
for stdio mode orpython main.py --transport sse --port 8000
for SSE mode.
- Is there any documentation available?
Yes, you can find the documentation on the Model Context Protocol website.
MCP Blockchain Query Server
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)