Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-stats-info

Retrieve real-time Bitcoin network statistics and blockchain data from the Mempool MCP Server for comprehensive network analysis.

Instructions

Returns stats info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the MCP tool 'get-stats-info'. The provided handler fetches formatted stats info from StatsService and returns it as structured text content.
    private registerGetStatsHandler(): void { this.server.tool( "get-stats-info", "Returns stats info", async () => { const text = await this.statsService.getStatsInfo(); return { content: [{ type: "text", text }] }; } ); }
  • TypeScript interface defining the structure of the stats response data from the API.
    export interface IStatsResponse { average_fee: number; average_tx_size: number; block_count: number; mempool_size: number; mempool_txs: number; total_fees: number; total_output: number; total_size: number; total_weight: number; }
  • Service method that retrieves raw stats data via StatsRequestService and formats it using formatResponse utility.
    async getStatsInfo(): Promise<string> { const data = await this.requestService.getStatsInfo(); return formatResponse<IStatsResponse>("Stats Info", data); }
  • Core implementation that makes the HTTP request to the `/stats` API endpoint using IApiClient.
    async getStatsInfo(): Promise<IStatsResponse | null> { return this.client.makeRequest<IStatsResponse>(`stats`); }

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/alexandresanlim/mempool-mcp-server'

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