Skip to main content
Glama

get_blockchain_info

Retrieve Bitcoin blockchain details including chain status, difficulty, softfork information, chain work, and pruning data through the Bitcoin-MCP server.

Instructions

Get blockchain info: chain, difficulty, softfork statuses, chain work, pruning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Implementation of the get_blockchain_info tool, which queries the Bitcoin RPC's getblockchaininfo method and formats the response.
    @mcp.tool()
    def get_blockchain_info() -> str:
        """Get blockchain info: chain, difficulty, softfork statuses, chain work, pruning."""
        info = get_rpc().getblockchaininfo()
        return json.dumps({
            "chain": info["chain"],
            "blocks": info["blocks"],
            "headers": info["headers"],
            "difficulty": info["difficulty"],
            "verificationprogress": info["verificationprogress"],
            "size_on_disk": info["size_on_disk"],
            "pruned": info["pruned"],
            "softforks": info.get("softforks", {}),
        })

Latest Blog Posts

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/Bortlesboat/bitcoin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server