Integrations
Runs Python code in isolated Docker containers for secure execution, enabling safe installation of packages and execution of arbitrary Python code
Supports installation and usage of NumPy library in the Python environment as mentioned in the example workflow
Supports installation and usage of pandas library for data analysis as mentioned in the example workflow
MCPサンドボックス
ぜひMCPサンドボックスでお試しください
中国語のテキスト| English
デモ
Python MCP Sandbox は、ユーザーと LLM が Python コードを安全に実行し、分離された Docker コンテナーにパッケージをインストールできるようにするインタラクティブな Python コード実行ツールです。
特徴
- 🐳 Docker Isolation : 分離された Docker コンテナ内で Python コードを安全に実行
- 📦パッケージ管理: Python パッケージを簡単にインストールおよび管理します
- 📊ファイル生成: ファイルの生成とWebリンク経由のアクセスをサポート
インストール
デフォルトの SSE エンドポイントはhttp://localhost:8000/sse であり、SSE または SSE 接続をサポートするその他のクライアントを介して MCP Inspector 経由で対話できます。
利用可能なツール
- create_sandbox : 新しい Python Docker サンドボックスを作成し、後続のコード実行とパッケージのインストールのためにその ID を返します。
- list_sandboxes : 再利用するために既存のサンドボックス(Dockerコンテナ)をすべて一覧表示します。
- execute_python_code : 指定されたDockerサンドボックスでPythonコードを実行する
- install_package_in_sandbox : 指定された Docker サンドボックスに Python パッケージをインストールします
- check_package_installation_status : Dockerサンドボックスでパッケージがインストールされているかどうか、またはインストールステータスを確認します。
- execute_terminal_command : 指定されたDockerサンドボックスでターミナルコマンドを実行します。パラメータ:
sandbox_id
(文字列)、command
(文字列)。戻り値:stdout
、stderr
、exit_code
。 - upload_file_to_sandbox : 指定された Docker サンドボックスにローカル ファイルをアップロードします。パラメーター:
sandbox_id
(文字列)、local_file_path
(文字列)、dest_path
(文字列、オプション、デフォルト:/app/results
)。
プロジェクト構造
例のプロンプト
MCP の例の設定
以下は claude の設定例です。
オンラインデモ用のMCPサンプル構成
環境に応じてserverUrl
変更します。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
ユーザーと LLM が Python コードを安全に実行し、分離された Docker コンテナにパッケージをインストールできるようにするインタラクティブな Python コード実行環境。
Related MCP Servers
- -securityFlicense-qualityProvides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.Last updated -6Python
- AsecurityAlicenseAqualityAllows LLMs to execute Python code in a specified Conda environment, enabling access to necessary libraries and dependencies for efficient code execution.Last updated -129JavaScriptMIT License
- -securityAlicense-qualityFacilitates isolated code execution within Docker containers, enabling secure multi-language script execution and integration with language models like Claude via the Model Context Protocol.Last updated -PythonMIT License
- AsecurityAlicenseAqualityA server that provides a persistent Python REPL environment through the MCP protocol, allowing execution of Python code, variable management, and package installation.Last updated -33PythonMIT License