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 分