MCP server + Agent Skill: let your AI agent screen addresses, check sanctions and trace funds
The ChainAnalyzer MCP server (npm package chainanalyzer-mcp, MIT license) gives AI agents access to 12 chains, 76+ detection rules, ML anomaly scoring and graph analysis through the 8 tools below. The Agent Skill (SKILL.md) that ships with it tells the agent which tool to call, and in what order.
| Tool | What it does | Coverage | x402 price |
|---|---|---|---|
| sanctions_check | Screens against sanctions lists (OFAC, EU, UK, UN, JFSA and others) and ScamDB | Addresses on all 12 chains | $0.05 |
| hack_exposure_lookup | Is the address connected to stolen funds from a known hack (e.g. Binance 2026)? Returns hop distance from the attacker, role and lower-bound amounts per incident | EVM chains + TRON + Solana + Bitcoin | $0.05 |
| check_address_risk | AML risk score (0-100), risk level, detections with evidence, ML anomaly score | All 12 chains | $0.10 |
| trace_transaction | Transaction fund-flow tracing with ML anomaly detection | Transaction hash (chain can be specified) | $0.30 |
| detect_coinjoin | CoinJoin, mixing and tumbling pattern detection | Bitcoin only | $0.10 |
| cluster_wallet | Finds addresses likely controlled by the same actor via graph analysis | Address (chain can be specified) | $0.25 |
| batch_screening | AML screening for up to 50 addresses in one call | All 12 chains | $2.50 |
| bridge_flow_trace | Follows funds across bridges; detects NEAR Intents, Wormhole, Stargate, Across, deBridge, Hop and Synapse solvers | EVM chains + Solana + Kaia | $0.50 |
Prices are per call in x402 (pay-per-request) mode. With an API key, each call uses one scan from your monthly quota instead.
In Claude Code, the MCP server and the Agent Skill install together as one plugin. Run these two commands inside Claude Code:
/plugin marketplace add rascal-3/chainanalyzer-mcp
/plugin install chainanalyzer-aml@chainanalyzer Then set your API key in the environment of the shell that launches Claude Code. The plugin reads it from there.
export CHAINANALYZER_API_KEY=tfk_...
# or, pay per request with USDC (no account):
# export X402_PRIVATE_KEY=... Restart Claude Code and ask something like "Is this address sanctioned?" — the agent follows the skill and calls the tools.
Cursor, Codex CLI, Gemini CLI, OpenClaw and other agents that read SKILL.md can use the same skill. Two steps:
1. Add the skill: copy the skills/chainanalyzer-aml/ folder from the GitHub repository into your agent's skills directory, or run:
npx skills add rascal-3/chainanalyzer-mcp 2. Configure the MCP server: add this to your agent's MCP configuration (claude_desktop_config.json for Claude Desktop). Requires Node.js 18+.
{
"mcpServers": {
"chainanalyzer-aml": {
"command": "npx",
"args": ["-y", "chainanalyzer-mcp"],
"env": {
"CHAINANALYZER_API_KEY": "tfk_..."
}
}
}
} MCP clients that do not read skills can still use all 8 tools through the MCP server alone; tool choice and ordering are then left to the agent.
You can also call ChainAnalyzer directly from your agent code without MCP. For the Vercel AI SDK we publish the npm package @chainanalyzer/ai-sdk: four tools (sanctions check, hack exposure, freeze status, risk score), paid per call over x402 (USDC on Base) or with an API key, with a per-call spend cap and a dry-run mode that stops before signing.
npm install @chainanalyzer/ai-sdk ai zod
import { generateText, stepCountIs } from "ai"
import { chainAnalyzerTools } from "@chainanalyzer/ai-sdk"
const { text } = await generateText({
model, // any AI SDK model
tools: chainAnalyzerTools({ maxUsdPerCall: "1.00" }),
stopWhen: stepCountIs(5),
prompt: "Screen 0x5227f603c1ee34ce3c06efe6477003bdfccb2f8c (Ethereum) before crediting a deposit.",
}) Set X402_PRIVATE_KEY (a dedicated low-balance wallet) or CHAINANALYZER_API_KEY. The $2.50 batch tool is only added when you pass includeBatch.
Examples for LangChain, OpenAI Agents SDK and ElizaOS are in examples/ on GitHub. examples/ ・ npm
Pick one of two modes.
Sign in at chain-analyzer.com, create a tfk_ key under Settings → API Keys, and set it as CHAINANALYZER_API_KEY. Keys can be issued on every plan, Free included. Each tool call uses one scan from your monthly quota.
| Plan | Request limit |
|---|---|
| Free | 10 requests/min (10 scans/month) |
| Starter | 30 requests/min |
| Pro | 60 requests/min |
| Business | 120 requests/min |
| Enterprise | 300 requests/min |
Monthly scan quotas differ by plan. See the pricing page for current numbers. Pricing
You can also skip the account and pay per call in USDC on Base or Solana. Set X402_PRIVATE_KEY to the wallet key and X402_NETWORK to base or solana. Use a dedicated wallet holding only a small balance.
"env": {
"X402_PRIVATE_KEY": "your_wallet_private_key",
"X402_NETWORK": "base"
} This is the flow when an AI agent pays by card on behalf of a user. Every payment goes through the normal chain-analyzer.com checkout (Stripe Checkout).
Sign up at chain-analyzer.com with an email and password, or with a Google or GitHub account.
For email-and-password sign-ups, the user opens the link in the confirmation email themselves; the agent does not do this step for them. Google and GitHub sign-ups skip this step.
Buy a one-time scan pack from Account → Usage — available on the Free plan too (50 scans for $2.99, 200 scans for $9.99; valid for 90 days) — or subscribe to a monthly plan (Starter $4.99/mo (200 scans/mo), Pro $19.99/mo (1,000 scans/mo), Business $199.99/mo (3,000 scans/mo)) from the pricing page. The 500-scan pack needs the Pro plan or above.
Under Settings → API Keys, create a tfk_ key and set it as CHAINANALYZER_API_KEY.
Use the REST API or the MCP server. Pack scans are used one per call, only after the plan's monthly scans run out. Rate limits, history retention and features stay those of your plan.
To pay per call without an account, use x402 (USDC). Always pay to the payTo in the 402 response. x402 details
An MCP server only exposes tools; it does not decide when to use them or in what order. The Agent Skill gives the agent that judgment.
bc1 / 1 / 3 prefixes are Bitcoin, T plus 33 characters is TRON, r is XRP, 32-44 Base58 characters is Solana, and 0x plus 40 hex is EVM. Because the format alone does not say which EVM chain, the agent uses the chain you named, or defaults to Ethereum and says so. Base58 addresses are never lower-cased.
It calls sanctions_check, then check_address_risk. A sanctions hit is reported right away. It moves on to cluster_wallet, trace_transaction or bridge_flow_trace only when risk is medium or above, when detections mention mixers or bridges, or when you ask it to follow the money.
In x402 mode, if a single turn would cost more than about $5 (several traces, or a batch), the agent asks you first.
The answer opens with one line — risk level, score, sanctions status — followed by the evidence behind each detection (tx hash, counterparty label, amount). Next steps are offered as options for your own compliance policy (keep monitoring, enhanced due diligence, escalate), never as a decision to file a report. A "safe" result is never presented as a guarantee.
The Free plan costs nothing. Create an account, issue a key under Settings → API Keys, and your agent can start calling the tools.
© 2026 ChainAnalyzer. All rights reserved.