Skip to content
MCP-native safety layer for autonomous agents

Stop your AI agent
from getting rugged

AI agents trading on-chain can't tell safe contracts from scams. Aegis checks every contract, simulates every trade, and blocks dangerous transactions before your agent loses funds.

$ npx aegis-defi Click to copy

Cumulative Agent Losses

$62,400,000

trending_up

warning AI agent exploits increased by 420% in Q4 2025

The price of
unsecured intelligence.

Current agent architectures lack sovereign safety layers. Aegis intercepts malicious logic before it hits the mempool, preventing catastrophic capital drainage.

  • shield

    Pre-flight Simulation

    Fork the chain. Run the trade. Check the outcome. All before real funds move.

  • layers

    Multi-Layer Verification

    Static analysis, bytecode scanning, fork simulation, on-chain enforcement.

How It Works

Three layers of protection

shield_with_heart

MCP Safety Server

One command adds six safety tools to Claude, GPT, or any MCP-compatible agent. Your agent calls scan_contract, simulate_transaction, check_token, assess_risk, trace_transaction, or search_solodit before every trade.

MCP Protocol
6 Safety Tools
Any LLM Agent
lock
radar

Contract Scanner

165 exploit pattern checks against source code and bytecode.

flowsheet

Fork Simulation

Run the trade on a forked chain. Check gas, slippage, revert risk. No real funds at risk.

On-Chain Enforcement

Even if software fails, the blockchain doesn't. AegisGateway verifies a signed safety attestation before executing any DeFi call. No attestation, no execution.

Learn more arrow_forward

# Add Aegis to Claude Code

$ claude mcp add aegis npx aegis-defi

 

# Your agent now has:

# scan_contract

# simulate_transaction

# check_token

# assess_risk

# trace_transaction

# search_solodit

The Safety Pipeline

Every trade passes through Aegis

psychology

Agent Intent

radar

Contract Scan

model_training

Simulation

verified_user

Execution

What It Catches

Known scams, caught instantly

Before your agent touches a contract, Aegis checks it against known attack patterns in both source code and bytecode.

165 patterns
Asymmetric Buy/Sell Tax
Sell Pause Mechanism
Fake Ownership Renounce
Reentrancy Vulnerability
Hidden Max Sell Amount
Unrestricted Minting
Hidden Admin Functions
Flash Loan Vulnerability
Permit/Approval Phishing
Unlimited Approval
Blacklist Mechanism
Upgradeable Proxy

+ 10 more patterns including delegatecall injection, oracle manipulation, gas griefing, and cross-chain replay. See all

Integration

Add it in 30 seconds

Aegis is an MCP server. If your agent speaks MCP, it already works.

Terminal
# Add Aegis to Claude Code
$ claude mcp add aegis npx aegis-defi

# Or run directly
$ npx aegis-defi

# Your agent now has 6 safety tools:
#   scan_contract        - Static analysis for 165 exploit patterns
#   simulate_transaction - Forked-chain tx simulation
#   check_token          - Anti-honeypot token checks
#   assess_risk          - All-in-one risk assessment
#   trace_transaction    - Multi-contract call tree analysis
#   search_solodit       - Cross-ref 50K+ real audit findings
JSON - claude_desktop_config.json
{
  "mcpServers": {
    "aegis": {
      "command": "npx",
      "args": ["aegis-defi"]
    }
  }
}
TypeScript
import { createAegisServer } from "aegis-defi";

// Create and start the MCP server
const server = createAegisServer();

// Connect via stdio transport
const transport = new StdioServerTransport();
await server.connect(transport);

// The server exposes 6 tools:
//   scan_contract, simulate_transaction,
//   check_token, assess_risk,
//   trace_transaction, search_solodit
// assess_risk returns signed attestations for
// ALLOW/WARN decisions (chainId-bound signatures)

On-Chain Enforcement

Smart contracts that can't be skipped

Off-chain checks can be bypassed. These can't. Two smart contracts on Base enforce safety at the protocol level.

AegisGateway Base

For agents. Instead of calling DeFi contracts directly, your agent routes calls through the Gateway. It checks for a valid safety attestation (signed by Aegis after scanning and simulating) before forwarding the call. No attestation = transaction reverts.

Network Base (Chain ID 8453)
Security EIP-2 check, ecrecover guard, nonReentrant

AegisSafetyHook Uniswap v4

For pool creators and LPs. Install this hook on your Uniswap v4 pool to require Aegis-verified attestations before any swap. A scam pool would never install this -- its presence is itself a trust signal.

Who installs Pool creators, when deploying a new Uniswap v4 pool
What it does Runs beforeSwap: blocks flagged tokens, requires valid attestation
Why it matters Agents can treat hook-protected pools as inherently safer

Real-World Impact

$62M lost. All preventable.

Real incidents from the last year. Each one would have been blocked by Aegis before any funds moved.

$50M LOST

Aave Swap Disaster

March 2026 -- A whale swapped $50M USDT for AAVE tokens. Routed through a pool with only $73K liquidity. MEV bots extracted $34M.

Aegis catches it: simulate_transaction flags extreme price impact. Agent gets BLOCK decision.
$11M EXPLOIT

Cork Protocol Hack

May 2025 -- Missing access controls in CorkHook.beforeSwap() on Uniswap v4. Attacker bypassed all safety checks.

Aegis catches it: AegisSafetyHook requires valid attestation before any swap executes.
$1.78M DRAINED

Moonwell Oracle Attack

Feb 2026 -- Oracle misconfiguration on Base priced cbETH incorrectly. Attacker exploited the price discrepancy.

Aegis catches it: Pattern 17 (Oracle Manipulation) detects inline reserve-based pricing.

Architecture

End-to-end safety pipeline

AI Agent
Claude
GPT
Any agent
MCP Server
6 tools
scan_contract
simulate_transaction
check_token
assess_risk
trace_transaction
search_solodit
Risk Engine
165 patterns
Static analysis
Bytecode check
Fork simulation
Attester
Signs
attestation
(chainId-bound)
Gateway
Verifies
attestation
on-chain
Pool
Executes
swap
Uniswap v4

Ready to secure
your agent?

Open source, MIT licensed, free to use. One command to protect every trade your agent makes.

Aegis provides automated safety analysis for smart contracts and transactions. It is not financial advice. No security tool can guarantee the safety of any transaction. Users are responsible for their own trading decisions and assume all associated risks. See the Terms of Service for details.