MCP-ODOS

by IQAIcom

MCP-ODOS: 分散型取引所向けモデルコンテキストプロトコルサーバー

このプロジェクトは、分散型取引所(DEX)と連携するためのモデルコンテキストプロトコル(MCP)サーバーを実装します。MCP対応クライアント(AIアシスタント、IDE拡張機能、カスタムアプリケーションなど)が、スワップの見積もり取得やスワップ実行などの機能にアクセスできるようになります。

このサーバーは TypeScript とfastmcpを使用して構築されています。

機能(MCPツール)

サーバーは、MCP クライアントが利用できる次のツールを公開します。

  • ODOS_GET_QUOTE : スワップの見積もりを取得します。
    • パラメータ: chainId (数値)、 sellToken (文字列)、 buyToken (文字列)、 sellAmount (文字列)
  • ODOS_EXECUTE_SWAP : スワップを実行します。
    • パラメータ: chainId (数値)、 sellToken (文字列)、 buyToken (文字列)、 sellAmount (文字列)、 quote (文字列)、 walletProvider (文字列)

パラメータの内訳

  • chainId : DEX のチェーン ID。
  • sellToken : 販売したいトークン。
  • buyToken : 購入したいトークン。
  • sellAmount : 販売したいトークンの量。
  • quote : get-quoteサービスから取得した見積もり。
  • walletProvider : 使用するウォレットプロバイダー。

前提条件

インストール

mcp-odosを使用するにはいくつかの方法があります。

1. pnpm dlxを使用する (ほとんどの MCP クライアント設定に推奨):

pnpm dlxを使えば、グローバルインストールを必要とせずにサーバーを直接実行できます。これは、MCPクライアントと統合する最も簡単な方法です。例については、「MCPクライアントでサーバーを実行する」セクションをご覧ください。( pnpm dlxは、pnpmにおけるnpxに相当します)

2. npm からのグローバルインストール (pnpm 経由):

mcp-odosコマンドをシステム全体で使用できるようにするには、パッケージをグローバルにインストールします。

pnpm add -g mcp-odos

3. ソースからのビルド (開発またはカスタム変更用):

  1. リポジトリをクローンします。
    git clone https://github.com/IQAIcom/mcp-odos.git cd mcp-odos
  2. 依存関係をインストールします:
    pnpm install
  3. **サーバーをビルドします。**これにより、TypeScript コードがdistディレクトリ内の JavaScript にコンパイルされます。
    pnpm run build
    prepareスクリプトはpnpm run buildも実行するため、クローンを作成してpnpm installを実行すると、インストール時に依存関係が構築されます。

設定(環境変数)

このMCPサーバーは、それを実行するMCPクライアントによって特定の環境変数の設定を必要とする場合があります。これらの環境変数は通常、クライアントのMCPサーバー定義(例えば、Cursorの場合はmcp.jsonファイル、その他のクライアントの場合は同様のファイル)で設定されます。

  • ウォレットプロバイダーまたは API キーに必要な環境変数。

MCPクライアントでサーバーを実行する

MCPクライアント(AIアシスタント、IDE拡張機能など)は、このサーバーをバックグラウンドプロセスとして実行します。クライアント側でサーバーの起動方法を設定する必要があります。

以下は、MCPクライアントが使用できる設定スニペットの例です(例: mcp_servers.jsonまたは同様の設定ファイル)。この例では、公開されているnpmパッケージをpnpm dlx経由で使用してサーバーを実行する方法を示しています。

{ "mcpServers": { "iq-odos-mcp-server": { "command": "pnpm", "args": ["dlx", "mcp-odos"], "env": { "WALLET_PRIVATE_KEY": "your_wallet_private_key_here" } } } }

グローバルにインストールされている場合の代替手段:

mcp-odosグローバルにインストールした場合 ( pnpm add -g mcp-odos )、 commandargsを簡素化できます。

{ "mcpServers": { "iq-odos-mcp-server": { "command": "mcp-odos", "args": [], "env": { "WALLET_PRIVATE_KEY": "your_wallet_private_key_here" } } } }
  • command : 実行する実行可能ファイル。
    • pnpm dlxの場合: "pnpm" (最初の引数として"dlx"を使用)
    • グローバルインストールの場合: "mcp-odos"
  • args : コマンドに渡す引数の配列。
    • pnpm dlxの場合: ["dlx", "mcp-odos"]
    • グローバルインストールの場合: []
  • env : サーバープロセスの起動時に設定される環境変数を含むオブジェクト。必要な環境変数はここに指定します。
  • workingDirectory : pnpm dlxまたはグローバルインストール経由で公開されたパッケージを使用する場合は、パッケージが自身のパスを正しく処理するため、通常は必要ありません。ソースコード ( node dist/index.js ) から実行する場合は、 workingDirectoryプロジェクトルートに設定することが重要になります。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

AI アシスタントとアプリケーションが分散型取引所 (DEX) と対話できるようにし、ユーザーがトークンスワップの見積もりを取得し、スワップ取引を実行できるようにするモデルコンテキストプロトコル サーバー。

  1. 機能(MCPツール)
    1. パラメータの内訳
  2. 前提条件
    1. インストール
      1. 設定(環境変数)
        1. MCPクライアントでサーバーを実行する

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server implementation that enables AI assistants to interact with the Paradex perpetual futures trading platform, allowing for retrieving market data, managing trading accounts, placing orders, and monitoring positions.
            Last updated -
            28
            4
            Python
            MIT License
            • Linux
            • Apple
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables AI assistants to interact with the Deriv trading API, providing access to active trading symbols and account balance information.
            Last updated -
            2
            Python
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.
            Last updated -
            JavaScript
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A production-ready Model Context Protocol server implementation that connects AI assistants to the TON blockchain, allowing them to query wallet balances, transaction details, smart contracts, and other blockchain data.
            Last updated -
            TypeScript
            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/IQAIcom/mcp-odos'

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