Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-tx-outspends

Check if a Bitcoin transaction's outputs have been spent by querying outspend information for all outputs using the transaction ID.

Instructions

Returns outspends info for all outputs of a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txidYesThe txid to get outspends for

Implementation Reference

  • Registers the 'get-tx-outspends' MCP tool, including input schema validation with Zod and the handler function that delegates to TxService.getTxOutspends() and returns formatted text response.
    private registerGetTxOutspendsHandler(): void { this.server.tool( "get-tx-outspends", "Returns outspends info for all outputs of a transaction", { txid: z.string().length(64).describe("The txid to get outspends for"), }, async ({ txid }) => { const text = await this.txService.getTxOutspends({ txid }); return { content: [{ type: "text", text }] }; } );
  • Helper method in TxService that calls TxRequestService.getTxOutspends and formats the response using formatResponse.
    async getTxOutspends({ txid }: { txid: string }): Promise<string> { const data = await this.requestService.getTxOutspends({ txid }); return formatResponse<any[]>("Transaction Outspends", data); }
  • Core implementation that executes the API request to fetch outspends data for the transaction via the IApiClient.
    async getTxOutspends({ txid }: { txid: string }): Promise<any[] | null> { return this.client.makeRequest<any[]>(`tx/${txid}/outspends`); }

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