flare-bridge-sentinel
MCP server for monitoring Flare's interoperable asset ecosystem, providing real-time on-chain data for FAssets, FTSOv2 prices, and bridge states. It exposes 8 MCP tools for anomaly detection, risk scoring, and automated alerts.
README
Flare Bridge Sentinel
Autonomous AI agent monitoring Flare's interoperable asset ecosystem β FAssets, FTSOv2, cross-chain bridges β with 8 MCP tools and real Coston2 testnet integration.
π― Problem
Flare's interoperability layer (FAssets, FTSO) unlocks DeFi for non-native assets like XRP. But monitoring this infrastructure requires watching multiple on-chain data sources, oracle price feeds, and bridge states in real time. No tool exists that autonomously monitors the health and risk of Flare's interoperable asset ecosystem.
β Solution
Flare Bridge Sentinel is an autonomous AI agent that:
- Perceives β Pulls live data from Flare Coston2 testnet RPC: chain status, FTSOv2 oracle prices, FAsset (FXRP) bridge state, FlareContractRegistry
- Analyzes β Runs anomaly detection heuristics on price feeds, bridge supply, gas prices, and RPC latency
- Scores β Computes a composite 0-100 risk score from anomaly severity, feed health, and FAsset collateralization
- Alerts β Generates severity-classified alerts with human-readable summaries and recommended actions
- Audits β Records every scan, anomaly, and alert in a persistent audit trail
π Unique Angle
Unlike generic blockchain monitors, Flare Bridge Sentinel is built specifically for Flare's interoperability layer β querying FTSOv2 oracle price feeds, FAsset (FXRP) bridge supply, and the FlareContractRegistry through 8 MCP-style tools that AI agents can call autonomously.
ποΈ Architecture
ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β AI Agent ββββββΆβ MCP Protocol ββββββΆβ Flare Bridge Sentinel β
β (orchestrator)β β (8 tools) β β FastAPI + Vercel Serverless β
ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ¬ββββββββββββββββ
β
βββββββββββββββββββββββββββββββ΄ββββββββββββββ
β β
βββββββββββΌβββββββββββ βββββββββββββββββββΌβββββββββββ
β Flare Coston2 RPC β β SQLite Audit Trail β
β (chainId 114) β β (scans, anomalies, β
β β β alerts, FTSO snapshots) β
β β’ FTSOv2 Oracle β ββββββββββββββββββββββββββββββ
β β’ FAsset (FXRP) β
β β’ ContractRegistry β
ββββββββββββββββββββββ
π§ MCP Tools (8)
| # | Tool | Description |
|---|---|---|
| 1 | get_chain_status |
Live Flare Coston2 chain metadata (chainId, block, gas) |
| 2 | get_ftso_prices |
Real FTSOv2 oracle prices (FLR, BTC, ETH, XRP, DOGE) |
| 3 | monitor_fasset |
FAsset FXRP bridge state (supply, decimals, manager) |
| 4 | get_registry_contracts |
FlareContractRegistry β all 69 protocol contracts |
| 5 | detect_anomaly |
Heuristic anomaly detection on price feeds + bridge |
| 6 | calculate_risk_score |
Composite 0-100 risk score |
| 7 | generate_alert |
Severity-classified alert with recommendations |
| 8 | get_audit_trail |
Persistent audit trail of past scans |
π‘ Real On-Chain Data (Verified Live)
All data is real from Flare Coston2 testnet β no mocks:
| Source | Contract | Verified |
|---|---|---|
| Flare Coston2 RPC | https://coston2-api.flare.network/ext/C/rpc |
chainId=114, block ~34M |
| FTSOv2 Price Feeds | 0xc4e9c78ea53db782e28f28fdf80baf59336b304d |
FLR=$0.006, BTC=$63.5K, ETH=$1.88K, XRP=$1.02, DOGE=$0.072 |
| FAsset FXRP Token | 0x0b6A3645d3a4885Bdb64717E2CE3B565Ea83c474 |
totalSupply=6,142,098 FXRP, decimals=6 |
| AssetManager FXRP | 0xc1ca88b9351D99986685920141687403d01E33dB |
fAsset() β FXRP token address |
| FlareContractRegistry | 0xaD67FE6610c43C95d9c02f4E5a44B5befB02cD69 |
getAllContracts() β 69 contracts |
π Setup (<5 commands)
git clone https://github.com/0xConsole/flare-bridge-sentinel.git
cd flare-bridge-sentinel
pip install -r requirements.txt
uvicorn app.main:app --reload
# Open http://localhost:8000
π Live Demo
- Demo URL: https://flare-bridge-sentinel.vercel.app
- GitHub: https://github.com/0xConsole/flare-bridge-sentinel
- Health check:
/api/healthβ chain status + RPC connectivity - Autonomous sweep:
/api/demoβ full 6-step agent run - MCP tools:
/mcp/toolsβ list all 8 tools |/mcp/call?tool=get_ftso_pricesβ call any tool
π οΈ Tech Stack
- Python 3.12 + FastAPI
- Flare Coston2 testnet (public RPC, chainId 114)
- FTSOv2 (Flare Time Series Oracle) β real decentralized price feeds
- FAsset FXRP β real XRP bridge token on Coston2
- FlareContractRegistry β canonical protocol contract registry
- SQLite (audit trail persistence)
- Vercel serverless (free tier)
- Static HTML/CSS/JS dashboard (dark theme, no framework)
π What's Real vs What's Next
| Component | Status |
|---|---|
| Flare Coston2 RPC | β Real (live block data) |
| FTSOv2 price feeds | β Real (live oracle prices) |
| FAsset FXRP monitoring | β Real (live token supply) |
| FlareContractRegistry | β Real (live contract resolution) |
| Anomaly detection | β Real (heuristic on live data) |
| Risk scoring | β Real (computed from live anomalies) |
| Audit trail | β Real (SQLite persistence) |
| LLM agent reasoning | π Rule-based orchestration (LLM-ready: swap agent.py loop for Gemini/GPT) |
| Mainnet deployment | π Next step (Coston2 β Songbird β Flare Mainnet) |
π― Bounty Target
Bounty 1: Interoperable Asset Products β Flare Bridge Sentinel monitors the interoperability infrastructure (FAssets, FTSO) that enables DeFi for non-native assets. It directly addresses the "interoperable asset products" focus area by monitoring the health and risk of Flare's cross-chain asset bridge.
π License
Apache 2.0
π Links
- Flare Developer Docs: https://dev.flare.network/
- Flare Summer Signal Hackathon: https://dorahacks.io/hackathon/flaresummersignal
- MCP Protocol: https://modelcontextprotocol.io
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.
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.