Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-address-txs-mempool

Retrieve pending Bitcoin transactions for a specific address in the mempool. This tool enables users to access real-time unconfirmed transactions, providing insights into Bitcoin network activity.

Instructions

Returns mempool transactions for an address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe address to get mempool txs for

Implementation Reference

  • Core handler function that executes the tool logic by making an API request to the endpoint `address/${address}/txs/mempool` to fetch mempool transactions for the address.
    async getAddressTxsMempool({ address }: { address: string }): Promise<IAddressTxResponse[] | null> { return this.client.makeRequest<IAddressTxResponse[]>(`address/${address}/txs/mempool`); }
  • TypeScript interface defining the structure of address transaction responses (output schema for the tool).
    export interface IAddressTxResponse { txid: string; status: { confirmed: boolean; block_height?: number; block_hash?: string; block_time?: number; }; vin: any[]; vout: any[]; }
  • Registers the 'get-address-txs-mempool' MCP tool with input schema (zod string address) and a handler that delegates to AddressService.
    private registerGetAddressTxsMempoolHandler(): void { this.server.tool( "get-address-txs-mempool", "Returns mempool transactions for an address", { address: z.string().describe("The address to get mempool txs for"), }, async ({ address }) => { const text = await this.addressService.getAddressTxsMempool({ address }); return { content: [{ type: "text", text }] }; } ); }
  • Helper service method that calls the request service and formats the response using formatResponse.
    async getAddressTxsMempool({ address }: IAddressParameter): Promise<string> { const data = await this.requestService.getAddressTxsMempool({ address }); return formatResponse<IAddressTxResponse[]>( "Address Mempool Transactions", data ); }

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