get-address-utxo
Retrieve UTXOs (Unspent Transaction Outputs) for a specific Bitcoin address using this Mempool MCP Server tool. Easily query and analyze blockchain data for transaction insights.
Instructions
Returns UTXOs for an address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The address to get UTXOs for |
Implementation Reference
- src/interface/controllers/AddressToolsController.ts:75-87 (registration)Registers the MCP 'get-address-utxo' tool, including input schema, description, and thin handler that delegates to AddressService.getAddressUtxo and returns formatted text response.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 }] }; } ); }
- Intermediate helper: Retrieves UTXOs from AddressRequestService and formats the response into a string using formatResponse.async getAddressUtxo({ address }: IAddressParameter): Promise<string> { const data = await this.requestService.getAddressUtxo({ address }); return formatResponse<IAddressUtxoResponse[]>("Address UTXOs", data); }
- Core tool implementation: Makes an HTTP request to the API endpoint `/address/${address}/utxo` via IApiClient to fetch the UTXOs for the address.async getAddressUtxo({ address }: { address: string }): Promise<IAddressUtxoResponse[] | null> { return this.client.makeRequest<IAddressUtxoResponse[]>(`address/${address}/utxo`); }