Defi Guard Mcp

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

DeFi safety checks on Base before you sign: honeypot, owner-power scan, approval risk, Aave health.

已验证STDIO仅桌面金融安全与监控

概览

AI 生成的概览

只读的 MCP 服务器,在助手或用户签署 DeFi 交易前,对 Base L2 上的代币、授权和 Aave 仓位做链上安全检查。

可以做什么
筛查代币是否为蜜罐、往返成本以及所有权是否已放弃,并给出单一风险结论。扫描已部署字节码中的所有者专属权限,如增发、暂停、黑名单、费率调整和代理升级。检查实时授权额度,标记无限授权,并判断被授权方是合约还是普通地址。读取 Aave V3 仓位的健康因子、抵押与债务美元价值、LTV 和清算风险等级。通过 Uniswap V3 各费率档给出精确输入报价及 gas 估算,并用往返报价衡量真实市场深度。
适用场景
当助手或用户准备在 Base 上买入、授权或兑换代币,并希望在签名前了解蜜罐、所有者权限、授权风险、流动性深度或 Aave 清算风险的实时链上事实时使用。
运行要求
以 stdio 方式在本地运行,通常通过 npm 包的 npx 启动。无需 API 密钥或账户。可选环境变量 BASE_RPC_URL 用于指定私有 Base RPC 端点,否则会在多个公共 Base 端点间轮换。需要访问 Base 主网。
安装前请注意
只读:不持有私钥、不签名、不提交交易。报价是对实时状态的模拟,实际执行会有滑点。仅报告链上状态,不构成投资建议。除非设置 BASE_RPC_URL,请求会发往公共 Base RPC 端点。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

DeFi Guard MCP

[npm] [smithery badge] [License: MIT]

The safety layer that checks a DeFi transaction or token before your agent (or you) signs — on Base L2. Sits in front of execution MCPs (it pairs with them, it doesn't compete): honeypot detection, owner-power scans, approval-drain checks, position health, and executable prices — all from live on-chain state.

No API keys required — works out of the box against public Base RPCs (bring your own RPC for speed via BASE_RPC_URL). Read-only: it never holds keys, signs, or submits.

Guard-before-signing tools

ToolWhat it answers
token_safety_screen"Is this token safe to buy/approve before I sign?" — honeypot detection (can you actually sell it back?), real round-trip cost (fees + tax both ways), and whether ownership is renounced (a live owner can often change taxes / pause / mint). One risk verdict.
scan_dangerous_capabilities"What can the owner do to me?" — scans the deployed bytecode for owner-only powers: mint, pause, blacklist, adjustable fees/taxes, max-tx limits, trading toggles, proxy upgradeTo. Flags the capability, no explorer key needed.
approval_risk"Is this approval dangerous?" — reads the live allowance an owner granted a spender, flags unlimited approvals (the allowance-drain vector) and whether the spender is a contract or an EOA. Current exposure = what could be pulled right now.

Data tools

ToolWhat it answers
aave_position_health"Is this Aave V3 position safe?" — live health factor, collateral/debt in USD, LTV, liquidation threshold, and a plain risk level (healthy / elevated / critical / LIQUIDATABLE).
quote_swap"What would this swap actually return right now?" — exact-input quote via Uniswap V3 QuoterV2, best of all 4 fee tiers, with gas estimate. Executable price, not an oracle.
token_risk_snapshot"Can I get out of this token?" — ERC-20 metadata + real market depth measured by round-trip quotes (WETH → token → WETH) at two sizes. High round-trip loss = thin or trapped liquidity, whatever the chart says.

Why round-trip depth instead of "liquidity" numbers

TVL and pool-size numbers are easy to fake and easy to misread. A round-trip quote against live state measures the only thing that matters: what you lose entering and exiting right now (fees + price impact, both ways). If a token can be bought but not sold, this tool says so (UNTRADABLE).

Install

bash
npx @iniit/defi-guard-mcp        # or from source: npm install && npm run build

Claude Code

bash
claude mcp add defi-guard -- npx -y @iniit/defi-guard-mcp

Any MCP client (Cursor, Windsurf, etc.)

json
{  "mcpServers": {    "defi-guard": {      "command": "npx",      "args": ["-y", "@iniit/defi-guard-mcp"],      "env": { "BASE_RPC_URL": "https://your-rpc-if-you-have-one" }    }  }}

BASE_RPC_URL is optional; without it the server rotates across public Base endpoints with automatic fallback and retries.

Example

"Before I approve TOKEN X to this router, is any of it risky?"

The agent calls token_safety_screen (can I sell it back? is ownership renounced?), scan_dangerous_capabilities (can the owner mint/blacklist/pause?), and approval_risk (is this an unlimited allowance to an EOA?) — and answers with live on-chain facts instead of vibes, before you sign.

Honesty notes (read this)

  • Quotes are simulations against live state (eth_call). Real execution adds slippage between quote and inclusion.
  • Contract addresses (Aave V3 Pool, QuoterV2) are Base mainnet constants, validated against live chain state.
  • This is a read-only tool. It never holds keys, signs, or submits transactions.
  • Not financial advice; it reports on-chain state, decisions are yours.

Test

bash
npm run build   # tsc — type-checks and emits dist/. Tools are verified against live Base state.

License

MIT

来源:README.md,提交 db89dc4

工具

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

版本历史

1
  1. v0.2.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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