Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-block-txids

Retrieve transaction IDs for a specific Bitcoin block by providing its hash. This tool accesses blockchain data to list all transaction identifiers within a given block.

Instructions

Returns txids for a block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesThe block hash to get txids for

Implementation Reference

  • Registers the 'get-block-txids' MCP tool, including description, input schema (hash: 64-char string), and handler that delegates to BlocksService and formats response as text.
    private registerGetBlockTxidsHandler(): void { this.server.tool( "get-block-txids", "Returns txids for a block", { hash: z.string().length(64).describe("The block hash to get txids for"), }, async ({ hash }) => { const text = await this.blocksService.getBlockTxids({ hash }); return { content: [{ type: "text", text }] }; } ); }
  • Application service method that retrieves block txids via request service and formats the response using formatResponse.
    async getBlockTxids({ hash }: IHashParameter): Promise<string> { const data = await this.requestService.getBlockTxids({ hash }); return formatResponse<IBlockTxidsResponse[]>("Block Txids", data); }
  • Infrastructure service method implementing the core logic: API request to `/block/{hash}/txids` via IApiClient.
    async getBlockTxids({ hash }: { hash: string }): Promise<IBlockTxidsResponse[] | null> { return this.client.makeRequest<IBlockTxidsResponse[]>(`block/${hash}/txids`); }

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