Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-tx-merkleblock-proof

Generate a merkleblock proof for a Bitcoin transaction to verify its inclusion in a block. Input a transaction ID (txid) to retrieve the proof, ensuring transaction validity 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

  • Registers the MCP tool 'get-tx-merkleblock-proof' including schema (zod validation for txid), description, and handler lambda that delegates to TxService
    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 }] }; } ); }
  • Zod schema for tool input: txid as 64-char string
    { txid: z.string().length(64).describe("The txid to get merkleblock proof for"),
  • Core handler logic: makes API request to `/tx/${txid}/merkleblock-proof` via IApiClient
    async getTxMerkleblockProof({ txid }: { txid: string }): Promise<string | null> { return this.client.makeRequest<string>(`tx/${txid}/merkleblock-proof`); }
  • Helper wrapper in TxService that calls TxRequestService and adds prefix to response
    async getTxMerkleblockProof({ txid }: { txid: string }): Promise<string> { const data = await this.requestService.getTxMerkleblockProof({ txid }); return `Transaction Merkleblock Proof: ${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