402sentinel-mcp
This MCP server lets an AI agent vet x402 payments before spending USDC — checking counterparties, payment instructions, tokenized assets, and compliance — and returns risk scores plus enforceable wallet policies.
Assess seller risk (
assess_counterparty,assess_counterparty_deep): 0–100 risk score, allow/review/block decision, confidence/coverage, and a ready-to-apply recommended policy from on-chain Base settlement behaviour.Convert risk into spending policy (
recommend_policy): per-counterparty cap, daily cap, denylisting, and human-approval requirements.Buyer-side payment firewall (
firewall): detects fraudulent routing, drain velocity, overcharges, prompt-injection destinations, intent mismatch, new-counterparty bursts, and poisoned-memory loops.Seed and train the firewall (
firewall_record,firewall_outcome): free tools to establish payment-history baselines and report whether verdicts were accurate.Compliance screening (
compliance_check): OFAC sanctions, counterparty due-diligence tier, structuring/smurfing detection, and FATF Travel-Rule threshold (informational).RWA risk gate (
assess_rwa): detect permissioned securities that can be bought but not transferred/redeemed, live pause state, issuer identity, and issuer sanctions.Opt-in verified badge (
verify_service): submit your own payTo for a deep settlement-graph audit and receive a signed time-boxed credential plus public allow-list inclusion.Close the feedback loop (
report_outcome): free post-payment delivery reporting to improve future scoring.Payment handling: paid tools cost $0.002–$0.02 and auto-pay in USDC on Base via x402 (no gas needed); free tools need no key.
Deployment constraint: version 0.9.0 has no default endpoint and refuses
402sentinel.com; you must point it only at a trustedSENTINEL_URL.
Enables AI agents to assess counterparty risk scores and enforce payment policies using Circle's x402 payment infrastructure for automatic USDC microtransactions on Base.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@402sentinel-mcp Assess counterparty 0xabc for 10 USDC payment."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
402sentinel-mcp
Retirement notice. The 402Sentinel service this package talks to (402sentinel.com) will be retired on 31 October 2026, and the domain will not be renewed (it lapses in May 2027). After 31 October the default endpoint stops answering; after May 2027 the domain may be controlled by someone else. This package can make x402 payments, so do not keep a version that defaults to 402sentinel.com — uninstall it, or point it only at an endpoint you trust. The package is deprecated; the code stays here under its licence.
0.9.0 (final release): there is no default endpoint any more, and 402sentinel.com is refused even if you set it, so this version can never send requests or payments to the retired domain. Set SENTINEL_URL only to a server you run and trust.
MCP tools that let your AI agent check an x402 counterparty's risk before it
pays — and turn that risk into an enforceable wallet spending policy. Give it a
payTo address, get back a 0–100 risk score + an allow / review / block
decision, scored from on-chain settlement behaviour on Base (address age,
facilitator-aware payer diversity, settlement maturity) + a delivery-outcome
flywheel, with honest confidence/coverage.
Tools — vet the seller:
assess_counterparty($0.002) — risk score + decision + a ready-to-applyrecommended_policyassess_counterparty_deep($0.02) — same, scans more on-chain historyrecommend_policy($0.002) — decision + wallet-ready spending policy (caps, denylist, approval)report_outcome(free) — after paying, report delivery to train the reliability flywheel
Tools — vet the payment itself (buyer-side):
firewall($0.002) — should YOUR agent make THIS payment now? Catches fraudulent routing (payTo swapped vs the address you usually pay), drain velocity, overcharge, and injection-sourced instructions.agent_id+ a wallet-ownership signature are attached automatically from your configured wallet — trusted routing history with no extra steps.firewall_record(free) — seed your agent's payment history so the firewall has a behavioural baseline.firewall_outcome(free) — after a verdict, report what actually happened (fraud / legit / …) so the firewall learns which signals are predictive and downweights noisy ones (safety signals stay deterministic).
Tools — vet the asset and the flow:
assess_rwa($0.02) — RWA risk gate: score a tokenized asset (treasury/stock/credit) before buying it. Proxy-aware transfer-restriction scan + behavioral transfer simulation — catches permissioned securities an agent can buy but not transfer or redeem (trapped funds), live pause state, issuer identity + issuer sanctions.compliance_check($0.02) — pre-pay compliance screen: OFAC sanctions (hard block), counterparty due-diligence tier, structuring/smurfing detection, FATF Travel-Rule threshold (informational). Not legal advice.verify_service($0.02) — opt-in 402Sentinel Verified badge: submit your own payTo for a deep settlement-graph audit; pass → signed time-boxed credential + public allow-list. Failures stay private.
It's a thin client for the hosted service at https://402sentinel.com — the scoring model and facilitator-identification logic live server-side (closed); this package only forwards the request and pays for it, so it's open source.
Quickstart — gate a payment in 5 lines
Before your agent pays any x402 counterparty, ask the firewall; if it doesn't say
allow, don't pay. No MCP needed — any standard x402 v2 client works:
import { x402Client, x402HTTPClient } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const http = new x402HTTPClient(client);
const body = JSON.stringify({
payment: { payto_address: target, amount, resource_url },
context: { source: "web_content", untrusted_text: pageYouActedOn }, // pass what you scraped
});
const url = "https://402sentinel.com/api/firewall";
const init = (h = {}) => ({ method: "POST", headers: { "Content-Type": "application/json", ...h }, body });
const r1 = await fetch(url, init());
const pr = http.getPaymentRequiredResponse((n) => r1.headers.get(n), await r1.json());
const payment = http.encodePaymentSignatureHeader(await http.createPaymentPayload(pr));
const data = await (await fetch(url, init(payment))).json();
if (data.decision !== "allow") throw new Error(`402Sentinel ${data.decision}: ${data.recommended_action}`);
// …safe to pay `target`.That one $0.002 call catches fraudulent routing (payTo swapped vs the address you
usually pay), prompt-injection payments (a payTo that appeared in untrusted_text),
drains, overcharges, and sanctioned/illicit counterparties.
In an MCP framework (Claude, Cursor, …) instead, just add the server — your agent gets all 10 tools by name (see Configure below):
{ "mcpServers": { "402sentinel": { "command": "402sentinel-mcp", "env": { "CLIENT_PRIVATE_KEY": "0x…" } } } }Related MCP server: Satoshkin AML/KYT MCP Server
Install
npm i -g @kaditang/402sentinel-mcpConfigure
Add to your MCP client (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"402sentinel": {
"command": "402sentinel-mcp",
"env": {
"CLIENT_PRIVATE_KEY": "0x... // a Base wallet holding USDC on-chain (no ETH/gas needed)"
}
}
}
}Paid calls cost from $0.002 (shallow) to $0.02 (deep), paid automatically
in USDC via standard x402 (exact EIP-3009 on Base — the facilitator submits the
transfer, so the buyer needs no gas) from the configured wallet. The free tools
need no key.
Use
The agent calls it before authorizing a payment:
assess_counterparty({
target: { payto_address: "0x..." },
payment_context: { amount: 10, asset: "USDC" },
policy: { block_at_score: 70, review_at_score: 40 }
})
→ { decision: "review", risk_score: 52, confidence: 0.41, coverage: {...},
dimensions: [...], recommendation: "...",
recommended_policy: { action: "limit", max_payment_usdc: 5, daily_cap_usdc: 15,
add_to_denylist: false, require_human_approval: true } }block/deny→ don't payreview/limit→ cap exposure / escrow (userecommended_policyfor the caps)allow→ proceed
recommend_policy(...) returns just the decision + recommended_policy — apply
max_payment_usdc / daily_cap_usdc / add_to_denylist directly to your agent
wallet's spending limits. After paying, call report_outcome({ assessment_id, outcome }) to improve future scores.
Disclaimer
Algorithmic risk signal, informational only — not advice, not an endorsement, and not an accusation about any party. Scores are probabilistic estimates from limited public on-chain data and heuristics, and may misclassify. Do your own due diligence; don't rely on it as your sole basis to pay or refuse. See https://402sentinel.com/terms.
MIT.
Available Tools
10 toolsassess_counterpartyA
Assess the risk of an x402 counterparty (a payTo address) BEFORE paying. Returns a 0-100 risk_score, an allow/review/block decision, honest confidence/coverage, and a ready-to-apply recommended_policy (per-counterparty caps + approval/denylist), scored from on-chain settlement behaviour on Base + a delivery-outcome flywheel. Call before authorizing any x402 payment above your risk threshold. Costs $0.002 (paid automatically in USDC).
Inputs: target (required), policy, payment_context.
assess_counterparty_deepA
Like assess_counterparty but scans more on-chain settlement history for a higher-confidence read. Use for larger or higher-stakes payments. Costs $0.02 (paid automatically in USDC).
Inputs: target (required), policy, payment_context.
assess_rwaA
RWA risk gate — score a TOKENIZED ASSET (tokenized treasury/stock/credit) BEFORE buying it. Detects PERMISSIONED securities an agent can buy but NOT transfer/redeem (= trapped funds): proxy-aware transfer-restriction scan (resolves the EIP-1967 implementation; ERC-1404/ERC-3643/allowlist/freeze/pause), a behavioral transfer simulation (on-chain revert = the gate is live), live pause state, token identity (symbol/name/supply), and issuer/admin identity + issuer OFAC screening. Returns risk_score 0-100 + allow/review/block + is_permissioned_security + honest not_checked gaps (backing/peg/holder concentration are off-chain). NOT investment advice. Costs $0.02 (paid automatically in USDC).
Inputs: target (required).
compliance_checkA
Pre-pay COMPLIANCE screen for regulated-money x402 flows. Returns compliance_decision (pass/flag/block), diligence_tier, obligations, and checks: OFAC sanctions (hit = hard block), counterparty due-diligence tier from the on-chain risk engine, structuring/smurfing detection (many sub-threshold payments to one counterparty aggregating to a reportable sum in 24h — pass target.agent_id, e.g. your wallet, to enable it), and the FATF Travel-Rule threshold reported as informational. Screening support for compliance workflows — not legal advice. Costs $0.02 (paid automatically in USDC).
Inputs: target (required), payment_context.
firewallA
Buyer-side payment firewall: should YOUR agent make THIS payment now? Where assess_counterparty vets the seller, this vets the payment instruction in the context of your agent's own history + provenance. Returns allow/hold/block + signals: routing_anomaly (payTo swapped vs the address you usually pay = fraudulent routing), velocity_anomaly (drain), amount_anomaly (overcharge), provenance_flag, counterparty_risk, injection_destination (if the payTo appears in the untrusted page/tool-output you're acting on, the destination was injected — pass it as context.untrusted_text), intent_mismatch (pass context.intended={payto,max_amount} so a mid-flight redirect is caught), new_counterparty_burst, recurring_flagged (poisoned-memory loop). STRONGLY recommended: pass untrusted_text + intended to catch prompt-injection payments. agent_id and a wallet-ownership signature are attached AUTOMATICALLY from your configured wallet — you don't pass agent_id, and your routing history is trusted with no extra steps. Costs $0.002. Seed history free with firewall_record.
Inputs: payment (required), policy, context, agent_id.
firewall_outcomeA
FREE. After a firewall verdict, report what actually happened so 402Sentinel learns which signals are predictive and downweights noisy ones (hard-block safety signals stay deterministic). Pass the assessment_id (fw_…) from a prior firewall call.
Inputs: outcome (required), assessment_id (required).
firewall_recordA
FREE. Seed your agent's payment history so the firewall has a behavioural baseline (record past/known-good payments). agent_id and the wallet-ownership signature are attached automatically from your configured wallet, so the seeded history is trusted.
Inputs: payment (required), agent_id.
recommend_policyA
Turn a counterparty's risk into an enforceable spending policy you can apply to your agent wallet. Returns an allow/limit/deny decision plus recommended_policy: max_payment_usdc (per-counterparty cap), daily_cap_usdc, add_to_denylist, require_human_approval. Costs $0.002 (paid automatically in USDC).
Inputs: target (required), policy, payment_context.
report_outcomeB
FREE. After you pay a counterparty, report whether they delivered so 402Sentinel's settlement-reliability flywheel can learn. Pass the assessment_id returned by a prior assessment.
Inputs: outcome (required), assessment_id (required), tx_hash.
verify_serviceA
402Sentinel Verified (opt-in badge): submit YOUR OWN service's payTo for a deep settlement-graph audit (facilitator-aware, multi-hop, exchange-labelled). If it passes (organic, sufficient confidence), a signed time-boxed (30d) credential is issued and your service joins the public allow-list at /api/verified. Positive-only: failing audits are returned privately, never published. SLOW (deep on-chain scan, up to ~3 minutes). Costs $0.02 (paid automatically in USDC).
Inputs: payto (required), resource_url, claimed_buyers.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
assess_counterparty and assess_counterparty_deep are near-identical except for depth and price, so the boundary is fuzzy. recommend_policy largely duplicates the recommended_policy already returned by assess_counterparty, and compliance_check reuses counterparty due-diligence signals, creating several overlapping tool purposes.
All tools use snake_case, but the grammatical pattern is mixed: assess_counterparty, recommend_policy, report_outcome, and verify_service are verb-first, while firewall, compliance_check, firewall_record, and firewall_outcome are noun-first or noun compounds. The names remain readable and generally predictable, but the convention is inconsistent.
Ten tools is well within the ideal range and appropriately maps to the server's risk-assessment purpose. Each major workflow—counterparty risk, payment firewall, compliance, RWA checks, feedback loops, and service verification—has representation without excessive bloat.
The tool set covers the core pre-payment lifecycle well: counterparty vetting, payment-instruction security, compliance screening, RWA assessment, and outcome feedback. Minor gaps exist around directly managing or retrieving generated policies and querying the verified-service list, but agents can work around these.
Maintenance
Related MCP Connectors
Counterparty risk scoring for agentic commerce via x402 micropayments.
x402 MCP with exact and batched payments for recurring wallet, trading, market and web workflows.
x402 payment security and pre-execution transaction risk screening for autonomous AI agents.
Paid token risk and security intelligence for AI agents over MCP with x402 payments.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for a pre-interaction risk check on any EVM contract/token, enabling agents to verify contracts before approving, swapping, or trusting an address.MIT
- AlicenseBqualityCmaintenanceMCP server for AML/KYT crypto wallet screening, enabling AI clients to check wallet risk scores, source-of-funds tags, activity dates, and volume totals via Satoshkin backend.1159 npmMIT
- AlicenseAqualityDmaintenanceMCP server that preflights endpoints before agent payments, returning a trust verdict with proceed/caution/avoid recommendation.1MIT

tereno-mcpofficial
AlicenseNot gradedqualityCmaintenanceMCP server for verifying blockchain safety on Base via x402, with free pricing/receipt tools and paid per-call guard, contract, and metadata checks settled in USDC.458 npmMIT