Sandbox MCP Server logo

Sandbox MCP Server

Community
Tsuchijo

An MCP server that provides isolated Docker environments for code execution. This server allows you to:

PublisherTsuchijo
Repositorysandbox-mcp
LanguagePython
Forks
5
Stars
17
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    Sandbox MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    17 stars and 5 forks from the linked repository.

Sandbox MCP Server

An MCP server that provides isolated Docker environments for code execution. This server allows you to:

  • Create containers with any Docker image
  • Write and execute code in multiple programming languages
  • Install packages and set up development environments
  • Run commands in isolated containers

Prerequisites

  • Python 3.9 or higher
  • Docker installed and running
  • uv package manager (recommended)
  • Docker MCP server (recommended)

Installation

  1. Clone this repository:
bash
git clone <your-repo-url>
cd sandbox_server
  1. Create and activate a virtual environment with uv:
bash
uv venv
source .venv/bin/activate  # On Unix/MacOS
# Or on Windows:
# .venv\Scripts\activate
  1. Install dependencies:
bash
uv pip install .

Integration with Claude Desktop

  1. Open Claude Desktop's configuration file:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  1. Add the sandbox server configuration:
json
{
    "mcpServers": {
        "sandbox": {
            "command": "uv",
            "args": [
                "--directory",
                "/absolute/path/to/sandbox_server",
                "run",
                "sandbox_server.py"
            ],
            "env": {
                "PYTHONPATH": "/absolute/path/to/sandbox_server"
            }
        }
    }
}

Replace /absolute/path/to/sandbox_server with the actual path to your project directory.

  1. Restart Claude Desktop

Usage Examples

Basic Usage

Once connected to Claude Desktop, you can:

  1. Create a Python container:
Could you create a Python container and write a simple hello world program?
  1. Run code in different languages:
Could you create a C program that calculates the fibonacci sequence and run it?
  1. Install packages and use them:
Could you create a Python script that uses numpy to generate and plot some random data?

Saving and Reproducing Environments

The server provides several ways to save and reproduce your development environments:

Creating Persistent Containers

When creating a container, you can make it persistent:

Could you create a persistent Python container with numpy and pandas installed?

This will create a container that:

  • Stays running after Claude Desktop closes
  • Can be accessed directly through Docker
  • Preserves all installed packages and files

The server will provide instructions for:

  • Accessing the container directly (docker exec)
  • Stopping and starting the container
  • Removing it when no longer needed

Saving Container State

After setting up your environment, you can save it as a Docker image:

Could you save the current container state as an image named 'my-ds-env:v1'?

This will:

  1. Create a new Docker image with all your:
    • Installed packages
    • Created files
    • Configuration changes
  2. Provide instructions for reusing the environment

You can then share this image or use it as a starting point for new containers:

Could you create a new container using the my-ds-env:v1 image?

Generating Dockerfiles

To make your environment fully reproducible, you can generate a Dockerfile:

Could you export a Dockerfile that recreates this environment?

The generated Dockerfile will include:

  • Base image specification
  • Created files
  • Template for additional setup steps

You can use this Dockerfile to:

  1. Share your environment setup with others
  2. Version control your development environment
  3. Modify and customize the build process
  4. Deploy to different systems

Recommended Workflow

For reproducible development environments:

  1. Create a persistent container:
Create a persistent Python container for data science work
  1. Install needed packages and set up the environment:
Install numpy, pandas, and scikit-learn in the container
  1. Test your setup:
Create and run a test script to verify the environment
  1. Save the state:
Save this container as 'ds-workspace:v1'
  1. Export a Dockerfile:
Generate a Dockerfile for this environment

This gives you multiple options for recreating your environment:

  • Use the saved Docker image directly
  • Build from the Dockerfile with modifications
  • Access the original container if needed

Security Notes

  • All code executes in isolated Docker containers
  • Containers are automatically removed after use
  • File systems are isolated between containers
  • Host system access is restricted

Project Structure

sandbox_server/
├── sandbox_server.py     # Main server implementation
├── pyproject.toml        # Project configuration
└── README.md            # This file

Available Tools

The server provides three main tools:

  1. create_container_environment: Creates a new Docker container with specified image
  2. create_file_in_container: Creates a file in a container
  3. execute_command_in_container: Runs commands in a container
  4. save_container_state: Saves the container state to a persistent container
  5. export_dockerfile: exports a docker file to create a persistant environment
  6. exit_container: closes a container to cleanup environment when finished

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "tsuchijo-sandbox-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use Sandbox MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Sandbox MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Sandbox MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Sandbox MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "tsuchijo-sandbox-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sandbox-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Sandbox MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Sandbox MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Sandbox MCP Server to help me with this task?
Sandbox MCP Server
Sure. I read it.
Here is what I found using Sandbox MCP Server.

Frequently asked questions

What is the Sandbox MCP Server MCP server used for?

Sandbox MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Sandbox MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Sandbox MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Sandbox MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Sandbox MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Sandbox MCP Server MCP to TypingMind?

Sandbox MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Sandbox MCP Server MCP provide in TypingMind?

Sandbox MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Sandbox MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Sandbox MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇