Bridge Metrics MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP server that provides real-time cross-chain bridge metrics, enabling AI agents to analyze liquidity, transaction flows, and performance across blockchain networks.
Features
- **List Chains**: Retrieve a list of all chain slugs from DeFiLlama, sorted by Total Value Locked (TVL) in descending order.
- **List Bridges**: Fetch all bridges, optionally including chain breakdowns, sorted by 24-hour volume.
- **Historical Volumes**: Get historical volume data for a bridge or chain, with dates formatted as YYYY-MM-DD HH:MM:SS.
- **Daily Token Stats**: Retrieve 24-hour token volume breakdowns, including token ID, symbol, decimals, deposit/withdrawal amounts, and USD values, sorted by deposit USD value.
- **Bridge Transactions**: Fetch transaction summaries for a specific bridge, with details like transaction hash, timestamp, and USD value.
- **Prompts**: Includes example prompts for analyzing bridge volumes and comparing bridges based on metrics like weekly volume.
Prerequisites
- **Python**: Version 3.10 or higher.
- **uv**: Package and virtual environment manager for Python (recommended for dependency management).
Installation
1. **Clone the Repository**:
2. **Install dependencies**:
3. **Install to Claude Desktop**:
Install the server as a Claude Desktop application:
Configuration file as a reference:
Replace /path/to/bridge-metrics-mcp with your actual installation path.
Tools and Usage
The server provides the following tools, accessible via JSON-RPC or natural language prompts in compatible clients:
1. **list_chains**:
- **Description**: Lists all chain slugs from DeFiLlama, sorted by TVL.
- **Parameters**: None.
- **Output**: Table with columns Name, Gecko ID, Token Symbol, Chain ID, TVL.
2. **list_bridges**:
- **Description**: Lists all bridges, sorted by 24-hour volume, with optional chain inclusion.
- **Parameters**: include_chains (boolean, default False).
- **Output**: Table with columns ID, Name, Display Name, Last 24h Volume, Chains.
3. **get_historical_volumes**:
- **Description**: Fetches historical volumes for a chain or bridge, with dates formatted as YYYY-MM-DD HH:MM:SS.
- **Parameters**: chain (string, required), bridge_id (integer, optional).
- **Output**: Table with columns Date, Deposit USD, Withdraw USD, Deposit Txs, Withdraw Txs.
4. **get_day_stats**:
- **Description**: Retrieves 24-hour token volume breakdowns, sorted by deposit USD value.
- **Parameters**: timestamp (integer, required), chain (string, required), bridge_id (integer, optional).
- **Output**: Table with columns Token ID, Symbol, Decimals, Deposit Amount, Deposit USD Value, Withdraw Amount, Withdraw USD Value.
5. **get_transactions**:
- **Description**: Fetches transaction summaries for a bridge, sorted by timestamp.
- **Parameters**: bridge_id (integer, required), start_timestamp, end_timestamp, source_chain, address, limit (all optional).