402sentinel Mcp

io.github.kaditang由 GitHub 帳號 kaditang 發布v0.9.0更新於 Oct 26, 2026

DEPRECATED: hosted 402Sentinel retired 2026-10-31. Client for x402 payment-safety checks.

概覽

AI 產生的概覽

已棄用的 x402 支付安全檢測 MCP 用戶端:在代理付款前評估交易對手、支付本身、代幣化資產與合規風險。

可以做什麼
  • 評估賣方:針對 payTo 位址回傳風險分數、allow/review/block 決策與可直接套用的支出政策,另有更深入的鏈上歷史掃描選項。
  • 審查支付本身:防火牆辨識 payTo 被替換的路由詐騙、資金快速流出、超額收費與來自注入內容的指令,並提供免費工具寫入支付歷史與回報結果。
  • 篩檢資產與合規:代幣化資產(公債、股票、信貸)風險閘門、OFAC 制裁與盡職調查篩檢,以及可選的已驗證徽章稽核。
  • 付款後回報交付結果,用於改善可靠性評分。
適用情境
僅當你自行架設或信任某個 402Sentinel 相容端點,並希望代理在 Base 上花費 USDC 前核查 x402 交易對手、單筆支付、代幣化資產或制裁風險時使用。原託管服務已退役,對原端點的全新部署沒有意義。
執行需求
以 npm 套件形式在本機以 stdio 執行。需要 SENTINEL_URL 指向你自己架設且信任的伺服器(舊預設位址會被拒絕),付費呼叫還需 CLIENT_PRIVATE_KEY,即一個持有 USDC 的 Base 錢包;免費工具無需金鑰。付費呼叫依 x402 以 USDC 計費,從 0.002 到 0.02 美元,無需 gas。
安裝前請注意
此套件已棄用,原託管服務已退役,預設端點不再回應。它持有 CLIENT_PRIVATE_KEY 中的錢包私鑰並可自動支付 USDC,切勿指向不受信任的端點。支付資訊與擷取到的不可信文字會傳送到所設定的伺服器。結果僅為機率性風險訊號,不構成建議或指控。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 402sentinel Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

402sentinel-mcp

[!WARNING] 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-apply recommended_policy
  • assess_counterparty_deep ($0.02) — same, scans more on-chain history
  • recommend_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:

ts
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):

jsonc
{ "mcpServers": { "402sentinel": { "command": "402sentinel-mcp", "env": { "CLIENT_PRIVATE_KEY": "0x…" } } } }

Install

sh
npm i -g @kaditang/402sentinel-mcp

Configure

Add to your MCP client (Claude Desktop, Cursor, etc.):

jsonc
{  "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 pay
  • review / limit → cap exposure / escrow (use recommended_policy for 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.

來源:README.md,提交 6355a64

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

4
  1. v0.9.0最新Oct 19, 2026
  2. v0.8.1Oct 17, 2026
  3. v0.8.0Oct 17, 2026
  4. v0.7.1Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。