code-sandbox-mcp logo

code-sandbox-mcp

Free

创建安全的 Docker 容器环境来执行代码。

FreeFree tier
Inputs: code
Type
Open Source
Company
Automata-Labs-team

About code-sandbox-mcp

Code Sandbox MCP is an MCP (Model Context Protocol) server that creates a secure, Docker-based sandbox environment for executing code. Designed for AI applications, it provides a safe and isolated runtime for running code within containers, ensuring security through containerization. Key capabilities include flexible container management, custom environment support using any Docker image, file operations for transferring directories and files between host and containers, command execution, real-time logging, auto-updates, and cross-platform support for Linux, macOS, and Windows.

Key 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

Pros & Cons

Pros
  • High security through Docker container isolation
  • Supports any Docker image, allowing flexible environment configuration
  • Real-time logging for monitoring execution output
  • Auto-updates ensure the tool stays current
  • Cross-platform support (Linux, macOS, Windows) with easy installation scripts
Cons
  • Requires Docker to be installed and configured on the host system
  • Container overhead may impact performance for small code executions
  • Limited to command-line interaction via MCP protocol; no graphical interface

Best For

AI applications that need to execute code safely and securelyRunning untrusted code in an isolated container environmentSecure code testing and evaluation without risk to the host systemSandboxed development and experimentation with multiple environments

FAQ

What is Code Sandbox MCP?
It is an MCP server that provides a secure sandbox environment for executing code within Docker containers, designed for AI applications.
What are the prerequisites?
Docker must be installed and running on your system (Linux, macOS, or Windows).
How do I install it?
Quick install scripts are available for Linux/macOS (curl) and Windows (PowerShell). You can also manually download the binary from the releases page.
What tools does it provide?
It provides tools such as sandbox_initialize (create a container), copy_project (copy directories), write_file (create files), and sandbox_exec (execute commands).
Is it free and open source?
Yes, Code Sandbox MCP is free and open source, hosted under the Automata-Labs-team organization on GitHub.