hyperd.token.security
Assess a token's security risk with a score from 0 to 100. Analyzes honeypot risk, owner permissions, holder concentration, taxes, and source verification. Returns risk band and structured findings for informed trading decisions.
Instructions
Get a token's security risk score (0-100). Ensemble of GoPlus signals: honeypot detection, owner permissions, holder concentration, buy/sell taxes, source verification. Returns score, band (safe/caution/warning/danger), and structured findings. Costs $0.05 in USDC.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contract | Yes | Token contract address | |
| chain | No | Chain. Default 'base'. |
Implementation Reference
- src/server.ts:246-255 (handler)Defines and registers the hyperd.token.security MCP tool. The handler calls paidGet('/api/token/security', args) which performs an x402-paid GET to the hyperD API, passing contract address and optional chain as query params.
// hyperd.token.security — security risk score ($0.05) server.tool( "hyperd.token.security", "Get a token's security risk score (0-100). Ensemble of GoPlus signals: honeypot detection, owner permissions, holder concentration, buy/sell taxes, source verification. Returns score, band (safe/caution/warning/danger), and structured findings. Costs $0.05 in USDC.", { contract: z.string().describe("Token contract address"), chain: z.string().optional().describe("Chain. Default 'base'."), }, async (args) => asText(await paidGet("/api/token/security", args)), ); - src/server.ts:250-253 (schema)Zod schema defining input validation for the tool: 'contract' (required string) and 'chain' (optional string, defaults to 'base').
{ contract: z.string().describe("Token contract address"), chain: z.string().optional().describe("Chain. Default 'base'."), }, - src/server.ts:247-255 (registration)Registers the 'hyperd.token.security' tool on the MCP server via server.tool(), providing name, description, input schema, and handler function.
server.tool( "hyperd.token.security", "Get a token's security risk score (0-100). Ensemble of GoPlus signals: honeypot detection, owner permissions, holder concentration, buy/sell taxes, source verification. Returns score, band (safe/caution/warning/danger), and structured findings. Costs $0.05 in USDC.", { contract: z.string().describe("Token contract address"), chain: z.string().optional().describe("Chain. Default 'base'."), }, async (args) => asText(await paidGet("/api/token/security", args)), ); - src/server.ts:79-92 (helper)Helper function paidGet used by the tool handler. Performs a paid x402-authenticated GET request to the hyperD API, handling payment challenges (HTTP 402) via the x402 protocol.
async function paidGet( path: string, query: Record<string, string | number | boolean | undefined>, ): Promise<unknown> { if (!httpClient) { throw new Error(WALLET_NOT_CONFIGURED_MSG); } const url = new URL(`${API_BASE}${path}`); for (const [k, v] of Object.entries(query)) { if (v !== undefined && v !== "" && v !== null) url.searchParams.set(k, String(v)); } return paidRequest("GET", url, undefined); }