Lookup Address Label
lookup_labelLook up label and risk score for any cryptocurrency address. Returns entity name, category, risk flags, and compliance tags for due diligence.
Instructions
Look up the label and risk score for a cryptocurrency address. Returns entity name, category (exchange, DeFi, bridge, etc.), risk flags, and compliance tags. Cost: $0.009 per query. Source: On-chain address intelligence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Crypto address to look up (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7) |
Implementation Reference
- src/tools/labels.ts:44-67 (handler)The async handler function that executes the 'lookup_label' tool logic. It calls apiGet on /api/v1/labels/{address}, handles 404 vs other errors, and returns the label data as JSON text.
async ({ address }) => { const res = await apiGet<{ dataset: string; data: Record<string, unknown> }>( `/api/v1/labels/${encodeURIComponent(address)}`, ); if (!res.ok) { const msg = res.status === 404 ? `No label found for address ${address}.` : `API error (${res.status}): ${JSON.stringify(res.data)}`; return { content: [{ type: "text" as const, text: msg }], isError: res.status !== 404, }; } const warn = stalenessWarning(res); return { content: [ { type: "text" as const, text: `${warn}${JSON.stringify(res.data.data, null, 2)}` }, ], }; }, ); - src/tools/labels.ts:38-42 (schema)Input schema for the lookup_label tool: requires a single 'address' string parameter describing the crypto address to look up.
inputSchema: { address: z .string() .describe("Crypto address to look up (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7)"), }, - src/tools/labels.ts:30-67 (registration)Registration of the 'lookup_label' tool via server.registerTool with its name, metadata (title, description), input schema, and handler function.
server.registerTool( "lookup_label", { title: "Lookup Address Label", description: "Look up the label and risk score for a cryptocurrency address. Returns entity name, " + "category (exchange, DeFi, bridge, etc.), risk flags, and compliance tags. " + "Cost: $0.009 per query. Source: On-chain address intelligence.", inputSchema: { address: z .string() .describe("Crypto address to look up (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7)"), }, }, async ({ address }) => { const res = await apiGet<{ dataset: string; data: Record<string, unknown> }>( `/api/v1/labels/${encodeURIComponent(address)}`, ); if (!res.ok) { const msg = res.status === 404 ? `No label found for address ${address}.` : `API error (${res.status}): ${JSON.stringify(res.data)}`; return { content: [{ type: "text" as const, text: msg }], isError: res.status !== 404, }; } const warn = stalenessWarning(res); return { content: [ { type: "text" as const, text: `${warn}${JSON.stringify(res.data.data, null, 2)}` }, ], }; }, ); - src/index.ts:23-23 (registration)Import of registerLabelTools from the labels module, necessary for the tool to be registered on the MCP server.
import { registerLabelTools } from "./tools/labels.js"; - src/index.ts:50-50 (registration)Registration call that invokes registerLabelTools(server), which internally registers the 'lookup_label' tool.
registerLabelTools(server);