Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-mining-pools

Retrieve real-time mining pools data from the Bitcoin network, providing insights into pool activity and distribution for informed analysis and decision-making.

Instructions

Returns mining pools info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the core logic of the 'get-mining-pools' tool by making an API request to the 'mining/pools' endpoint using the IApiClient.
    async getMiningPools(): Promise<IMiningPoolsResponse[] | null> { return this.client.makeRequest<IMiningPoolsResponse[]>(`mining/pools`); }
  • Registers the MCP tool 'get-mining-pools' with the server, defining its description and handler function that delegates to MiningService.
    private registerGetMiningPoolsHandler(): void { this.server.tool( "get-mining-pools", "Returns mining pools info", async () => { const text = await this.miningService.getMiningPools(); return { content: [{ type: "text", text }] }; } ); }
  • Intermediate service method that fetches data from MiningRequestService and formats it into a string response using formatResponse helper.
    async getMiningPools(): Promise<string> { const data = await this.requestService.getMiningPools(); return formatResponse<IMiningPoolsResponse[]>("Mining Pools", data); }
  • TypeScript interface defining the expected structure of each mining pool in the response array.
    export interface IMiningPoolsResponse { id: string; name: string; hash_rate: number; blocks_mined: number; }

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