AL

automata-labs-team/code-sandbox-mcp

Deployment & DevOps公式

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

326 stars 38 forks 品質 68 トレンド 19MIT

Dockerコンテナ内でコードを実行するための安全なコードサンドボックス環境を作成するMCPサーバーです。このMCPサーバーはAIアプリケーションに安全で隔離された環境を提供し、コード実行に適しています...

概要

Dockerコンテナ内でコードを実行するための安全なサンドボックス環境。このMCPサーバーは、コンテナ化を通じてセキュリティを維持しつつ、AIアプリケーションに安全かつ隔離された環境を提供します。 - : コード実行用の隔離されたDockerコンテナを作成・管理 - : 任意のDockerイメージを実行環境として使用可能 - : ホストとコンテナ間のファイルおよびディレクトリの簡単な転送 - : コンテナ化環境内でシェルコマンドを実行 - : コンテナログとコマンド出力をリアルタイムでストリーム - : 組み込みの更新チェックと自動バイナリ更新 - : Linux、macOS、Windowsに対応しています - Docker インストール済み 実行中 - Linux に Docker をインストールする - macOS に Docker Desktop をインストールする - Windows に Docker Desktop をインストールする インストーラーは以下の通りです:1. Dockerのインストールをチェック 2.システムに適したバイナリをダウンロード 3.必要な設定ファイルを作成する 1. リリースページからプラットフォームの最新リリースをダウンロード 2.

概要(AI 翻訳)

Dockerコンテナ内でコードを実行するための安全なサンドボックス環境。このMCPサーバーは、コンテナ化を通じてセキュリティを維持しつつ、AIアプリケーションに安全かつ隔離された環境を提供します。

🌟 特徴

  • 柔軟なコンテナ管理:コード実行のための独立したDockerコンテナを作成・管理
  • カスタム環境サポート:任意のDockerイメージを実行環境として使用してください
  • ファイル操作:ホストとコンテナ間の簡単なファイルおよびディレクトリ転送
  • コマンド実行:コンテナ化環境内で任意のシェルコマンドを実行する
  • リアルタイムログ:コンテナログとコマンド出力をリアルタイムでストリーム
  • 自動更新:組み込みの更新チェックと自動バイナリ更新
  • マルチプラットフォーム:Linux、macOS、Windowsに対応しています

🚀 設置

前提条件

  • Docker インストールおよび実行
  • Linux用のDocker インストール
  • macOS用のDocker Desktopをインストールする
  • Windows 用 Docker Desktop をインストールする

クイックインストール

Linux、MacOS

ウィンドウズ

設置業者は以下のことをします:

  1. Dockerのインストールをチェック
  2. システムに適したバイナリをダウンロードします
  3. 必要な設定ファイルを作成する

手動インストール

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Code Sandbox MCP 🐳

A secure sandbox environment for executing code within Docker containers. This MCP server provides AI applications with a safe and isolated environment for running code while maintaining security through containerization.

🌟 Features

  • Flexible Container Management: Create and manage isolated Docker containers for code execution
  • Custom Environment Support: Use any Docker image as your execution environment
  • File Operations: Easy file and directory transfer between host and containers
  • Command Execution: Run any shell commands within the containerized environment
  • Real-time Logging: Stream container logs and command output in real-time
  • Auto-Updates: Built-in update checking and automatic binary updates
  • Multi-Platform: Supports Linux, macOS, and Windows

🚀 Installation

Prerequisites

Quick Install

Linux, MacOS

curl -fsSL https://raw.githubusercontent.com/Automata-Labs-team/code-sandbox-mcp/main/install.sh | bash

Windows

# Run in PowerShell
irm https://raw.githubusercontent.com/Automata-Labs-team/code-sandbox-mcp/main/install.ps1 | iex

The installer will:

  1. Check for Docker installation
  2. Download the appropriate binary for your system
  3. Create necessary configuration files

Manual Installation

  1. Download the latest release for your platform from the releases page
  2. Place the binary in a directory in your PATH
  3. Make it executable (Unix-like systems only):
    chmod +x code-sandbox-mcp
    

🛠️ Available Tools

sandbox_initialize

Initialize a new compute environment for code execution. Creates a container based on the specified Docker image.

Parameters:

  • image (string, optional): Docker image to use as the base environment
    • Default: ‘python:3.12-slim-bookworm’

Returns:

  • container_id that can be used with other tools to interact with this environment

copy_project

Copy a directory to the sandboxed filesystem.

Parameters:

  • container_id (string, required): ID of the container returned from the initialize call
  • local_src_dir (string, required): Path to a directory in the local file system
  • dest_dir (string, optional): Path to save the src directory in the sandbox environment

write_file

Write a file to the sandboxed filesystem.

Parameters:

  • container_id (string, required): ID of the container returned from the initialize call
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

// ~/.config/Claude/claude_desktop_config.json { "mcpServers": { "code-sandbox-mcp": { "command": "/path/to/code-sandbox-mcp", "args": [], "env": {} } } }