Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-tx-merkleblock-proof

Retrieve the merkleblock proof for a Bitcoin transaction to verify its inclusion in a block. This tool provides cryptographic proof that a specific transaction exists within the blockchain.

Instructions

Returns the merkleblock proof for a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txidYesThe txid to get merkleblock proof for

Implementation Reference

  • The MCP tool handler function that invokes TxService.getTxMerkleblockProof and returns formatted text content.
    async ({ txid }) => { const text = await this.txService.getTxMerkleblockProof({ txid }); return { content: [{ type: "text", text }] }; }
  • Zod schema defining the input parameter 'txid' for the tool.
    { txid: z.string().length(64).describe("The txid to get merkleblock proof for"), },
  • Method that registers the 'get-tx-merkleblock-proof' tool with MCP server, including description, schema, and handler.
    private registerGetTxMerkleblockProofHandler(): void { this.server.tool( "get-tx-merkleblock-proof", "Returns the merkleblock proof for a transaction", { txid: z.string().length(64).describe("The txid to get merkleblock proof for"), }, async ({ txid }) => { const text = await this.txService.getTxMerkleblockProof({ txid }); return { content: [{ type: "text", text }] }; } ); }
  • TxService helper method that fetches the proof from request service and formats it.
    async getTxMerkleblockProof({ txid }: { txid: string }): Promise<string> { const data = await this.requestService.getTxMerkleblockProof({ txid }); return `Transaction Merkleblock Proof: ${data}`; }
  • Request service helper that performs the actual API call to retrieve the merkleblock proof.
    async getTxMerkleblockProof({ txid }: { txid: string }): Promise<string | null> { return this.client.makeRequest<string>(`tx/${txid}/merkleblock-proof`); }

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