get-address-txs
Retrieve all transactions associated with a specific Bitcoin address using the Mempool MCP Server, providing detailed blockchain and mempool insights for analysis or verification purposes.
Instructions
Returns transactions for an address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The address to get txs for |
Implementation Reference
- src/interface/controllers/AddressToolsController.ts:33-45 (registration)Registers the 'get-address-txs' MCP tool, including input schema (address: string) and handler function that calls AddressService.getAddressTxs and returns formatted text response.private registerGetAddressTxsHandler(): void { this.server.tool( "get-address-txs", "Returns transactions for an address", { address: z.string().describe("The address to get txs for"), }, async ({ address }) => { const text = await this.addressService.getAddressTxs({ address }); return { content: [{ type: "text", text }] }; } ); }
- Zod input schema for the 'get-address-txs' tool: requires 'address' as string.{ address: z.string().describe("The address to get txs for"), },
- Helper method in AddressService that fetches transactions via requestService and formats the response using formatResponse.async getAddressTxs({ address }: IAddressParameter): Promise<string> { const data = await this.requestService.getAddressTxs({ address }); return formatResponse<IAddressTxResponse[]>("Address Transactions", data); }
- Core handler logic: makes API request to retrieve transactions for the address from the backend endpoint `address/${address}/txs`.async getAddressTxs({ address }: { address: string }): Promise<IAddressTxResponse[] | null> { return this.client.makeRequest<IAddressTxResponse[]>(`address/${address}/txs`); }