Skip to main content
Glama

1inch Cross-Chain Swap MCP Server

by vaibhavgeek

1インチクロスチェーンスワップツール

1inch Fusion+ と Model Context Protocol (MCP) を使用してクロスチェーン トークン スワップを実行するためのツール。

デモビデオ

概要

このツールは、1inch Fusion+ APIを使用して、異なるブロックチェーン(Arbitrum、Base、Polygonなど)間のクロスチェーントークンスワップを容易にします。注文の開始からバックグラウンドワーカーシステムによる実行状況の監視まで、スワッププロセス全体を処理します。

インストール

依存関係はnpmではなくpnpmまたはyarnを使用してインストールする必要があります。

pnpm install # or yarn install

構成

プロジェクトは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
ポートフォリオ管理
  • portfolio-protocols-value : ポートフォリオ内のプロトコルの値を取得します
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum)
  • portfolio-tokens-details : ポートフォリオ内のトークンの詳細情報を取得します
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum) - closed: Include closed positions (default: true) - closedThreshold: Threshold for considering positions closed (default: 1)
  • portfolio-general-value : ポートフォリオの一般的な価値を取得します
    Parameters: - chainId: Blockchain ID (default: 1/Ethereum)
  • portfolio-value-chart : ポートフォリオの価値の推移を示すチャートデータを取得します。
    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

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.

1inch Fusion+ API を使用して異なるブロックチェーン間でのクロスチェーン トークン交換を可能にする MCP サーバーと、チェーン全体の資産を追跡するためのポートフォリオ管理ツール。

  1. デモビデオ
    1. 概要
      1. インストール
        1. 構成
          1. 使用法
            1. MCPサーバーを起動する
            2. 利用可能なMCPツール
          2. 監視システム
            1. モニターコマンド
            2. 労働者システムの機能
          3. テクニカルノート

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              An MCP server that tracks newly created liquidity pools on Uniswap across nine blockchain networks.
              Last updated -
              5
              Python
              MIT License
            • -
              security
              A
              license
              -
              quality
              An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.
              Last updated -
              1
              26
              JavaScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              An MCP server providing unified access to blockchain operations, bridging, swapping, and crypto trading strategies for AI agents.
              Last updated -
              20
              194
              Python
              GPL 3.0
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              An MCP server for tracking and managing cryptocurrency portfolio allocations, enabling AI agents to query and optimize portfolio strategies in real time.
              Last updated -
              7
              Python
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/vaibhavgeek/one_inch_mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server