query_holders
Identify top token holders by analyzing wallet addresses, balances, percentage of supply, and holder labels like exchanges or whales for any token contract.
Instructions
Get the top holders for a token contract address. Returns wallet addresses, balances, percentage of supply, and holder labels (exchange, whale, contract). Cost: $0.04 per query. Source: On-chain token analytics.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Token contract address (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7) | |
| chain | No | Blockchain network (default: ethereum) | |
| limit | No | Maximum results (default 25) |
Implementation Reference
- src/tools/holders.ts:56-85 (handler)The handler logic for the "query_holders" tool, which fetches holder data from the API and formats it for the MCP response.
async ({ token, chain, limit }) => { const res = await apiGet<HolderQueryResponse>( `/api/v1/holders/${encodeURIComponent(token)}`, { chain, limit: limit ?? 25, }, ); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} holder(s) for token ${token}.`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, - src/tools/holders.ts:31-55 (registration)The tool registration and schema definition for "query_holders".
server.registerTool( "query_holders", { title: "Query Top Holders", description: "Get the top holders for a token contract address. Returns wallet addresses, " + "balances, percentage of supply, and holder labels (exchange, whale, contract). " + "Cost: $0.04 per query. Source: On-chain token analytics.", inputSchema: { token: z .string() .describe("Token contract address (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7)"), chain: z .enum(["ethereum", "arbitrum", "polygon", "base", "bsc"]) .optional() .describe("Blockchain network (default: ethereum)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 25)"), }, },