Skip to main content
Glama

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 : 使用するウォレットプロバイダー。

Related MCP server: CCXT MCP Server

前提条件

インストール

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 )、 commandとargsを簡素化できます。

{
  "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プロジェクトルートに設定することが重要になります。

Available Tools

3 tools
ODOS_GET_CHAIN_IDA

Get the chain ID for a given chain name

ParametersJSON Schema
NameRequiredDescriptionDefault
chainYesThe chain name to get the ID for

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as idempotency, side effects, or rate limits. While the tool name suggests a read-only operation, the description does not explicitly confirm safety or other behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no unnecessary words. It is front-loaded with the verb and clearly states the purpose, earning full marks for efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (single parameter, no output schema), the description is adequate but could be improved by explaining what the chain ID is or the format of the return value. It is minimally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'chain' already described. The description adds minimal additional meaning beyond the schema, so it meets the baseline but does not enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get', the resource 'chain ID', and the condition 'for a given chain name'. It effectively distinguishes itself from sibling tools like ODOS_GET_QUOTE and ODOS_SWAP, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or limitations. It is straightforward but lacks usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ODOS_GET_QUOTEB

Get a quote for a swap or exchange operation

ParametersJSON Schema
NameRequiredDescriptionDefault
chainNoThe blockchain network to execute the transaction on. uses fraxtal as defaultfraxtal
fromTokenYesThe token to swap from (address).
toTokenYesThe token to swap to (address).
amountYesThe amount of tokens to swap, in wei.
prettyFormatNoWhether to pretty format the quote.

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description gives no behavioral details beyond stating it gets a quote. There is no mention of side effects, authentication, rate limits, or whether the operation is read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. However, it could still include more useful information without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should explain what the tool returns (e.g., a quote object). It does not mention the return format, pagination, or error cases, leaving the agent underinformed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters. The description adds no additional meaning or context for the parameters, such as token address format or amount precision.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get a quote for a swap or exchange operation' clearly states the verb (Get), resource (quote), and context (swap/exchange). It distinguishes from sibling tools like ODOS_SWAP (which performs the swap) and ODOS_GET_CHAIN_ID (which retrieves chain ID).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus siblings or alternatives. It does not mention that getting a quote is a prerequisite for swapping, nor does it advise against using it in certain contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ODOS_SWAPC

Execute a swap transaction

ParametersJSON Schema
NameRequiredDescriptionDefault
chainNoThe blockchain network to execute the transaction on. uses fraxtal as defaultfraxtal
fromTokenYesThe token to swap from (address).
toTokenYesThe token to swap to (address).
amountYesThe amount of tokens to swap, in wei.
prettyFormatNoWhether to pretty format the quote.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. 'Execute a swap transaction' implies a write operation but does not disclose side effects, authorization needs (e.g., token approval), or error conditions, making it insufficiently transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise and front-loaded. It earns its place but could benefit from additional context without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (swap transaction with 5 parameters, no output schema), the description is incomplete. It omits critical details like expected output (transaction hash?), slippage parameters, or prerequisite approvals, leaving gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers 100% of parameters with descriptions (e.g., each token address, amount in wei). The description adds no new meaning, so baseline score of 3 is appropriate per guidelines.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Execute a swap transaction' clearly states the verb and resource, distinguishing it from sibling tools like ODOS_GET_QUOTE which provides quotes. However, it lacks additional context about what a swap entails, slightly reducing clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidelines are provided. The description does not specify when to use this tool (e.g., after obtaining a quote) or when not to use it, leaving the agent without important context for correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedODOS_GET_CHAIN_ID
    • First observedODOS_GET_QUOTE
    • First observedODOS_SWAP

TDQS

A3.5/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct step in the swap process: chain ID lookup, quote retrieval, and execution. No ambiguity or overlap exists.

Naming Consistency5/5

All tools use a consistent ODOS_ prefix followed by clear verb_noun patterns (GET_CHAIN_ID, GET_QUOTE, SWAP), making them predictable.

Tool Count5/5

With 3 tools, the server is well-scoped for the core swap workflow without unnecessary bloat or deficiency.

Completeness3/5

The tools cover the essential swap steps but lack a token approval tool, which is commonly required for many swaps, creating a potential gap.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.
    15 npm
    22
    MIT
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A comprehensive Model Context Protocol server that enables AI agents to interact with BNB Chain, opBNB, and other EVM networks through natural language. It provides tools for DeFi trading, DEX swaps, smart contract deployment, token operations, security analysis, and market data across multiple blockchain networks.
    24 npm
    -

Appeared in Searches