Bridge Rates MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP server that delivers real-time cross-chain bridge rates and optimal transfer routes to support decision-making by onchain AI agents.
Features
- **Get Bridge Rates**: Retrieve cross-chain bridge rates for token pairs, including USD values, gas costs, route providers and tags, presented in a Markdown table.
- **List Supported Chains**: Fetch a sorted list of blockchain networks supported by LI.FI.
- **List Supported Bridges**: Obtain a sorted list of bridges and exchanges available for cross-chain transfers.
Prerequisites
- **Node.js**: Version 18 or higher.
- **npm**: For dependency management.
- **MCP Client**: An MCP-compatible client (e.g., Claude Desktop) to interact with the server.
Installation
1. **Clone the Repository**:
2. **Install Dependencies**:
3. **Integrate with an MCP Client**:
Configure your MCP client (e.g., Claude Desktop) to connect to the server. For Claude Desktop, edit the configuration file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json on Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows):
Restart Claude Desktop and verify the tools are available (look for the hammer icon).
Tools
1. getBridgeRates
Fetches cross-chain bridge rates for a token pair between two chains, returning all available routes in a Markdown table.
**Parameters**:
- fromChainId (string, required): Source chain ID (e.g., "1" for Ethereum).
- toChainId (string, required): Destination chain ID (e.g., "10" for Optimism).
- fromTokenAddress (string, required): Source token contract address.
- toTokenAddress (string, required): Destination token contract address.
- fromAmount (string, optional): Amount to bridge in the smallest token unit (default: "10000000").
**Example Prompt**:
**Example Output**:
2. getSupportedChains
Fetches a sorted list of chains supported by LI.FI for cross-chain bridging, presented in a Markdown table.
**Parameters**: None.
**Example Prompt**:
**Example Output**:
3. getSupportedBridges
Fetches a sorted list of bridges and exchanges supported by LI.FI, presented in a Markdown table.