Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-mempool-info

Retrieve real-time Bitcoin mempool data to monitor transaction status and network activity for blockchain analysis.

Instructions

Returns mempool info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'get-mempool-info' tool on the MCP server with a handler that calls MempoolService to get info and returns formatted text content.
    private registerGetMempoolHandler(): void { this.server.tool( "get-mempool-info", "Returns mempool info", async () => { const text = await this.mempoolService.getMempoolInfo(); return { content: [{ type: "text", text }] }; } ); }
  • Inline handler function for the 'get-mempool-info' tool that delegates to service and structures MCP response.
    async () => { const text = await this.mempoolService.getMempoolInfo(); return { content: [{ type: "text", text }] }; }
  • TypeScript interface defining the structure of mempool info response data used by the tool.
    export interface IMempoolInfoResponse { count: number; vsize: number; total_fee: number; }
  • Application service method that fetches raw mempool info and formats it for the tool response.
    async getMempoolInfo(): Promise<string> { const data = await this.requestService.getMempoolInfo(); return formatResponse<IMempoolInfoResponse>("Mempool Info", data); }
  • Infrastructure service method performing the HTTP request to the mempool API endpoint.
    async getMempoolInfo(): Promise<IMempoolInfoResponse | null> { return this.client.makeRequest<IMempoolInfoResponse>(`mempool`); }

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