Integrations
1inch Cross-Chain Swap Tool
A tool for executing cross-chain token swaps using 1inch Fusion+ and Model Context Protocol (MCP).
Demo Video
Overview
This tool facilitates cross-chain token swaps between different blockchains (Arbitrum, Base, Polygon, etc.) using the 1inch Fusion+ API. It handles the entire swap process, from initiating orders to monitoring their execution status through a background worker system.
Installation
Dependencies must be installed using pnpm
or yarn
and not npm
:
Configuration
The project must be setup as a CommonJS project. The design of the library does not work in its current form if you import it as ESM.
- Create a
.env
file in the root directory and populate it with the following variables:
Usage
Start the MCP Server
This starts the Model Context Protocol server which exposes tools for cross-chain swapping and portfolio management.
Available MCP Tools
The tool provides the following MCP functions that can be used with Claude or other MCP-compatible assistants:
Cross-Chain Swap
- swap: Initiates a cross-chain token swapCopy
Order Management
- swap-status: Checks the status of swap ordersCopy
Portfolio Management
- portfolio-protocols-value: Gets the value of protocols in your portfolioCopy
- portfolio-tokens-details: Gets detailed information about tokens in your portfolioCopy
- portfolio-general-value: Gets the general value of your portfolioCopy
- portfolio-value-chart: Gets chart data for portfolio value over timeCopy
Monitoring System
The application includes a background worker system that monitors and processes swap orders:
Monitor Commands
How the Worker System Functions
- When a swap is initiated, the order information is saved to
order-status.json
- The monitor daemon continuously checks for new orders that need monitoring
- For each new order, a dedicated worker process is spawned
- The worker monitors the order status and submits secrets when needed to complete the swap
- Once an order is executed, the worker is terminated and the status is updated
Technical Notes
- Built with the 1inch Cross-Chain SDK for secure cross-chain swaps
- Uses Model Context Protocol for AI-assistant integration
- PrivateKeyProviderConnector in the Fusion SDK supports BlockchainProviderConnector
- The tool handles secret management for cross-chain swap verification
This server cannot be installed
An MCP server that enables cross-chain token swapping between different blockchains using 1inch Fusion+ API, along with portfolio management tools for tracking assets across chains.
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 -633JavaScriptMIT 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 -22JavaScriptMIT 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