LI.FI MCP Server

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.

Category
Visit Server

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

  1. Clone the repository:
git clone <repository-url>
cd lifi-mcp-server
  1. Install dependencies:
npm install
  1. 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 authentication
  • debug (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 information
  • lifi_get_token(chain, token) - Get specific token details

Infrastructure

  • lifi_get_tools(chains?) - List available bridges and exchanges
  • lifi_get_connections(fromChain?, toChain?, fromToken?, toToken?, allowBridges?, denyBridges?, allowExchanges?, denyExchanges?) - Get connection information

Gas & Pricing

  • lifi_get_gas_prices(chainId) - Get current gas prices
  • lifi_get_gas_suggestion(chain, fromChain?, fromToken?) - Get gas recommendations

Transaction Management

  • lifi_get_transaction_status(txHash?, transactionId?) - Track transaction status
  • lifi_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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

ISC

Support

For issues related to:

Changelog

v1.0.0

  • Initial release with full LI.FI API integration
  • Support for all major LI.FI endpoints
  • Comprehensive error handling and validation

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured