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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/interface/controllers/MempoolToolsController.ts:38-47 (registration)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; }