# defi-guard-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/iinniitt/defi-guard-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 306  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/defi-guard-mcp

## Description
Real-time DeFi risk on Base: Aave V3 health, executable swap quotes, token exit-liquidity checks.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "defi-guard-mcp": {
    "command": "npx",
    "args": ["-y","@iniit/defi-guard-mcp"]
  }
}
```

## Documentation

## 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:

```bash
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.

_Full upstream README: https://allmcps.com/mcp/defi-guard-mcp/readme_

