Skip to main content
Glama

アイソレータMCPサーバー

isolator-mcp TypeScript で記述されたModel Context Protocol (MCP)サーバーです。組み込みのisolator Go CLI ツールのラッパーとして機能し、MCP 経由でアクセス可能な安全なコード実行サンドボックスを提供します。

LLM アプリケーション (MCP ホスト) はこのサーバーに接続し、 execute_codeツールを使用して、直接提供された、または事前定義されたスニペット ファイルから読み込まれた Python、Go、または JavaScript コード スニペットを安全に実行できます。

特徴

  • execute_code MCP ツールを提供します。

  • 直接提供されたコード ( languageentrypoint_code ) または名前付きスニペット ( snippet_name ) 経由での実行をサポートします。

  • 複数の言語 (Python、Go、JavaScript、構成可能) をサポートします。

  • 組み込みのisolator Go CLI ( isolator-cli/ ) を使用して、Docker コンテナを安全に実行します。

  • isolator_config.jsonを介して構成可能なセキュリティのデフォルト (タイムアウト、リソース制限、ネットワーク)。

  • コード実行のためにホスト上の一時ディレクトリを管理します。

  • コンテナへのファイルのコピーを処理します ( isolator CLI に指示することにより)。

  • ツールレベルの失敗時にisError: trueを設定し、MCP 経由で構造化された結果 (stdout、stderr、ステータス) を返します。

Related MCP server: SQL MCP Server

前提条件

  • Docker: isolator-cliによるコンテナの作成と実行に必要です。Docker デーモンが実行中であることを確認してください。

  • **Go:**組み込みのisolator-cli Go バイナリをビルドするために必要です。

  • **Node.js および npm:**依存関係をインストールし、 isolator-mcp TypeScript サーバーをビルドおよび実行するために必要です。

インストール

  1. **isolator Go CLI をビルドする:**埋め込まれた Go CLI ディレクトリに移動し、バイナリをビルドします。

    cd isolator-cli
    go build -o isolator main.go
    cd .. 

    これにより、サーバーに必要な./isolator-cli/isolator実行可能ファイルが作成されます。

  2. isolator-mcpを設定します。

    • isolator_config.jsonを編集します。isolatorPath isolatorPath更新し、ビルドされたバイナリの絶対パス(例: /Users/ompragash/Documents/Cline/MCP/isolator-mcp/isolator-cli/isolator )を指定します。必要に応じて、デフォルトの制限、コンテナの作業ディレクトリ、言語イメージ、またはpromptsDir (スニペット用)の場所を調整します。

    • promptsディレクトリが存在することを確認してください(デフォルト: ./prompts )。コードスニペットファイル(例: hello_world.py )を追加します。ファイル名のベース(例: hello_world )がsnippet_nameとして使用されます。

  3. **サーバーの依存関係をインストールします。**メイン ディレクトリ ( isolator-mcp ) に移動して、次のコマンドを実行します。

    npm install
  4. ビルドサーバー: TypeScript コードをコンパイルします。

    npm run build

    これによりbuild/index.jsに実行可能スクリプトが作成されます。

  5. MCP ホストを構成する: MCP クライアントの設定ファイル (例: VS Code 拡張機能の場合はcline_mcp_settings.json ) にサーバーを追加します。

    {
      "mcpServers": {
        "isolator": {
          "command": "node",
          "args": ["/Users/ompragash/Documents/Cline/MCP/isolator-mcp/build/index.js"],
          "env": {},
          "disabled": false,
          "autoApprove": []
        }
      }
    }

    (必要に応じてargsのパスを調整してください) 。MCPホストはサーバーを自動的に検出して起動します。

重要事項: isolator_config.jsonで指定されているDockerイメージ(例: python:3.11-alpinegolang:1.21-alpine )が、 docker pull <image_name> 。isolator isolatorは、不足しているイメージを自動的にダウンロードしません。

ローカル開発/テスト

開発またはテストのためにサーバーをローカルで実行するには(MCP ホスト設定でインストールせずに):

  1. Go CLI をビルドする: isolator Go CLI がサブディレクトリ内にビルドされていることを確認します。

    cd isolator-cli 
    go build -o isolator main.go
    cd ..
  2. **TS サーバーのビルド:**このメイン ディレクトリ ( isolator-mcp ) で、 npm installnpm run build実行します。

  3. 構成: isolator_config.json``isolatorPathキーを介してビルドされた./isolator-cli/isolatorバイナリを正しく指していることを確認します (絶対パスを使用)。

  4. サーバーの実行: Node を使用して構築されたサーバーを直接実行します。

    node build/index.js

    サーバーが起動し、stdio 経由で接続し、ログ ( index.tsからのconsole.errorメッセージを含む) をコンソールに出力します。

  5. 操作(手動): JSON-RPCメッセージ(例: tools/listtools/call )をサーバーの標準入力に手動で送信し、レスポンスをテストできます。 @modelcontextprotocol/inspectorなどのツールも役立ちます( npm run inspector )。

(MCP ホストに依存して設定ファイル経由でサーバーを起動する前に、手動で実行されているこのサーバーを必ず停止してください。)

アーキテクチャとフロー

  1. MCP ホスト要求: LLM は、MCP ホスト (VS Code 拡張機能など) に引数を指定してisolatorサーバーのexecute_codeツールを呼び出すように要求します。

  2. サーバー処理 ( index.ts ):

    • stdio 経由でtools/call要求を受信します。

    • Zod を使用して引数を検証します。

    • isolator_config.jsonから構成を読み込みます。

    • コード ソースを決定します。

      • snippet_nameが指定されている場合は、構成されたpromptsDirから対応するファイルを読み取り、ファイル拡張子から言語を決定します。

      • entrypoint_codelanguageが指定されている場合は、それらを直接使用します。

    • ホスト上に一時ディレクトリを作成します。

    • エントリポイント コードとすべてのadditional_filesを一時ディレクトリに書き込みます。

    • 組み込みisolator Go CLI のコマンドライン引数を構築します。これには、構成からのセキュリティ フラグと一時ディレクトリへのパスが含まれます。

    • Node.js child_process.spawnを使用してisolatorプロセスを生成します。

  3. Go CLI 実行 ( isolator-cli/isolator run ):

    • フラグを解析します (新しい--envフラグを含む)。

    • 一時ディレクトリの内容の tar ストリームを作成します。

    • Docker SDK を使用して、指定されたイメージ、リソース制限、環境変数 ( --envから)、およびセキュリティ設定 (バインドマウントなし) を持つコンテナーを作成します。

    • CopyToContainerを使用して、tar ストリームをコンテナの作業ディレクトリにコピーします。

    • コンテナを起動し、要求されたコマンド (例: python /workspace/hello_world.py ) を実行します。

    • 完了を待機し、stdout/stderr をキャプチャします。

    • コンテナを削除します。

    • 結果 (ステータス、出力など) を JSON として stdout に出力します。

  4. サーバー結果処理 ( index.ts ):

    • 完了したisolatorプロセスの stdout から JSON 出力を読み取ります。

    • JSON の結果を解析します。

    • CallToolResult MCP 用にフォーマットし、stdout/stderr を結合し、Go CLI が非成功ステータスを報告した場合にisErrorを設定します。

    • 結果を MCP ホストに送り返します。

    • ホスト上の一時ディレクトリをクリーンアップします。

  5. **MCP ホスト応答:**結果を LLM に中継し、LLM がユーザーへの応答を作成します。

execute_codeツール

説明

安全で分離されたコンテナ環境でコード (Python、Go、JavaScript) を実行します。

入力スキーマ( arguments

  • language (文字列、オプション): プログラミング言語(例: "python"、"go"、"javascript")。 snippet_nameが指定されていない場合は必須です。

  • entrypoint_code (文字列、オプション):実行するメインコードの内容。snippet_nameが指定snippet_nameれていない場合は必須です。

  • entrypoint_filename (文字列、オプション): メインコードのファイル名(例: "main.py"、"script.js")。指定されていない場合は、言語に基づいてデフォルトが設定されます。

  • additional_files (配列、オプション): オブジェクトの配列。各オブジェクトには次の内容が含まれます。

    • filename (文字列、必須): 追加ファイルの名前。

    • content (文字列、必須): 追加ファイルの内容。

  • snippet_name (文字列、オプション): 設定されたpromptsDirにある、定義済みのコードスニペットファイル(拡張子なし)の名前。language およびentrypoint_codeとは相互language排他的です。

制約: snippet_nameいずれか、またはlanguageentrypoint_codeの両方を指定する必要があります。

出力 ( CallToolResult )

  • content : 単一のTextContentオブジェクトを含む配列。

    • type :「テキスト」

    • text : 実行からの stdout と stderr を組み合わせた文字列。形式は次のようになります。

      --- stdout ---
      [Actual stdout output]
      --- stderr ---
      [Actual stderr output]

      実行中にエラーが発生した場合 (終了コードがゼロ以外、タイムアウト)、テキストの先頭にExecution Failed (status): [error message]\n\n追加されます。

  • isError (ブール値): isolator CLI によって報告された実行ステータスが「エラー」または「タイムアウト」の場合はtrue 、それ以外の場合はfalse

(無効な引数やプロセスの開始の失敗などのプロトコル レベルのエラーが発生すると、 CallToolResultではなく標準の MCP エラー応答が返されます)

Available Tools

1 tool
execute_codeC

Executes code (Python, Go, JavaScript) in a secure, isolated container environment.

ParametersJSON Schema
NameRequiredDescriptionDefault
additional_filesNoOptional array of additional files needed for execution
entrypoint_codeNoThe main code content to execute. Required unless using snippet_name.
entrypoint_filenameNoOptional filename for the main code (defaults based on language).
languageNoThe programming language (python, go, javascript). Required unless using snippet_name.
snippet_nameNoName of a pre-defined code snippet to execute (e.g., 'hello_world'). Mutually exclusive with entrypoint_code/language.

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'secure, isolated container environment' which hints at safety, but doesn't disclose critical behaviors like execution time limits, resource constraints, output handling, error behavior, or authentication needs. For a code execution tool with zero annotation coverage, this is insufficient.

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, efficient sentence that front-loads the core purpose. Every word earns its place, with no redundancy or unnecessary elaboration. It's appropriately sized for the tool's complexity.

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 of a code execution tool with no annotations and no output schema, the description is incomplete. It lacks details on return values, error handling, execution constraints, and safety guarantees. The description doesn't compensate for the missing structured data, leaving significant gaps for an AI 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?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description doesn't add any parameter-specific details beyond what's in the schema, such as explaining mutual exclusivity rules or language-specific defaults. Baseline 3 is appropriate when schema does the heavy lifting.

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 clearly states the action ('Executes code') and resource ('in a secure, isolated container environment'), specifying supported languages (Python, Go, JavaScript). It distinguishes from potential alternatives by mentioning the execution environment, but without sibling tools, full differentiation isn't possible.

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 on when to use this tool versus alternatives is provided. The description mentions the execution environment but doesn't specify use cases, prerequisites, or limitations. Without siblings, this is less critical, but still a gap in usage context.

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. 1 tool updatev1.0.0
    • First observedexecute_code

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to compare it to. The tool's purpose is clearly defined and distinct by default.

Naming Consistency5/5

Since there is only one tool, it inherently follows a consistent naming pattern with itself. The tool name 'execute_code' uses a clear verb_noun structure, which is appropriate and consistent in this minimal context.

Tool Count2/5

A single tool for a server named 'Isolator MCP Server' suggests a very narrow scope, but it may be too minimal for practical use. While the tool handles code execution, the server's purpose might imply broader isolation features, making the count feel thin and potentially under-scoped.

Completeness2/5

The tool surface is severely incomplete for a server focused on isolated code execution. There are obvious gaps, such as no tools for managing containers, listing available environments, checking execution status, or handling input/output beyond the single execute command, which will limit agent capabilities.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A TypeScript implementation of a Model Context Protocol server that provides a frictionless framework for developers to build and deploy AI tools and prompts, focusing on developer experience with zero boilerplate and automatic tool registration.
    681 npm
    14
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A TypeScript implementation of a Model Context Protocol server that enables language models to securely query PostgreSQL databases, including those behind SSH bastion tunnels.
    9 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A TypeScript server implementing the Model Context Protocol that enables AI agents to interact with the Akash Network, allowing them to deploy applications, create leases, manage deployments, and access other Akash services through typed tools.
    58 npm
    13
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
    121
    MIT