Skip to main content
Glama
Bridge Metrics MCP

Bridge Metrics MCP

by kukapay

Bridge Metrics MCP

An MCP server that provides real-time cross-chain bridge metrics, enabling AI agents to analyze liquidity, transaction flows, and performance across blockchain networks.

GitHub License Python Version Status

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.

Related MCP server: Relay MCP Server

Prerequisites

  • Python: Version 3.10 or higher.

  • uv: Package and virtual environment manager for Python (recommended for dependency management).

Installation

  1. Clone the Repository:

    git clone https://github.com/kukapay/bridge-metrics-mcp.git
    cd bridge-metrics-mcp
  2. Install dependencies:

    uv sync
  3. Install to Claude Desktop:

    Install the server as a Claude Desktop application:

    uv run mcp install main.py --name "Bridge Metrics"

    Configuration file as a reference:

    {
       "mcpServers": {
           "Bridge Metrics": {
               "command": "uv",
               "args": [ "--directory", "/path/to/bridge-metrics-mcp", "run", "main.py" ]
           }
       }
    }

    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).

    • Output: Table with columns Tx Hash, Timestamp, Block, From, To, Token, Amount, Type, Chain, Bridge Name, USD Value.

  6. Prompts:

    • analyze_bridge_volume: Analyzes volume data for a specific bridge.

    • compare_bridges: Compares two bridges based on a specified metric (e.g., weeklyVolume).

Example Interactions

Below are example interactions using natural language prompts in a compatible MCP client, along with expected results.

Example 1: Listing All Chains

Prompt:

List all chains available on DeFiLlama.

Tool Called: list_chains

Result:

+----------------+-------------+---------------+-----------+-------------+
| 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  |
+----------------+-------------+---------------+-----------+-------------+

Example 2: Listing Bridges with Chains

Prompt:

Show all bridges with their supported chains, sorted by 24-hour volume.

Tool Called: list_bridges(include_chains=True)

Result:

+----+-------------+---------------+-----------------+----------------------------------+
| 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               |
+----+-------------+---------------+-----------------+----------------------------------+

Example 3: Historical Volumes for a Chain

Prompt:

Get historical volumes for the Ethereum chain.

Tool Called: get_historical_volumes(chain="ethereum")

Result:

+---------------------+---------------+---------------+---------------+---------------+
| 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            |
+---------------------+---------------+---------------+---------------+---------------+

Example 4: Daily Token Stats for a Bridge

Prompt:

Show the 24-hour token stats for bridge ID 1 on Ethereum for September 12, 2025.

Tool Called: get_day_stats(timestamp=1752499200, chain="ethereum", bridge_id=1)

Result:

+----------------+--------+----------+------------------+-------------------+------------------+-------------------+
| 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         |
+----------------+--------+----------+------------------+-------------------+------------------+-------------------+

Example 5: Analyzing Bridge Volume

Prompt:

Analyze the volume data for the Polygon bridge using historical volumes.

Tool Called: get_historical_volumes(chain="polygon", bridge_id=1), followed by analyze_bridge_volume

Result:

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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Available Tools

5 tools
get_day_statsB
Fetch and return a 24hr token volume breakdown for a bridge on a specific day in a table format.
Parameters:
- timestamp: integer (required) - Unix timestamp for the day (data for 24hr period starting at 00:00 UTC).
- chain: string (required) - Chain slug (from list_chains).
- bridge_id: integer (optional) - The ID of the bridge (obtain from list_bridges).
Returns a table of token stats with columns: token id, symbol, decimals, deposit amount, deposit usd value, withdraw amount, withdraw value, sorted by deposit usd value in descending order.

Inputs: timestamp (required), chain (required), bridge_id. Returns: result

get_historical_volumesA
Fetch and return historical volumes for a bridge, chain, or specific bridge on a chain in a table format.
Parameters:
- chain: string (required) - Chain slug (from list_chains) or 'all' for all chains.
- bridge_id: integer (optional) - The ID of the bridge (obtain from list_bridges).
Returns a table of historical volumes with columns: date, depositUSD, withdrawUSD, depositTxs, withdrawTxs.

Inputs: chain (required), bridge_id. Returns: result

get_transactionsA
Fetch and return all transactions for a bridge within a specified date range in a table format.
Parameters:
- bridge_id: integer (required) - The ID of the bridge (obtain from list_bridges).
- start_timestamp: integer (optional) - Start Unix timestamp for the date range.
- end_timestamp: integer (optional) - End Unix timestamp for the date range.
- source_chain: string (optional) - Filter transactions bridging from this source chain.
- address: string (optional) - Filter transactions where this address is 'from' or 'to' (format: {chain}:{address}).
- limit: integer (optional) - Limit number of transactions returned (max 6000).
Returns a table of transaction data with key metrics.

Inputs: bridge_id (required), start_timestamp, end_timestamp, source_chain, +2 more. Returns: result

list_bridgesA
Fetch and return a list of all bridges from DeFiLlama in a table format, sorted by last24hVolume in descending order.
Parameters:
- include_chains: boolean (optional, default False) - Whether to include current previous day volume breakdown by chain.
Returns a table of bridges data with columns: id, name, displayName, last24hVolume, chains.

Inputs: include_chains. Returns: result

list_chainsA
Fetch and return a list of all chain slugs from DeFiLlama in a table format, sorted by TVL in descending order.
No parameters required.
Returns a table of chains data with columns: name, gecko_id, tokenSymbol, chainId, tvl.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clear distinct purpose: listing bridges/chains, daily token stats, historical aggregate volumes, and transaction details. No two tools overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent 'verb_noun' pattern in snake_case: 'get_' for data retrieval and 'list_' for enumeration. No mixing of styles or vague verbs.

    Tool Count5/5

    5 tools is well-scoped for the domain of bridge metrics. It covers discovery (list_bridges, list_chains) and detailed queries (day stats, historical volumes, transactions) without being overwhelming or sparse.

    Completeness5/5

    The tool set provides comprehensive coverage for a read-only bridge metrics API: listing all bridges and chains, retrieving daily token breakdowns, historical aggregate volumes, and individual transactions with filters. No obvious gaps for typical use cases.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to perform cross-chain bridging operations using natural language intents, with support for multiple protocols (Across, Stargate) and advanced security features like oracle validation and slippage protection. Provides comprehensive bridging tools including quote estimation, transaction building, and approval management across Arbitrum and Ethereum networks.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Provides cross-chain bridge and swap tools for AI agents using the Relay Protocol to interact with multiple blockchain networks. It enables agents to query supported chains, obtain transaction quotes, and generate unsigned transaction data for token transfers and swaps.
      10
      129 npm
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides live cross-DEX market data on six EVM chains, including per-venue prices, liquidity, and gross spreads with optimal trade sizes. Enables AI agents to query real on-chain data for BSC, Polygon, Arbitrum, Base, Avalanche, and Optimism via MCP tools.
      4
      76 npm
      MIT