Warden402 Mcp

io.github.sukrutkrdg由 GitHub 账号 sukrutkrdg 发布v0.2.0更新于 Oct 25, 2026

Pre-execution security for AI agents on Base: guard token/tx/address + per-agent spend firewall.

概览

AI 生成的概览

一个本地 MCP 服务器,在 AI 代理于 Base 上签名或付款前检查代币、交易和地址的风险,并可选提供按代理的支出防火墙。

可以做什么
买入前检查代币:卖出模拟、蜜罐与税费信号、所有者权限、持仓集中度、流动性与部署者信誉,返回 block、review 或 clear 及原因和风险评分。签名前检查交易:解码 approve、permit 等调用数据,检查授权对象与模拟结果、对手方风险、地址投毒,并给出更安全的替代签名方案。检查地址的制裁暴露、合约风险与身份。持有代理密钥时,查询按代理的防火墙策略及其 allow、hold 或 deny 状态。
适用场景
当 Base 上的助手即将买入代币、签署交易或向某地址付款,而你希望得到确定性的执行前判定而非模型判断时使用。防火墙工具适合在支出限额下转移资金的代理。
运行要求
通过 npx 在本地运行(需要 Node.js)。guard 工具无需密钥;环境变量 WARDEN_AGENT_KEY(来自服务商引导页的代理密钥)用于启用防火墙工具。可用 WARDEN_API_URL 覆盖默认 API 地址。需要能访问服务商 API 的网络。
安装前请注意
代理密钥是机密,通过环境变量传入,不应泄露。guard 调用按 IP 每日有免费额度,超出后按次以 Base 上的 USDC 付费,可能产生费用。判定只是风险参考而非保证;README 称采用失败即关闭的设计,但 clear 结果并不代表交易安全。防火墙的 hold 可能需要人工批准。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Warden402 Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Warden — pre-execution security for AI agents on Base

[npm warden402-mcp] [npm warden402-sdk] [License: MIT]

Before your agent buys a token, signs a transaction or pays an address, ask Warden. You get block · review · clear with the reasons, a risk score and — when there is one — the safer thing to sign instead. On top, a per-agent Firewall enforces a spending policy: allow · hold · deny.

Live at warden402.xyz · public track record at warden402.xyz/track-record

Quick start

MCP (Claude, Cursor, any MCP client) — no key needed:

json
{  "mcpServers": {    "warden402": {      "command": "npx",      "args": ["-y", "warden402-mcp"],      "env": { "WARDEN_AGENT_KEY": "wk_... (optional, enables firewall tools)" }    }  }}

Tools: guard_token, guard_tx, guard_address, and with an agent key firewall_check, firewall_status. → mcp/README.md

SDK (TypeScript, fail-closed):

ts
import { Warden } from "warden402-sdk";const warden = new Warden({ agentKey: process.env.WARDEN_AGENT_KEY });
await warden.assertSafe(() => warden.token("0xTOKEN"));         // throws on blockawait warden.protect({ to: payee, amountUsd: 5 }, () => pay());  // runs only on allow

→ sdk/README.md (also LangChain tools)

HTTP:

bash
curl "https://warden402.xyz/api/guard?address=0xTOKEN"                 # tokencurl "https://warden402.xyz/api/guard?type=address&address=0xADDR"     # addresscurl -X POST https://warden402.xyz/api/guard -H 'content-type: application/json' \  -d '{"type":"tx","from":"0x..","to":"0x..","calldata":"0x.."}'       # transaction

50 free guard calls per IP per day, then x402 pay-per-call ($0.01 token/address, $0.02 tx, USDC on Base). Firewall agent keys: warden402.xyz/onboard (free: 1 agent, 1,000 checks/month).

What it checks

TargetSignals
Tokenlive sell simulation from a real holder (can you get out?), honeypot & taxes, owner powers (mint, set balances, blacklist, upgradeable logic), contract controls, wallet holder concentration (LP / CEX / burn excluded), liquidity, LP lock, deployer reputation, OFAC
Transactioncalldata decode (approve, increaseAllowance, EIP-2612 permit, Permit2, setApprovalForAll, transfer); approval target (unlimited approval to an address with no code → block); eth_call simulation (revert, call to non-contract); counterparty OFAC + contract risk; address poisoning on outgoing transfers. Returns remediation — e.g. an exact-amount approval to sign instead
AddressOFAC, exposure to sanctioned counterparties, contract risk, identity (verified / named / anonymous)

Signal data comes from the x402 Bazaar plus Base RPC.

How decisions are made

  1. No LLM in the decision path. Decision, score and summary are deterministic rules over the collected signals — same input, same verdict.
  2. Fails safe. A critical signal that can't be fetched is unknown → degraded: true → the verdict is review at worst, never a false clear. The SDK and MCP are fail-closed too: no verdict → throw / "do not proceed".
  3. Hard blocks regardless of score: honeypot, sanctioned target, token that can't be sold, poisoned look-alike recipient, unlimited approval to a plain wallet.
  4. Otherwise: weighted risk ≥ 70 → block; any fail or risk ≥ 35 or 2+ warns → review; else clear.
  5. Every verdict is recorded and re-checked later for rugs — the public track record.

Firewall (per agent)

Policy-as-code in front of an agent's value flow: per-call / hourly / daily spend caps, allow & deny lists, unlimited approvals banned, first payment to a new counterparty held for a human (approve/reject in /account or via API), calls-per-minute limit, anomaly multiplier, kill switch, audit log, webhook on hold. Team accounts sign in with a wallet (SIWE), with roles and plans. → FIREWALL.md

Repository

PathWhat
web/The production site and API (Next.js on Vercel): guard, firewall, track record, accounts, x402 payment gate
packages/core/Shared verdict schema + calldata decoder (@warden/core)
mcp/warden402-mcp — stdio MCP server
sdk/warden402-sdk — TypeScript client + LangChain tools
src/Optional standalone Hono API (Node host); a drift test keeps its engine identical to web/
tests/Vitest: decision engine, calldata decoder, firewall policy, drift guard, web signals
bash
npm install && npm test                      # unit testscd web && cp .env.example .env.local && npm run dev   # site + API on :3000

Deploy notes: DEPLOY.md.

License

MIT — see LICENSE.

来源:README.md,提交 c84d05f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.0最新Oct 10, 2026
  2. v0.1.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分