BaseSentinel
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BaseSentinelcheck pool health for Aerodrome"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BaseSentinel — AI DeFi Risk Monitor for Base L2
Unlike generic DeFi monitors, BaseSentinel uses MCP tool protocol for AI agent-native integration and focuses exclusively on Base L2 ecosystem protocols with real-time on-chain risk scoring.
Live demo: https://base-sentinel-agent.vercel.app Repo: https://github.com/0xConsole/base-sentinel-agent
Built for the Orion Agents Builder Hackathon — an AI agent for the Base ecosystem that monitors DeFi protocol risk in real time.
What it does
BaseSentinel continuously evaluates the health of Base-native protocols (Aerodrome, Moonwell, Seamless, Baseline, Aave V3) using statistical anomaly detection. Every monitoring capability is exposed as an MCP (Model Context Protocol) tool, so an AI agent can integrate and call them natively — the agent gets a risk report, detects anomalies, and raises alerts without a human in the loop.
Statistical anomaly detection
Detector | Threshold | What it catches |
Z-score | > 3σ | TVL / volume far from rolling mean |
Velocity | > 15% | Single-step rate-of-change spike |
Liquidity drain | > 3σ on returns | Coordinated withdrawal pattern |
TVL risk score | 0-100 composite | Weighted liquidity + volume + reserve risk |
MCP Tool Registry
Tool | Description |
| TVL, volume, reserve, 0-100 risk score, status |
| z-score, velocity, liquidity drain across protocols |
| Per-protocol + ecosystem-wide risk report |
| Block-level monitoring with health deltas |
| Threshold-driven alert generation |
Related MCP server: x402farm-mcp
API Endpoints
Endpoint | Method | Description |
| GET | Dark-themed dashboard |
| GET | Service + Base RPC status |
| GET | Agent config + MCP tool inventory |
| GET/POST | Full monitoring cycle (the demo flow) |
| GET | MCP tool: check pool health |
| GET | MCP tool: detect anomalies |
| GET | MCP tool: risk report |
| GET | MCP tool: monitor protocol |
| GET | MCP tool: alert evaluation |
| GET | MCP tools/list (JSON Schema) |
| POST | MCP tools/call ( |
Quick start (local)
git clone https://github.com/0xConsole/base-sentinel-agent.git
cd base-sentinel-agent
pip install -r requirements.txt
uvicorn app.main:app --reload
# open http://localhost:8000Demo flow
Click "Run Monitoring Cycle" on the dashboard, or call the endpoint:
curl https://base-sentinel-agent.vercel.app/api/demo | jq .summaryThis runs the full autonomous pipeline:
monitor_base_protocol → detect_anomalies → generate_risk_report → alert_on_threshold
and returns the ecosystem risk score, anomaly count, and active alerts.
Call an MCP tool (agent-native)
# List tools (MCP tools/list)
curl https://base-sentinel-agent.vercel.app/api/mcp/tools | jq .
# Call a tool (MCP tools/call)
curl -X POST https://base-sentinel-agent.vercel.app/api/mcp/call \
-H 'Content-Type: application/json' \
-d '{"name":"detect_anomalies","arguments":{"protocol_name":"all"}}' | jq .Architecture
┌─────────────────────────────────────────────────┐
│ Dashboard (static/index.html — dark theme) │
│ Real-time fetch · 30s auto-refresh · risk gauge │
└────────────────────┬────────────────────────────┘
│ fetch /api/*
┌────────────────────▼────────────────────────────┐
│ FastAPI app (app/main.py) │
│ Routes: /, /api/health, /api/demo, /api/agent/* │
│ /api/tools/*, /api/mcp/* │
└────────────────────┬────────────────────────────┘
│
┌────────────────────▼────────────────────────────┐
│ Agent (app/agent.py) — MCP Tool Registry │
│ • check_pool_health • monitor_base_protocol │
│ • detect_anomalies • alert_on_threshold │
│ • generate_risk_report │
│ Statistical: z-score >3σ, velocity >15%, drain │
└────────────────────┬────────────────────────────┘
│ eth_blockNumber RPC
┌────────────────────▼────────────────────────────┐
│ Base L2 RPC (mainnet.base.org → sepolia → mock) │
│ Protocols: Aerodrome, Moonwell, Seamless, │
│ Baseline, Aave V3 │
└──────────────────────────────────────────────────┘Tech stack
Backend: FastAPI + Pydantic (Python)
Chain data: Base L2 public RPC (free), deterministic mock fallback
Frontend: Single-file dark dashboard (vanilla HTML/CSS/JS)
Deploy: Vercel serverless free tier (
@vercel/python+@vercel/static)MCP: JSON Schema tool definitions,
/api/mcp/tools+/api/mcp/call
What's real vs mocked
Component | Status |
FastAPI backend + 5 MCP tools | Real — fully implemented |
Statistical anomaly detection | Real — z-score, velocity, drain |
Base L2 RPC integration | Real — probes mainnet.base.org; falls back to mock telemetry if RPC unreachable |
Protocol TVL series | Mock when RPC offline (deterministic, preserves statistical signal shape) — real contract addresses used as identity anchors |
Dashboard + risk gauge | Real — live fetch + auto-refresh |
Vercel deploy | Real — base-sentinel-agent.vercel.app |
Orion Agents Builder Hackathon
Hackathon: orionagents.org/hackathon
Track: AI agent on Base ecosystem
Prize: $5K, 7 winners, Sep 2 deadline
Repo: github.com/0xConsole/base-sentinel-agent
Live: base-sentinel-agent.vercel.app
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
DeFi pool yield+security intelligence & token/contract risk scanner. USDC on Base via x402.
On-chain security and market intelligence for trading agents on Base.
Solana & Base DeFi intelligence for AI agents over x402: decisions, risk, signed receipts.
DeFi MCP fleet: oracle, security audit, treasury yield, QA attestation, and compute tools on Base.
Related MCP Servers
- AlicenseAqualityDmaintenanceReal-time DeFi analytics MCP server for AI agents. Provides token risk analysis, yield scanning, and wallet exposure checking across Base, Ethereum, and Arbitrum.37 npm1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that provides AI agents with pay-per-call access to a suite of tools (honeypot check, token market, DeFi yields, etc.) via USDC on Base using the x402 protocol.3 npmMIT
- FlicenseNot gradedqualityCmaintenanceAn autonomous AI agent that monitors Base chain DeFi protocols for security anomalies and alerts via MCP tools.-
- AlicenseNot gradedqualityCmaintenanceAutonomous AI agent monitoring X Layer DeFi protocols via real RPC calls, providing MCP tools for pool scanning, anomaly detection, risk scoring, alerts, position health checks, and audit trails.MIT