LI.FI MCP Server
Enables AI assistants to interact with LI.FI's cross-chain infrastructure, providing access to blockchain networks, token data, bridges, and transaction services through a standardized protocol.
README
LI.FI MCP Server
A Model Context Protocol (MCP) server that provides comprehensive integration with the LI.FI API for cross-chain bridge and DEX aggregation services.
Overview
This MCP server enables AI assistants and applications to interact with LI.FI's cross-chain infrastructure through a standardized protocol. It provides access to blockchain network information, token data, bridging tools, transaction status tracking, and more.
Features
Available Tools
- Chain Information (
lifi_get_chains) - Get information about all supported blockchain networks - Token Data (
lifi_get_tokens) - Retrieve comprehensive token information across chains - Specific Token (
lifi_get_token) - Get detailed information about a specific token - Bridge & Exchange Tools (
lifi_get_tools) - List available bridges and exchanges - Chain Connections (
lifi_get_connections) - Explore supported cross-chain connections - Gas Price Data (
lifi_get_gas_prices) - Get current gas prices for specific chains - Gas Suggestions (
lifi_get_gas_suggestion) - Get gas amount recommendations - Transaction Status (
lifi_get_transaction_status) - Track cross-chain transfer status - Fee Withdrawal (
lifi_get_integrator_fee_withdrawal) - Manage integrator fee withdrawals
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- LI.FI API key
Installation
- Clone the repository:
git clone <repository-url>
cd lifi-mcp-server
- Install dependencies:
npm install
- Obtain a LI.FI API key:
- Visit LI.FI Developer Portal to register and get your API key
- Keep your API key secure and ready for configuration
Configuration
The server requires the following configuration:
lifiApiKey(required): Your LI.FI API key for authenticationdebug(optional): Enable debug logging (default: false)
Development
Start the development server:
npm run dev
This will start the MCP server using Smithery CLI with hot reloading enabled.
Usage
With MCP-Compatible Applications
This server can be used with any application that supports the Model Context Protocol, such as:
- Claude Desktop
- MCP-enabled IDEs
- Custom MCP clients
Example Configuration
For Claude Desktop, add to your claude_desktop_config.json:
{
"mcpServers": {
"lifi": {
"command": "node",
"args": ["path/to/lifi-mcp-server/dist/index.js"],
"env": {
"LIFI_API_KEY": "your-api-key-here"
}
}
}
}
Tool Examples
Get supported chains:
lifi_get_chains
Get tokens for specific chains:
lifi_get_tokens(chains: "1,137,42161")
Check transaction status:
lifi_get_transaction_status(txHash: "0x...")
Get gas prices:
lifi_get_gas_prices(chainId: "1")
API Reference
Chain Operations
lifi_get_chains(chainTypes?)- List supported blockchain networks
Token Operations
lifi_get_tokens(chains?, chainTypes?, minPriceUSD?)- Get token informationlifi_get_token(chain, token)- Get specific token details
Infrastructure
lifi_get_tools(chains?)- List available bridges and exchangeslifi_get_connections(fromChain?, toChain?, fromToken?, toToken?, allowBridges?, denyBridges?, allowExchanges?, denyExchanges?)- Get connection information
Gas & Pricing
lifi_get_gas_prices(chainId)- Get current gas priceslifi_get_gas_suggestion(chain, fromChain?, fromToken?)- Get gas recommendations
Transaction Management
lifi_get_transaction_status(txHash?, transactionId?)- Track transaction statuslifi_get_integrator_fee_withdrawal(integratorId, chainId, tokens?)- Manage fee withdrawals
Tech Stack
- Runtime: TypeScript
- MCP SDK: @modelcontextprotocol/sdk
- HTTP Client: node-fetch
- Validation: Zod
- Development: Smithery CLI
Error Handling
The server includes comprehensive error handling for:
- API authentication failures
- Network connectivity issues
- Invalid parameter validation
- LI.FI API errors and rate limits
All errors are returned as structured responses with descriptive messages.
Security
- API keys are required and validated at connection time
- All requests use HTTPS
- Input validation using Zod schemas
- No sensitive data is logged in production
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
ISC
Support
For issues related to:
- This MCP Server: Create an issue in this repository
- LI.FI API: Visit LI.FI Documentation
- Model Context Protocol: Visit MCP Documentation
Changelog
v1.0.0
- Initial release with full LI.FI API integration
- Support for all major LI.FI endpoints
- Comprehensive error handling and validation
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。