Defi Guard MCP logo

Defi Guard MCP

Checks Base DeFi tokens, approvals, Aave positions, and swaps using live on-chain data before signing.

Install Defi Guard MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "defi-guard-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@iniit/defi-guard-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio defi-guard-mcp -- npx -y @iniit/defi-guard-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y @iniit/defi-guard-mcp

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The defi-guard-mcp MCP server evaluates DeFi risks on Base using live, read-only on-chain calls. It screens tokens for sellability, owner-controlled hazards, and round-trip trading costs; checks approval exposure; reports Aave V3 position health; and produces Uniswap V3 executable swap quotes. Reach for it before approving, buying, swapping, or assessing a lending position. It requires no API key and can use public Base RPC endpoints or a custom `BASE_RPC_URL`.

Use cases

  • Screen a token before buying or approving it
  • Check whether an allowance exposes funds to a spender
  • Assess an Aave V3 position before liquidation risk rises
  • Compare executable swap returns across Uniswap V3 fee tiers
  • Measure whether a token has enough exit liquidity

Key features

  • Base mainnet token safety screening
  • Owner-capability bytecode analysis
  • Allowance and spender risk checks
  • Aave V3 health-factor reporting
  • Uniswap V3 executable quotes
  • Round-trip exit-liquidity analysis

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

18/18 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · @iniit/defi-guard-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads306Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.

How Defi Guard MCP works

What defi-guard-mcp MCP server does

defi-guard-mcp MCP server provides pre-signing checks for DeFi activity on Base mainnet. Its focus is inspection rather than execution: it reads contract state, simulates quotes, and returns risk information without holding private keys or sending transactions.

The token checks cover whether an asset can be sold, the estimated cost of a buy-and-sell cycle, and whether ownership remains active. Contract inspection also identifies owner-only functions that may affect holders, including minting, pausing, blacklisting, fee changes, transaction limits, trading switches, and proxy upgrades.

Approval analysis examines an owner’s current allowance to a spender. It identifies unlimited allowances, distinguishes contract spenders from externally owned accounts, and describes the amount that could currently be withdrawn. For lending and trading, the server reports Aave V3 position metrics and simulates Uniswap V3 swaps.

How it works

The server uses live Base state through JSON-RPC calls. Token depth is assessed with round-trip WETH-to-token and token-to-WETH quotes at two trade sizes, rather than relying on a pool-size or TVL value. A failed sell simulation can produce an UNTRADABLE result.

Swap quotes use Uniswap V3 QuoterV2 and compare all four supported fee tiers to select the best result. Responses include an estimated gas amount. Aave checks return health factor, collateral and debt values in USD, loan-to-value, liquidation threshold, and a risk category such as healthy, elevated, critical, or LIQUIDATABLE.

The defi-guard-mcp MCP server performs simulations with eth_call. Quotes represent the observed state when queried; execution can differ because prices and slippage may change before transaction inclusion.

Setup and configuration

Install the published package with:

Terminal
npx -y @iniit/defi-guard-mcp

A source installation is also supported with npm install followed by npm run build. Configure it as a command-based MCP server by launching npx with the package name. Claude Code can add it with claude mcp add defi-guard -- npx -y @iniit/defi-guard-mcp.

BASE_RPC_URL is optional. When supplied, it selects a custom Base RPC endpoint. Without it, the server rotates through public Base endpoints and uses fallback and retry behavior.

Tools and capabilities

  • token_safety_screen: checks sellability, round-trip cost, and ownership status.
  • scan_dangerous_capabilities: scans deployed bytecode for owner-controlled functions.
  • approval_risk: evaluates allowance size and spender type.
  • aave_position_health: reports live Aave V3 collateral, debt, and liquidation-related metrics.
  • quote_swap: compares Uniswap V3 fee tiers for an exact-input quote.
  • token_risk_snapshot: combines token metadata with two-size round-trip depth checks.

Limitations and notes

The defi-guard-mcp MCP server is read-only. It does not store keys, sign transactions, or submit them. Its fixed Aave V3 Pool and QuoterV2 addresses target Base mainnet and are checked against live chain state. Results describe on-chain conditions and are not financial advice.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Defi Guard MCP

defi-guard-mcp is an MCP server that connects AI agents to live Base blockchain state for read-only DeFi checks. Its main tools screen token safety, inspect owner capabilities, assess approval risk, report Aave V3 position health, generate Uniswap V3 quotes, and measure token exit liquidity before signing.

Install it with `npx -y @iniit/defi-guard-mcp`. You can also install from source with `npm install` and build with `npm run build`, then register the command with an MCP client.

Yes, defi-guard-mcp works with Cursor through a standard command-based MCP configuration. Add `npx` as the command, pass `-y` and `@iniit/defi-guard-mcp` as arguments, and optionally set `BASE_RPC_URL`.

No, an RPC API key is not required. The server uses public Base RPC endpoints by default, while `BASE_RPC_URL` lets you provide a custom endpoint for potentially faster access.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDefi Guard MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/defi-guard-mcp?style=directory)](https://allmcps.com/mcp/defi-guard-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/defi-guard-mcp"><img src="https://allmcps.com/api/badge/defi-guard-mcp?style=directory" alt="Defi Guard MCP on AllMCPs" /></a>