Cover image
Try Now
2025-03-21

与[li.fi api]集成的MCP服务器(https://li.quest)

3 years

Works with Finder

1

Github Watches

1

Github Forks

1

Github Stars

LI.FI MCP Server

⚠️ IMPORTANT SECURITY DISCLAIMER ⚠️

DO NOT use this tool with your main wallet keystore or wallets containing significant funds!

This tool is for testing and experimental purposes only. There is potential for loss of funds due to:

  • Software bugs or security vulnerabilities
  • Transaction errors or misconfigurations
  • Network issues or smart contract failures

Neither LI.FI nor the developers of this tool are responsible for any loss of funds resulting from the use of this freely available open-source software.

Use at your own risk with test wallets only.

This MCP server integrates with the LI.FI API to provide cross-chain swap functionality across multiple liquidity pools and bridges.

Components

Tools

Token Information

  • GetTokens

    • Fetch all tokens known to the LI.FI services
    • Parameters: chains, chainTypes, minPriceUSD
  • GetToken

    • Get detailed information about a specific token
    • Parameters: chain (required), token (required)

Chain Information

  • GetChains

    • Get information about all supported chains
    • Parameters: chainTypes
  • GetChainById

    • Find a chain by its numeric ID
    • Parameters: id (required)
  • GetChainByName

    • Find a chain by name, key, or ID (case insensitive)
    • Parameters: name (required)

Cross-Chain Operations

  • GetQuote

    • Get a quote for a token transfer (cross-chain or same-chain)
    • Parameters: fromChain, toChain, fromToken, toToken, fromAddress, fromAmount, etc.
  • GetStatus

    • Check the status of a cross-chain transfer
    • Parameters: txHash (required), bridge, fromChain, toChain
  • GetConnections

    • Returns all possible connections between chains
    • Parameters: fromChain, toChain, fromToken, toToken, chainTypes
  • GetTools

    • Get available bridges and exchanges
    • Parameters: chains

Wallet Operations

  • GetWalletAddress

    • Get the Ethereum address for the loaded private key
  • GetNativeTokenBalance

    • Get the native token balance of a wallet
    • Parameters: rpcUrl (required), address (required)
  • GetTokenBalance

    • Get the balance of a specific ERC20 token for a wallet
    • Parameters: rpcUrl, tokenAddress, walletAddress
  • GetAllowance

    • Check the allowance of an ERC20 token for a specific spender
    • Parameters: rpcUrl, tokenAddress, ownerAddress, spenderAddress

Transaction Operations

  • ExecuteQuote

    • Execute a quote transaction using the stored private key
    • Parameters: rpcUrl, transactionRequest
  • ApproveToken

    • Approve a specific amount of ERC20 tokens to be spent by another address
    • Parameters: rpcUrl, tokenAddress, spenderAddress, amount
  • TransferToken

    • Transfer ERC20 tokens to another address
    • Parameters: rpcUrl, tokenAddress, to, amount
  • TransferNative

    • Transfer native cryptocurrency to another address
    • Parameters: rpcUrl, to, amount

Getting Started

Installation

Using the Install Script

You can install the LI.FI MCP server using the following command:

curl https://raw.githubusercontent.com/lifinance/lifi-mcp/refs/heads/main/install.sh | bash

Using Go Install

Alternatively, you can install using Go:

go install github.com/lifinance/lifi-mcp@latest

Wallet Management

Using an Existing Keystore

Run the server with an Ethereum keystore file:

lifi-mcp server --keystore <keystore-name> --password <keystore-password>

The server will search for a file containing this name in the standard Ethereum keystore directory:

  • Linux: ~/.ethereum/keystore
  • macOS: ~/Library/Ethereum/keystore
  • Windows: %APPDATA%\Ethereum\keystore

Creating a New Wallet

Create a new wallet keystore:

lifi-mcp new-wallet --name <wallet-name> --password <wallet-password>

This generates a new Ethereum wallet, saves it to the standard keystore location, and displays the wallet address.

Usage with Desktop App

To integrate this server with the desktop app, add the following to your app's server configuration:

{
  "mcpServers": {
    "lifi": {
      "command": "lifi-mcp",
      "args": ["server"]
    }
  }
}

For wallet functionality, include keystore parameters:

{
  "mcpServers": {
    "lifi": {
      "command": "lifi-mcp",
      "args": ["server", "--keystore", "your-keystore", "--password", "your-password"]
    }
  }
}

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Khalid kalib
  • Write professional emails

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

    Reviews

    1 (1)
    Avatar
    user_5pGS99Dq
    2025-04-17

    I've been using the LiFi-MCP and it has significantly streamlined my cross-platform financial data processing. The tool is robust, well-documented, and integrates seamlessly with my existing workflows. Kudos to the developers at LiFinance for creating such an efficient solution! Highly recommend checking it out: https://github.com/lifinance/lifi-mcp.