Sandbox Env MCP logo

Sandbox Env MCP

Persistent Docker and SSH workspaces with stateful shells, filesystem tools, multi-machine control, and audit logging.

Install Sandbox Env MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "sandbox-env-mcp": {
      "command": "uvx",
      "args": [
        "sandbox-env-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx sandbox-env-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Sandbox Env MCP MCP server gives agents persistent shell sessions, filesystem operations, and machine management across Docker containers and configured SSH hosts. It exposes MCP tools for running commands, reading output, creating shells, editing files, searching workspaces, and selecting targets. Docker can start a default container on first launch, while SSH targets require configuration. Reach for it when an agent needs a stateful development environment rather than isolated one-off command execution.

Use cases

  • Run persistent development shells for agents
  • Edit and search files inside isolated workspaces
  • Manage multiple Docker containers from one MCP session
  • Connect agents to configured SSH build hosts
  • Inspect audit records for tool activity

Key features

  • Persistent bash and PowerShell shells
  • Docker and SSH machine backends
  • Atomic file writes and targeted patches
  • Progressive capability discovery
  • Docker lifecycle management
  • Tool-call audit logging

Tools13

What Sandbox Env MCP lets your agent do. Expand a tool for its parameters.

Self-reported~306 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 72d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2d ago via OSV.dev · sandbox-env-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed13Callable tools this server registers over MCP.

How Sandbox Env MCP works

What Sandbox Env MCP MCP server does

Sandbox Env MCP MCP server provides an MCP interface to working environments backed by Docker containers or remote SSH machines. Agents can keep shell state across calls, work with files, and manage more than one target. A shell can retain environment variables, the current directory, or an activated virtual environment between commands.

The server can start with a default Docker container and persistent bash shell. Its machine registry distinguishes targets, their backends, purposes, status, and shell counts. SSH connections are available for configured Linux or Windows hosts.

How it works

Shell operations use named sessions. shell_new creates a shell and returns a shell_id; shell_exec runs commands in that session, either waiting for completion or returning while a command continues. shell_read retrieves buffered output, and write_stdin supplies input or sends Ctrl-C on supported systems. A shell that exits retains its final output but must be removed and replaced before continuing.

Commands that exceed the default wait period can be polled with shell_read. Output is capped by a configurable maximum, with excess output represented by the tail. default_set chooses the machine or shell used when a tool call does not specify a target.

Docker-backed machines use workspace mounts, and the server can reconcile surviving managed containers when it starts. The progressive env tool provides help, status, target discovery, Docker actions, and SSH connection actions through documented action names. Tool calls are recorded with timestamps, parameters, and outcomes; an audit_query capability is available when the audit log uses SQLite.

Setup and configuration

Install the package with pip install sandbox-env-mcp, then run sandbox-mcp for stdio or sandbox-mcp-http for HTTP access. The documented runtime requirements are Python 3.12 or newer, the Docker SDK, and a running Docker daemon. SSH mode also requires openssh-client.

Configuration is stored at ~/.sandbox-mcp/config.toml, with an example file under config/config.example.toml. Settings cover the HTTP port, audit-token file, storage location, default Docker image, networking, workspace path, shell output limit, file size limit, and SSH connection timeout. Configuration fields can also be overridden through environment variables following the SANDBOX_MCP_<SECTION>_<KEY> naming pattern.

Tools and capabilities

Sandbox Env MCP MCP server exposes these direct tools:

  • Shell lifecycle and execution: shell_exec, shell_read, shell_new, shell_remove, shell_list, and write_stdin.
  • Machine selection: machine_list and default_set.
  • File access: file_read, file_write, file_patch, and file_search.
  • Discovery and management: env, including Docker and configured SSH actions.

File reads support line numbers and pagination. Writes create parent directories and use temporary-file replacement. Patches support replacement or unified-diff modes, with fuzzy matching. Searches can inspect content with ripgrep or find files by glob, and results are ordered by modification time.

Docker actions include creating, listing, starting, stopping, restarting, inspecting, logging, building, committing, and removing containers, plus image history, filesystem differences, and resource statistics. SSH actions connect to or close configured targets. Windows SSH targets receive code-page probing and encoded command handling.

Limitations and notes

The default shell_exec wait period is 10 seconds; long-running work needs asynchronous execution and output polling. Ctrl-C through write_stdin is not supported for Windows or PowerShell pipe-mode shells, so those shells must be terminated instead. Sensitive paths such as .ssh, .aws, .env*, and /etc/shadow produce warnings but are not blocked.

JSON, YAML, and TOML writes receive syntax validation and fail if validation does not pass. Files larger than 50 KB are rejected by file_read with a hint to use narrower access. Docker access depends on the host daemon, while SSH access depends on configured targets and the required client software. Default shells are not automatically replaced after termination.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Sandbox Env MCP

Sandbox Env MCP is an MCP server that connects AI agents to persistent Docker containers and configured SSH hosts. Its main tools run and monitor shell commands, create or remove shells, read and edit files, search workspaces, list machines, and select default targets. It also exposes Docker and SSH management through the env tool.

Install it with `pip install sandbox-env-mcp`, then run `sandbox-mcp` for stdio access or `sandbox-mcp-http` for HTTP access. The documented requirements are Python 3.12 or newer, the Docker SDK, and a running Docker daemon; SSH mode additionally needs `openssh-client`.

Start the server with `sandbox-mcp` and configure the client to launch that command.

Configure the host under `[ssh.targets]`, then use the `connect` action through the `env` tool with the target name. SSH access requires `openssh-client`; the server supports configured Linux and Windows targets.

Create a shell with `shell_new`, keep its returned `shell_id`, and send commands with `shell_exec`. The session preserves state between calls; use `shell_read` for buffered output from asynchronous commands and `write_stdin` for input or interruption where supported.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSandbox Env MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sandbox-env-mcp?style=directory)](https://allmcps.com/mcp/sandbox-env-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/sandbox-env-mcp"><img src="https://allmcps.com/api/badge/sandbox-env-mcp?style=directory" alt="Sandbox Env MCP on AllMCPs" /></a>