An MCP server to create secure code 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.
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.
curl -fsSL https://raw.githubusercontent.com/Automata-Labs-team/code-sandbox-mcp/main/install.sh | bash
Example output:
Downloading latest release...
Installing to /home/user/.local/share/code-sandbox-mcp/code-sandbox-mcp...
Adding to Claude Desktop configuration...
Added code-sandbox-mcp to /home/user/.config/Claude/claude_desktop_config.json
Installation complete!
You can now use code-sandbox-mcp with Claude Desktop or other AI applications.
## Run in PowerShell
irm https://raw.githubusercontent.com/Automata-Labs-team/code-sandbox-mcp/main/install.ps1 | iex
The installer will:
chmod +x code-sandbox-mcp
run_code
Executes code snippets in an isolated Docker container.
Parameters:
code
(string, required): The code to runlanguage
(enum, required): Programming language to use
python
, go
, nodejs
run_project
tool instead. Go and Node.js script dependencies are automatically installed.Returns:
Features:
run_project
Executes a project directory in a containerized environment.
Parameters:
project_dir
(string, required): Directory containing the project to runlanguage
(enum, required): Programming language to use
python
, go
, nodejs
entrypointCmd
(string, required): Command to run the project
python main.py
node index.js
go run main.go
Returns:
Features:
The installer automatically creates the configuration file. If you need to manually configure it:
// ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"code-sandbox-mcp": {
"command": "/path/to/code-sandbox-mcp",
"args": [],
"env": {}
}
}
}
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"code-sandbox-mcp": {
"command": "/path/to/code-sandbox-mcp",
"args": [],
"env": {}
}
}
}
// %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"code-sandbox-mcp": {
"command": "C:\path\to\code-sandbox-mcp.exe",
"args": [],
"env": {}
}
}
}
For other AI applications that support MCP servers, configure them to use the code-sandbox-mcp
binary as their code execution backend.
Language | File Extensions | Docker Image |
---|---|---|
Python | .py | python:3.12-slim-bookworm |
Go | .go | golang:1.21-alpine |
Node.js | .js, .ts, .tsx, .jsx | node:23-slim |
The sandbox automatically detects and installs dependencies:
Python:
import requests
, from PIL import Image
PIL
→ pillow
)__import__()
callsNode.js:
require()
statements and ES6 imports@org/package
)import()
)Go:
go get
For project execution, the following files are used:
Node.js 23+ includes built-in TypeScript support:
--experimental-strip-types
: Enabled by default for .ts files--experimental-transform-types
: Used for .tsx filesIf you want to build the project locally or contribute to its development, see DEVELOPMENT.md{:target=“_blank”}.
This project is licensed under the MIT License - see the LICENSE{:target=“_blank”} file for details.
An MCP server that enables communication with users through Telegram. This server provides a tool to ask questions to users and receive their responses via a Telegram bot.
Obsidian Knowledge-Management MCP (Model Context Protocol) server that enables AI agents and development tools to interact with an Obsidian vault. It provides a comprehensive suite of tools for reading, writing, searching, and managing notes, tags, and frontmatter, acting as a bridge to the Obsidian Local REST API plugin.
An MCP server enhances AI responses with real-time search results via Higress ai-search.