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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/interface/controllers/StatsToolsController.ts:14-23 (registration)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`); }