DeFi Security Sentinel
Click on "Install 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., "@DeFi Security SentinelCheck for anomalies on Aerodrome in the last 100 blocks"
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.
π°οΈ DeFi Security Sentinel Agent
An autonomous AI agent that monitors Base chain DeFi protocols for security anomalies and alerts via MCP tools. Built for the Orion Builder Hackathon β $5K USDT prize pool, deadline Sep 2, 2026.
Live Demo: https://orion-sentinel.vercel.app Source: https://github.com/0xConsole/orion-sentinel
π― The Problem
Base chain DeFi is growing fast β Aerodrome, Morpho, Moonwell, Seamless, and a long tail of newer protocols. But security monitoring is still either:
Manual β humans staring at Basescan, reacting after the fact
Expensive β paid indexer subscriptions (The Graph paid tiers, Alchemy/QuickNode enhanced APIs, Forta)
Gated β closed-source bots run by large funds, not accessible to smaller protocols or independent auditors
When a protocol gets drained, the first 5 minutes matter. Most teams find out from a Twitter post, not from their own monitoring.
Related MCP server: defi-yield-scanner-mcp
π‘ The Solution
DeFi Security Sentinel is an AI agent that:
Polls Base mainnet public RPCs β no paid APIs, no indexer subscriptions, no API keys
Runs 5 anomaly detectors on every block β whale transfers, gas spikes, transfer-volume outliers, token velocity bursts (drain pattern), and first-touch of unknown contracts
Exposes 5 MCP tools β so any AI agent (Claude, GPT, any MCP client) can call
detect_anomalies,check_large_transfers,produce_security_report, etc.Persists alerts to SQLite β a queryable audit trail with severity classification
Generates a markdown security report β one call, ready to paste into a postmortem or audit
Ships a web dashboard β live status, monitored protocols, alert log, one-click demo
Unique Angle
This is the only hackathon entry that is itself an MCP server. Most "AI agent" submissions consume tools β this one provides them. Any other agent in the Orion ecosystem can connect to the Sentinel as an MCP client and ask "is this protocol safe right now?" That composability is the moat.
We also run entirely on free public infrastructure: public Base RPCs, Vercel free tier, SQLite in /tmp. Zero paid services. The entire stack can be forked and deployed by anyone in under 5 minutes.
ποΈ Architecture
βββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β Base RPC ββββββΆβ Agent Loop ββββββΆβ 5 Detectors ββββββΆβ SQLite β
β (public) β β (poller) β β (pure fns) β β (alerts) β
βββββββββββββββ ββββββββ¬ββββββββ ββββββββββ¬βββββββββ ββββββββ¬ββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β FastAPI β β MCP Server β β Web UI β
β REST API β β (5 tools) β β (dashboard) β
ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββ βββββββββββββββββββ
β /api/demo β β Any MCP client β
β /api/report β β (Claude, etc.) β
ββββββββββββββββ βββββββββββββββββββData flow: Base RPC β Agent Loop fetches blocks + Transfer logs β Detectors flag anomalies β Alerts persisted to SQLite β exposed via REST API + MCP tools + Web UI.
The 5 MCP Tools
Tool | Description |
| Add/remove/list DeFi protocols on the watch-list |
| Scan recent blocks for whale-sized ERC-20 transfers |
| Run the full 5-detector suite over a block range |
| Create and persist a manual alert (for integrations) |
| Generate a markdown security report from stored alerts |
The 5 Detectors
Detector | What it catches | Severity |
| ERC-20 transfers above 50k units (whale movement) | warning |
| Block gas usage > 2.2Γ rolling 20-block mean | warning |
| Per-block transfer count z-score > 3Ο | critical |
| β₯10 same-token transfers within 5 blocks (drain / flash-loan signature) | critical |
| Transactions to addresses outside the known-contract set | info |
π Demo Flow (60 seconds)
Open the live URL β the dashboard loads showing RPC status, latest Base block, and protocol watch-list
Click βΆ Run Monitoring Cycle β the agent polls live Base RPC, scans 10 blocks, runs all 5 detectors
Watch alerts populate in real-time β velocity bursts, whale transfers, gas spikes
Click π Security Report β generates a full markdown report with stats + alert breakdown
Try the REST bridge:
POST /api/mcp/callwith{"tool":"detect_anomalies","arguments":{"block_count":5}}
API Endpoints
Method | Path | Description |
|
| Web dashboard UI |
|
| Liveness probe |
|
| Agent stats + live RPC connectivity |
|
| List monitored protocols |
|
| Add a protocol |
|
| Remove a protocol |
|
| List recent alerts |
|
| Create a manual alert |
|
| Recent block baselines (gas, tx, transfer counts) |
|
| Agent run history |
|
| Run a full monitoring cycle (main demo) |
|
| Security report as JSON |
|
| Security report as raw markdown |
|
| List MCP tool schemas |
|
| Call an MCP tool via REST |
π οΈ Local Development
# Install deps
pip install -r requirements.txt
# Run the MCP server standalone (exercises all 5 tools against live Base RPC)
python mcp_server.py
# Run one agent monitoring cycle
python agent.py
# Run the continuous agent loop (polls every 60s)
python agent.py --continuous --interval=60
# Start the FastAPI server
uvicorn api.index:app --reload --port 8000
# Then visit http://localhost:8000Environment
Variable | Default | Description |
|
| SQLite database path |
No API keys, no paid services, no environment setup required. The agent uses public Base RPC endpoints with automatic failover.
π§± Tech Stack
Layer | Technology | Cost |
Chain data | Public Base RPCs (mainnet.base.org, base.publicnode.com, 1rpc.io, base.drpc.org) | Free |
Backend | FastAPI on Vercel serverless functions | Free tier |
MCP server |
| Free / open source |
Database | SQLite via stdlib | Free |
HTTP client |
| Free / open source |
Frontend | Single-file HTML/CSS/JS (no framework, no build step) | Free |
Hosting | Vercel free tier | Free |
Repo | GitHub (public, Apache 2.0) | Free |
Total monthly cost: $0. The only cost in the entire hackathon pipeline is the Orion submission ignition fee (~$10 ETH on Base), which is a platform fee, not a project cost.
π Project Structure
orion-sentinel/
βββ api/
β βββ index.py # FastAPI app β all REST endpoints + UI serving
βββ static/
β βββ index.html # Web dashboard (single file, no build step)
βββ chain.py # Base chain RPC client (async, failover, no web3 dep)
βββ detectors.py # 5 anomaly detectors (pure functions)
βββ mcp_server.py # MCP server with 5 tools + REST-bridge implementations
βββ agent.py # Sentinel agent loop (poll β detect β alert β persist)
βββ store.py # SQLite store (protocols, alerts, runs, baselines)
βββ requirements.txt # FastAPI, httpx, mcp, pydantic, uvicorn
βββ vercel.json # Vercel serverless config
βββ LICENSE # Apache 2.0
βββ README.md # This fileπ Using the MCP Server
The Sentinel is also a standalone MCP server. Any MCP-compatible AI client can connect:
from mcp_server import create_mcp_server
mcp = create_mcp_server()
# Run over stdio, SSE, or in-process transport
# Tools: monitor_protocol, check_large_transfers, detect_anomalies,
# generate_alert, produce_security_reportOr via the REST bridge (for non-MCP clients):
# Detect anomalies in the last 10 blocks
curl -X POST https://<your-url>/api/mcp/call \
-H "Content-Type: application/json" \
-d '{"tool":"detect_anomalies","arguments":{"block_count":10}}'
# Generate a security report
curl -X POST https://<your-url>/api/mcp/call \
-H "Content-Type: application/json" \
-d '{"tool":"produce_security_report","arguments":{"limit":50}}'π Real Output (from live Base mainnet)
A monitoring cycle scanning 5 blocks at block ~49,840,211:
status: ok
blocks_scanned: 5
total_transfers: 1,470
alerts_found: 210
elapsed_sec: 2.85
rpc_calls: 32
rpc_failures: 0
Sample alerts:
[CRITICAL] velocity_anomaly: 452 0x833589fc... transfers in 5 blocks
[CRITICAL] velocity_anomaly: 500 0xd7cb132e... transfers in 5 blocks
[WARNING] large_transfer: Whale transfer: 52,000.00 units(0x833589fc is the native USDC bridge token on Base β 452 transfers in 5 blocks is real activity the detector correctly flagged.)
β οΈ Notes for Judges
"If it is an AI agent and it works, it qualifies" β this agent works. Hit
POST /api/demoand watch it scan live Base blocks in real-time.Usefulness: DeFi security monitoring is a real, paid category (Forta, OpenZeppelin Defender, ChainSecurity). This does a meaningful slice of it for $0.
Execution: Every endpoint returns 200. The MCP server has 5 working tools. The agent successfully connects to live Base RPC and detects real anomalies. The dashboard is polished.
Originality: This is an MCP server, not just a client β it provides tools that other agents can consume. That composability is novel in a hackathon setting.
π License
Apache 2.0 β see LICENSE.
π Links
Hackathon: Orion Builder Hackathon
Live Demo: https://orion-sentinel.vercel.app
Built by 0xConsole for the Orion Builder Hackathon.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenancePay-per-use AI security and research tools for autonomous agents on Base, enabling honeypot detection, risk assessment, wallet analysis, and yield optimization via the x402 protocol.
- AlicenseAqualityDmaintenanceReal-time DeFi analytics MCP server for AI agents. Provides token risk analysis, yield scanning, and wallet exposure checking across Base, Ethereum, and Arbitrum.381MIT
- Alicense-qualityBmaintenanceAn MCP server for coordinating a permissionless swarm of AI agents to discover, investigate, and synthesize on-chain anomalies across EVM chains. Agents authenticate via off-chain ECDSA and earn reputation through useful contributions.MIT
- Alicense-qualityCmaintenanceMCP 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.134MIT
Related MCP Connectors
AI-native settlement rail + intelligence oracle for autonomous agents. x402, Base mainnet, 81 tools.
Reputation oracle for AI agents on Base: SAFE/CAUTION/BLOCK + 0-100 score before you pay. x402+MCP
Multi-aggregator swap router for AI agents on Base. 10 bps fee. MCP-native, non-custodial.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xConsole/orion-sentinel'
If you have feedback or need assistance with the MCP directory API, please join our Discord server