Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-mempool-recent

Retrieve recent Bitcoin mempool transactions to monitor pending network activity and analyze transaction flow in real-time.

Instructions

Returns recent mempool transactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'get-mempool-recent' tool with MCP server, including the handler lambda that delegates to MempoolService and returns formatted text.
    private registerGetMempoolRecentHandler(): void { this.server.tool( "get-mempool-recent", "Returns recent mempool transactions", async () => { const text = await this.mempoolService.getMempoolRecent(); return { content: [{ type: "text", text }] }; } ); }
  • Core handler logic for fetching and formatting recent mempool transactions.
    async getMempoolRecent(): Promise<string> { const data = await this.requestService.getMempoolRecent(); return formatResponse<IMempoolRecentResponse[]>("Mempool Recent", data); }
  • Helper method that performs the actual API request to retrieve recent mempool data.
    async getMempoolRecent(): Promise<IMempoolRecentResponse[] | null> { return this.client.makeRequest<IMempoolRecentResponse[]>(`mempool/recent`); }
  • TypeScript interface defining the schema for individual recent mempool transaction responses.
    export interface IMempoolRecentResponse { txid: string; fee: number; vsize: number; value: number; time: 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