1英寸跨链交换工具
使用 1inch Fusion+ 和模型上下文协议 (MCP) 执行跨链代币交换的工具。
演示视频
概述
该工具使用 1inch Fusion+ API 实现不同区块链(Arbitrum、Base、Polygon 等)之间的跨链代币兑换。它处理整个兑换流程,从发起订单到通过后台工作系统监控执行状态。
安装
必须使用pnpm
或yarn
而不是npm
安装依赖项:
配置
该项目必须设置为 CommonJS 项目。如果将其导入为 ESM,则库的设计将无法以当前形式运行。
- 在根目录中创建一个
.env
文件并使用以下变量填充它:
用法
启动 MCP 服务器
这将启动模型上下文协议服务器,该服务器公开用于跨链交换和投资组合管理的工具。
可用的 MCP 工具
该工具提供以下 MCP 功能,可与 Claude 或其他兼容 MCP 的助手一起使用:
跨链交换
- swap :发起跨链代币交换
订单管理
- swap-status :检查掉期订单的状态
投资组合管理
- portfolio-protocols-value :获取投资组合中协议的价值
- portfolio-tokens-details :获取有关你的投资组合中代币的详细信息
- portfolio-general-value :获取投资组合的总体价值
- portfolio-value-chart :获取投资组合价值随时间变化的图表数据
监控系统
该应用程序包括一个监控和处理掉期订单的后台工作系统:
监控命令
工人系统如何运作
- 当发起掉期交易时,订单信息保存到
order-status.json
- 监控守护进程不断检查需要监控的新订单
- 对于每个新订单,都会生成一个专用的工作进程
- 工作人员监控订单状态并在需要时提交机密以完成交换
- 一旦订单被执行,工人就会被解雇,状态也会更新
技术说明
- 采用 1inch Cross-Chain SDK 构建,实现安全的跨链交换
- 使用模型上下文协议进行人工智能助手集成
- Fusion SDK 中的PrivateKeyProviderConnector支持 BlockchainProviderConnector
- 该工具负责跨链交换验证的秘密管理
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
MCP 服务器使用 1inch Fusion+ API 实现不同区块链之间的跨链代币交换,同时还提供用于跨链跟踪资产的投资组合管理工具。
Related MCP Servers
- -securityFlicense-qualityAn MCP server implementation that integrates with Angle One APIs to provide standardized access to financial market data, trading operations, and portfolio management.Last updated -Python
- -securityAlicense-qualityAn MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.Last updated -712JavaScriptMIT License
- -securityAlicense-qualityAn MCP server that provides seamless integration with the Neo N3 blockchain, allowing Claude to interact with blockchain data, manage wallets, transfer assets, and invoke smart contracts.Last updated -223MIT License
- -securityFlicense-qualityAn MCP server that connects Claude for Desktop with blockchain functionality, allowing users to check balances and send tokens on EVM and Solana chains through natural language interactions.Last updated -TypeScript