AgentRisk
Pre-Trade Security & Risk Analysis Layer for Autonomous DeFi Agents on Base using x402 protocol.
README
AgentRisk M2M š”ļø
Pre-Trade Security Layer for Autonomous DeFi Agents on Base. Stop letting your autonomous trading bots get rekt by stealth honeypots, malicious taxes, and rugpulls.
ā” The Problem
Autonomous trading bots are fast, but they are completely blind. Every minute, hundreds of unvetted tokens launch on Base. Over 90% are engineered traps designed to block sells, drain executing wallets, or alter transfer taxes at the worst possible moment. Static blocklists (like standard free APIs) are useless against freshly deployed, obfuscated contracts. By the time human-curated lists update, your bot's capital is already gone.
šÆ The Solution
AgentRisk is an isolated, machine-readable security API built specifically for AI agents and automated scripts.
Before your bot executes a swap() on Uniswap or Aerodrome, it pings AgentRisk. We run a deep runtime simulation, trace the deployer's dirty history, and return a strict, binary verdict:
{
"status": "success",
"token": "0xYourTargetToken...",
"recommendation": "REJECT",
"confidence": 0.99,
"reasons": [
"Honeypot detected: sell simulation failed",
"Deployer address linked to multiple previous rugpulls"
]
}āļø How It Works (M2M Architecture)
Agent Discovers Token via mempool or DEX router event.
Agent Calls AgentRisk MCP Tool (check_token_risk).
Instant x402 Micropayment ($0.15 USDC instantly settled on Base ā no cumbersome API keys, subscriptions, or credit cards; pure machine-to-machine payment).
Binary Decision: The agent receives ALLOW, CAUTION, or REJECT. If it's not ALLOW, the bot aborts the trade instantly.
š Quick Integration
Option 1: MCP Server (For Claude, Cursor & Custom Agents)
Add AgentRisk to your MCP config:
{
"mcpServers": {
"agentrisk": {
"command": "python",
"args": ["-m", "agentrisk_m2m.server"]
}
}
}
Option 2: Direct Python SDK / API Call
from agentrisk import AgentRiskClient
client = AgentRiskClient(endpoint="[https://agentrisk.dev](https://agentrisk.dev)", network="base")
# Pre-trade check before executing swap
verdict = client.check_token(
token_address="0xTargetTokenAddress...",
amount_usdc=50
)
if verdict.recommendation == "ALLOW":
execute_swap()
else:
print(f"Trade aborted. Risk detected: {verdict.reasons}")
š° Economy
Model: Pay-per-scan via the x402 protocol.
Cost: 0.15 USDC per comprehensive deep simulation.
ROI: Losing $100 on a single honeypot costs more than 600 security scans. Protect your liquidity.
Built for autonomous systems that trust math, not hype.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.