1inch Cross-Chain Swap MCP Server

by vaibhavgeek

Integrations

  • Enables portfolio management and value tracking for assets on the Ethereum blockchain.

  • Supports cross-chain token swaps involving the Polygon blockchain.

1인치 크로스 체인 스왑 도구

1인치 Fusion+와 Model Context Protocol(MCP)을 사용하여 크로스체인 토큰 스왑을 실행하는 도구입니다.

데모 비디오

개요

이 도구는 1inch Fusion+ API를 사용하여 서로 다른 블록체인(Arbitrum, Base, Polygon 등) 간의 크로스 체인 토큰 스왑을 지원합니다. 주문 생성부터 백그라운드 워커 시스템을 통한 실행 상태 모니터링까지 전체 스왑 프로세스를 처리합니다.

설치

종속성은 npm 아닌 pnpm 또는 yarn 사용하여 설치해야 합니다.

지엑스피1

구성

프로젝트는 CommonJS 프로젝트로 설정해야 합니다. ESM으로 가져오면 라이브러리 디자인이 현재 형태로는 작동하지 않습니다.

  1. 루트 디렉토리에 .env 파일을 만들고 다음 변수로 채웁니다.
DEV_PORTAL_KEY=replace_with_developer_portal_api_key WALLET_ADDRESS=replace_with_wallet_address WALLET_KEY=replace_with_wallet_private_key RPC_URL_ETHEREUM=replace_with_ethereum_rpc_url RPC_URL_BASE=replace_with_base_rpc_url INCH_API_KEY=replace_with_1inch_api_key

용법

MCP 서버 시작

npm start

이렇게 하면 크로스체인 스와핑과 포트폴리오 관리를 위한 도구를 제공하는 모델 컨텍스트 프로토콜 서버가 시작됩니다.

사용 가능한 MCP 도구

이 도구는 Claude 또는 다른 MCP 호환 어시스턴트와 함께 사용할 수 있는 다음과 같은 MCP 기능을 제공합니다.

크로스 체인 스왑
  • swap : 크로스체인 토큰 스왑을 시작합니다.
    Parameters: - srcChainId: Source chain ID (default: 8453/Base) - dstChainId: Destination chain ID (default: 42161/Arbitrum) - srcTokenAddress: Source token address - dstTokenAddress: Destination token address - amount: Amount to swap (in base units or human-readable format) - invert: Swap direction toggle (default: false)
주문 관리
  • swap-status : 스왑 주문 상태를 확인합니다.
    Parameters: - orderHash: (Optional) Specific order hash to check
포트폴리오 관리
  • 포트폴리오-프로토콜-값 : 포트폴리오의 프로토콜 값을 가져옵니다.
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum)
  • 포트폴리오-토큰-세부정보 : 포트폴리오의 토큰에 대한 자세한 정보를 가져옵니다.
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum) - closed: Include closed positions (default: true) - closedThreshold: Threshold for considering positions closed (default: 1)
  • 포트폴리오-일반-가치 : 포트폴리오의 일반적인 가치를 가져옵니다.
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum)
  • 포트폴리오 가치 차트 : 시간 경과에 따른 포트폴리오 가치에 대한 차트 데이터를 가져옵니다.
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum)

모니터링 시스템

이 애플리케이션에는 스왑 주문을 모니터링하고 처리하는 백그라운드 작업자 시스템이 포함되어 있습니다.

모니터 명령

# Start the monitor daemon npm run monitor:start # Check status of all orders npm run status # Check status of monitor daemon npm run monitor:status # Stop the monitor daemon npm run monitor:stop

근로자 시스템의 기능

  1. 스왑이 시작되면 주문 정보가 order-status.json 에 저장됩니다.
  2. 모니터 데몬은 모니터링이 필요한 새로운 주문을 지속적으로 확인합니다.
  3. 새로운 주문이 있을 때마다 전담 작업자 프로세스가 생성됩니다.
  4. 작업자는 주문 상태를 모니터링하고 필요한 경우 비밀을 제출하여 교환을 완료합니다.
  5. 주문이 실행되면 작업자가 종료되고 상태가 업데이트됩니다.

기술 노트

  • 안전한 크로스체인 스왑을 위해 1인치 크로스체인 SDK로 구축됨
  • AI 지원 통합을 위한 모델 컨텍스트 프로토콜 사용
  • Fusion SDK의 PrivateKeyProviderConnector 는 BlockchainProviderConnector를 지원합니다.
  • 이 도구는 크로스체인 스왑 검증을 위한 비밀 관리를 처리합니다.
-
security - not tested
F
license - not found
-
quality - not tested

1인치 Fusion+ API를 사용하여 서로 다른 블록체인 간의 크로스체인 토큰 교환을 가능하게 하는 MCP 서버와 체인 간 자산을 추적하는 포트폴리오 관리 도구입니다.

  1. Demo Video
    1. Overview
      1. Installation
        1. Configuration
          1. Usage
            1. Start the MCP Server
            2. Available MCP Tools
          2. Monitoring System
            1. Monitor Commands
            2. How the Worker System Functions
          3. Technical Notes

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              An 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
            • -
              security
              A
              license
              -
              quality
              An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.
              Last updated -
              63
              3
              JavaScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              An 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 -
              2
              2
              JavaScript
              MIT License
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              An 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
              • Apple

            View all related MCP servers

            ID: hrkocwzvzk