Bridge Metrics MCP 是一个 MCP 服务器,它能提供实时的跨链桥接指标,让 AI 代理可以分析不同区块链网络间的流动性、交易流量和性能表现。
YYYY-MM-DD HH:MM:SS
。克隆仓库:
git clone https://github.com/kukapay/bridge-metrics-mcp.git
cd bridge-metrics-mcp
安装依赖:
uv sync
安装到 Claude Desktop:
将服务器作为 Claude Desktop 应用程序安装:
uv run mcp install main.py --name "Bridge Metrics"
参考配置文件如下:
{
"mcpServers": {
"Bridge Metrics": {
"command": "uv",
"args": [ "--directory", "/path/to/bridge-metrics-mcp", "run", "main.py" ]
}
}
}
请将 /path/to/bridge-metrics-mcp
替换为你实际的安装路径。
该服务器提供以下工具,可通过 JSON-RPC 或兼容客户端中的自然语言提示访问:
list_chains
:
名称
、Gecko ID
、代币符号
、链 ID
、TVL
列的表格。list_bridges
:
include_chains
(布尔值,默认 False
)。ID
、名称
、显示名称
、过去 24 小时交易量
、链
列的表格。get_historical_volumes
:
YYYY-MM-DD HH:MM:SS
。chain
(字符串,必填),bridge_id
(整数,可选)。日期
、存入美元
、提取美元
、存入交易数
、提取交易数
列的表格。get_day_stats
:
timestamp
(整数,必填),chain
(字符串,必填),bridge_id
(整数,可选)。代币 ID
、符号
、小数位数
、存入金额
、存入美元价值
、提取金额
、提取美元价值
列的表格。get_transactions
:
bridge_id
(整数,必填),start_timestamp
、end_timestamp
、source_chain
、address
、limit
(均为可选)。交易哈希
、时间戳
、区块
、发送方
、接收方
、代币
、金额
、类型
、链
、桥接名称
、美元价值
列的表格。提示信息:
analyze_bridge_volume
:分析特定桥接的交易量数据。compare_bridges
:根据指定指标(如 weeklyVolume
)比较两个桥接。以下是在兼容的 MCP 客户端中使用自然语言提示的示例交互及预期结果。
提示:
List all chains available on DeFiLlama.
调用工具:list_chains
结果:
+----------------+-------------+---------------+-----------+-------------+
| Name | Gecko ID | Token Symbol | Chain ID | TVL |
+================+=============+===============+===========+=============+
| Ethereum | ethereum | ETH | 1 | 50000000000 |
| Binance Smart | binance-smart-chain | BNB | 56 | 15000000000 |
| Polygon | polygon | MATIC | 137 | 5000000000 |
+----------------+-------------+---------------+-----------+-------------+
提示:
Show all bridges with their supported chains, sorted by 24-hour volume.
调用工具:list_bridges(include_chains=True)
结果:
+----+-------------+---------------+-----------------+----------------------------------+
| ID | Name | Display Name | Last 24h Volume | Chains |
+====+=============+===============+=================+==================================+
| 1 | polygon | Polygon | 1000000 | Ethereum, Polygon, Binance Smart |
| 2 | optimism | Optimism | 750000 | Ethereum, Optimism |
| 3 | arbitrum | Arbitrum | 500000 | Ethereum, Arbitrum |
+----+-------------+---------------+-----------------+----------------------------------+
提示:
Get historical volumes for the Ethereum chain.
调用工具:get_historical_volumes(chain="ethereum")
结果:
+---------------------+---------------+---------------+---------------+---------------+
| Date | Deposit USD | Withdraw USD | Deposit Txs | Withdraw Txs |
+=====================+===============+===============+===============+===============+
| 2025-09-12 00:00:00 | 1000000.0 | 500000.0 | 150 | 100 |
| 2025-09-11 00:00:00 | 1200000.0 | 600000.0 | 180 | 120 |
| 2025-09-10 00:00:00 | 900000.0 | 450000.0 | 130 | 90 |
+---------------------+---------------+---------------+---------------+---------------+
提示:
Show the 24-hour token stats for bridge ID 1 on Ethereum for September 12, 2025.
调用工具:get_day_stats(timestamp=1752499200, chain="ethereum", bridge_id=1)
结果:
+----------------+--------+----------+------------------+-------------------+------------------+-------------------+
| Token ID | Symbol | Decimals | Deposit Amount | Deposit USD Value | Withdraw Amount | Withdraw USD Value|
+================+========+==========+==================+===================+==================+===================+
| 0xa0b869... | USDC | 6 | 2000000 | 2000000.0 | 0 | 0.0 |
| 0xc02aaa... | ETH | 18 | 1000000000000000 | 1500000.0 | 500000000000000 | 750000.0 |
| 0xdac17f... | DAI | 18 | 0 | 0.0 | 1000000000000000 | 1000000.0 |
+----------------+--------+----------+------------------+-------------------+------------------+-------------------+
提示:
Analyze the volume data for the Polygon bridge using historical volumes.
调用工具:get_historical_volumes(chain="polygon", bridge_id=1)
,接着调用 analyze_bridge_volume
结果:
Analyze the following volume data for the bridge 'Polygon':
+---------------------+---------------+---------------+---------------+---------------+
| Date | Deposit USD | Withdraw USD | Deposit Txs | Withdraw Txs |
+=====================+===============+===============+===============+===============+
| 2025-09-12 00:00:00 | 800000.0 | 400000.0 | 120 | 80 |
| 2025-09-11 00:00:00 | 900000.0 | 450000.0 | 140 | 90 |
| 2025-09-10 00:00:00 | 700000.0 | 350000.0 | 100 | 70 |
+---------------------+---------------+---------------+---------------+---------------+
Key insights:
- The Polygon bridge shows consistent deposit and withdrawal activity over the past three days.
- Deposits are roughly double the withdrawals in USD value, indicating higher inflow than outflow.
- Transaction counts are stable, with deposits averaging 120 transactions per day.
本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。