Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-mempool-txids

Retrieve transaction IDs (txids) from the Bitcoin mempool using this tool. Access real-time data to monitor pending transactions and enhance blockchain analysis.

Instructions

Returns mempool txids

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the MCP tool 'get-mempool-txids'. The inline handler calls MempoolService.getMempoolTxids() and formats the result as text content for the MCP response.
    private registerGetMempoolTxidsHandler(): void { this.server.tool( "get-mempool-txids", "Returns mempool txids", async () => { const text = await this.mempoolService.getMempoolTxids(); return { content: [{ type: "text", text }] }; } ); }
  • Handler logic in MempoolService that fetches raw txids from request service and formats them using formatResponse.
    async getMempoolTxids(): Promise<string> { const data = await this.requestService.getMempoolTxids(); return formatResponse<IMempoolTxidResponse[]>("Mempool Txids", data); }
  • Core helper that makes the API request to the 'mempool/txids' endpoint to retrieve the list of transaction IDs.
    async getMempoolTxids(): Promise<IMempoolTxidResponse[] | null> { return this.client.makeRequest<IMempoolTxidResponse[]>(`mempool/txids`); }
  • Type definition for mempool txid responses, which are strings (txids). Used throughout the chain.
    export type IMempoolTxidResponse = string;

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