Skip to main content
Glama

get_network_info

Retrieve Bitcoin network details including protocol version, connection status, relay fees, and warnings to monitor blockchain health and API server network view.

Instructions

Get network info: protocol version, relay fee, connections, warnings. In hosted API mode, reflects the API server's network view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `get_network_info` tool implementation in `src/bitcoin_mcp/server.py`. It calls the RPC `getnetworkinfo` method and formats the result.
    @mcp.tool()
    def get_network_info() -> str:
        """Get network info: protocol version, relay fee, connections, warnings. In hosted API mode, reflects the API server's network view."""
        info = get_rpc().getnetworkinfo()
        return json.dumps({
            "version": info["version"],
            "subversion": info["subversion"],
            "protocolversion": info["protocolversion"],
            "connections": info["connections"],
            "connections_in": info.get("connections_in", 0),
            "connections_out": info.get("connections_out", 0),
            "relayfee": info["relayfee"],
            "warnings": info.get("warnings", ""),
        })

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