Screen Sanctions
screen_sanctionsScreen names, addresses, or entities against global sanctions lists including OFAC, EU, UN, and UK. Returns matches with scores to identify potential risks.
Instructions
Screen an address, name, or entity against global sanctions lists (OFAC SDN, EU, UN, UK). Returns matching entries with match scores. Cost: $0.005 per query. Source: Consolidated sanctions lists, updated daily.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name or alias to screen | |
| address | No | Crypto address to screen | |
| threshold | No | Minimum match score (0-1, default 0.8) |
Implementation Reference
- src/tools/sanctions.ts:31-87 (registration)Registration of the 'screen_sanctions' tool on the MCP server, including inputSchema (name, address, threshold) and the async handler that calls the API endpoint /api/v1/sanctions/screen.
server.registerTool( "screen_sanctions", { title: "Screen Sanctions", description: "Screen an address, name, or entity against global sanctions lists (OFAC SDN, EU, " + "UN, UK). Returns matching entries with match scores. " + "Cost: $0.005 per query. Source: Consolidated sanctions lists, updated daily.", inputSchema: { name: z .string() .optional() .describe("Name or alias to screen"), address: z .string() .optional() .describe("Crypto address to screen"), threshold: z .number() .min(0) .max(1) .optional() .describe("Minimum match score (0-1, default 0.8)"), }, }, async ({ name, address, threshold }) => { const res = await apiGet<SanctionsQueryResponse>( "/api/v1/sanctions/screen", { name, address, threshold: threshold ?? 0.8, }, ); 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} sanctions match(es).`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, ); - src/tools/sanctions.ts:56-86 (handler)Handler function for screen_sanctions. Calls apiGet to /api/v1/sanctions/screen with name, address, and threshold params, then formats the response as text content with match count and JSON data.
async ({ name, address, threshold }) => { const res = await apiGet<SanctionsQueryResponse>( "/api/v1/sanctions/screen", { name, address, threshold: threshold ?? 0.8, }, ); 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} sanctions match(es).`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, - src/tools/sanctions.ts:39-54 (schema)Input schema for screen_sanctions: optional name (string), optional address (string), optional threshold (number 0-1, default 0.8).
inputSchema: { name: z .string() .optional() .describe("Name or alias to screen"), address: z .string() .optional() .describe("Crypto address to screen"), threshold: z .number() .min(0) .max(1) .optional() .describe("Minimum match score (0-1, default 0.8)"), }, - src/client.ts:44-76 (helper)The apiGet helper function used by the handler to make GET requests to the Verilex API.
export async function apiGet<T = unknown>( path: string, params?: Record<string, string | number | undefined>, ): Promise<ApiResponse<T>> { const url = buildUrl(path, params); const headers: Record<string, string> = { Accept: "application/json", "User-Agent": "verilex-mcp-server/0.1.0", }; // Forward x402 payment token if present in env (for paid endpoints) const paymentToken = process.env.VERILEX_PAYMENT_TOKEN; if (paymentToken) { headers["X-Payment-Token"] = paymentToken; } const res = await fetch(url, { headers }); const data = (await res.json()) as T; const stale = res.headers.get("X-Data-Stale"); const lastUpdated = res.headers.get("X-Data-Last-Updated"); const ageSeconds = res.headers.get("X-Data-Age-Seconds"); return { ok: res.ok, status: res.status, data, stale: stale === "true", lastUpdated: lastUpdated ?? undefined, ageSeconds: ageSeconds ? Number(ageSeconds) : undefined, }; } - src/client.ts:35-41 (helper)The stalenessWarning helper function used by the handler to add a staleness warning if data is stale.
export function stalenessWarning(res: ApiResponse): string { if (!res.stale) return ""; const parts = ["[STALE DATA]"]; if (res.lastUpdated) parts.push(`Last updated: ${res.lastUpdated}`); if (res.ageSeconds != null) parts.push(`Age: ${res.ageSeconds}s`); return parts.join(" ") + "\n\n"; }