Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-address-utxo

Retrieve unspent transaction outputs (UTXOs) for a Bitcoin address to check available funds and transaction history.

Instructions

Returns UTXOs for an address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe address to get UTXOs for

Implementation Reference

  • Registers the 'get-address-utxo' MCP tool with server, including input schema and execution handler.
    private registerGetAddressUtxoHandler(): void { this.server.tool( "get-address-utxo", "Returns UTXOs for an address", { address: z.string().describe("The address to get UTXOs for"), }, async ({ address }) => { const text = await this.addressService.getAddressUtxo({ address }); return { content: [{ type: "text", text }] }; } ); }
  • Core handler implementation: performs the API request to retrieve UTXOs for the address.
    async getAddressUtxo({ address }: { address: string }): Promise<IAddressUtxoResponse[] | null> { return this.client.makeRequest<IAddressUtxoResponse[]>(`address/${address}/utxo`); }
  • Helper service method that fetches UTXOs and formats the response.
    async getAddressUtxo({ address }: IAddressParameter): Promise<string> { const data = await this.requestService.getAddressUtxo({ address }); return formatResponse<IAddressUtxoResponse[]>("Address UTXOs", data); }
  • Type definition for the UTXO response structure used in the tool.
    export interface IAddressUtxoResponse { txid: string; vout: number; value: number; status: { confirmed: boolean; block_height?: number; block_hash?: string; block_time?: number; }; }

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