defi-guard-mcp

v0.2.0
io.github.iinniitt/defi-guard-mcp Checked 1 day ago Published 4 months ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

aave_position_health

Check the live health of an Aave V3 position on Base: health factor, total collateral/debt (USD), LTV and liquidation threshold. A health factor below 1.0 means the position is liquidatable.

ParameterTypeDescription
address *stringEVM address of the position owner

quote_swap

Real exact-input swap quote on Base via Uniswap V3 QuoterV2. Tries all fee tiers (0.01%, 0.05%, 0.3%, 1%) and returns the best executable output. Amounts are human units (e.g. '0.5').

ParameterTypeDescription
amountIn *stringHuman-readable input amount, e.g. '0.5'
tokenIn *stringInput token address
tokenOut *stringOutput token address

token_risk_snapshot

Liquidity risk snapshot of an ERC-20 on Base: metadata plus REAL market depth measured by round-trip quotes (WETH -> token -> WETH) at two trade sizes. High round-trip loss = thin/illiquid or high-fee market; a token you cannot exit is a risk regardless of its chart.

ParameterTypeDescription
token *stringERC-20 token address on Base

token_safety_screen

Pre-trade safety screen for an ERC-20 on Base — the 'is this safe to buy/approve BEFORE I sign' check. Verifies you can actually SELL it back (honeypot detection), measures the real round-trip cost (buy+sell fees/tax), and reports whether ownership is renounced (a live owner can often change taxes, pause, or mint). Returns a single risk verdict. On-chain only; no oracle, no trust in the token's own claims.

ParameterTypeDescription
token *stringERC-20 token address on Base

scan_dangerous_capabilities

Scan a token/contract's DEPLOYED BYTECODE on Base for owner-only powers that can harm holders — mint, pause, blacklist, adjustable fees/taxes, max-tx limits, trading toggles, and proxy upgradeability. Flags the PRESENCE of each capability (a selector match in the code), i.e. what the operator COULD do, independent of the token's claims. No explorer API key needed. Heuristic: matches 4-byte selectors in runtime bytecode; a minimal proxy hides its real logic in the implementation (reported).

ParameterTypeDescription
token *stringContract/token address on Base

approval_risk

Assess the risk of an existing ERC-20 approval on Base BEFORE it can be abused: reads the live allowance an owner has granted a spender, flags UNLIMITED approvals (the allowance-drain vector — a compromised or malicious spender can pull up to the allowance), and reports whether the spender is a contract. Unlimited allowance to an EOA is a classic scam setup. Use before signing an approval, or to audit standing approvals.

ParameterTypeDescription
owner *stringThe wallet that granted the approval
spender *stringThe address allowed to spend (router, contract, or EOA)
token *stringThe ERC-20 token address