eth_lookup
Look up Ethereum addresses to retrieve transaction history, token holdings, and wallet activity for blockchain analysis and security research.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Ethereum address to lookup |
Implementation Reference
- src/tools/crypto.ts:35-52 (handler)The lookupEth method inside the CryptoApiClient class implements the actual logic for fetching Ethereum address information.
async lookupEth(address: string): Promise<any> { try { // Using BlockCypher for ETH (free tier) const response = await fetch(`https://api.blockcypher.com/v1/eth/main/addrs/${address}/balance`); if (!response.ok) throw new Error("ETH Address not found or API error"); const data = await response.json() as any; return { address: data.address, totalReceived: data.total_received / 1e18, totalSent: data.total_sent / 1e18, balance: data.balance / 1e18, nTx: data.n_tx, }; } catch (error) { throw new McpError(ErrorCode.InternalError, `ETH Lookup error: ${(error as Error).message}`); } } - src/index.ts:573-581 (registration)The eth_lookup tool is registered here using server.tool, taking an address argument and calling the cryptoClient.lookupEth handler.
server.tool( "eth_lookup", { address: z.string().describe("Ethereum address to lookup") }, async ({ address }) => { const result = await cryptoClient.lookupEth(address); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }