LLM Sandbox
MCP server by vndee Community
LLM Sandbox runs code generated by large language models in isolated containers or local Linux and Windows sandboxes. It is for developers who want an MCP server that lets clients such as Claude Desktop execute generated code in a sandbox.
Install LLM Sandbox
Built from the published package, never by AI.
claude mcp add llm-sandbox -- uvx llm-sandboxRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"llm-sandbox": {
"args": [
"llm-sandbox"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"llm-sandbox": {
"args": [
"llm-sandbox"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"llm-sandbox": {
"args": [
"llm-sandbox"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add llm-sandbox -- uvx llm-sandbox{
"mcpServers": {
"llm-sandbox": {
"args": [
"llm-sandbox"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add llm-sandbox uvx llm-sandboxGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the llm-sandbox block.
About
LLM Sandbox runs Large Language Model generated code through a common API. It supports container backends such as Docker, Podman and Kubernetes, local Linux backends Bubblewrap and NsJail, and experimental Windows adapters. Code can run in Python, JavaScript, Java, C++, Go and R, with resource limits, network controls and file copying. Each backend has its own security controls, and the same run and file APIs are reused across them.
The project also ships an MCP server so MCP clients such as Claude Desktop can run LLM-generated code in a sandbox. It includes interactive IPython sessions, artifact capture for plots, and examples for several agent frameworks. Published backend benchmarks compare Docker, Bubblewrap and NsJail on startup, execution, file transfers and concurrency. It suits developers who need to execute generated code with an isolation backend they choose.
Written from the project's README and checked against it.
What you need
- Python with pip
- Docker, Podman or a Kubernetes cluster for container backends
- Linux with bubblewrap and libseccomp for local Linux backends
- Windows host with the native helper for the MXC adapter
| Setting | Needed | What it is |
|---|---|---|
BACKENDEnvironment variable | Optional | Container backend to use. Must match the installed extra: mcp-docker, mcp-podman, or mcp-k8s. Default: docker |
DOCKER_Environment variable | Optional | Docker or Podman socket URL, e.g. unix:///var/run/docker.sock |
KUBECONFIGEnvironment variable | Optional | Path to kubeconfig file when BACKEND=kubernetes. |
NAMESPACEEnvironment variable | Optional | Kubernetes namespace used for sandbox pods when BACKEND=kubernetes. Default: default |
COMMIT_Environment variable | Optional | Commit the container after a run so installed libraries persist between sessions. Default: true |
KEEP_Environment variable | Optional | Keep the base image after the session ends to avoid re-pulling it on the next run. Default: true |
SANDBOX_Environment variable | Optional | Network mode for the sandbox container. Set to 'none' for hardened isolation. Docker and Podman backends only. |
SANDBOX_Environment variable | Optional | Mount the sandbox root filesystem read-only. Recommended: true. Docker and Podman backends only. |
SANDBOX_Environment variable | Optional | Comma-separated Linux capabilities to drop. Recommended: ALL. Docker and Podman backends only. |
SANDBOX_Environment variable | Optional | Comma-separated container security options, e.g. no-new-privileges. Docker and Podman backends only. |
SANDBOX_Environment variable | Optional | Memory limit for the sandbox container, e.g. 4g. Docker and Podman backends only. |
SANDBOX_Environment variable | Optional | Fractional CPU allocation for the sandbox container, e.g. 1.5. Docker and Podman backends only. |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Run this Python script in a sandbox and show me the output
- Execute this generated code in an isolated container and report errors
- Run this R analysis in a sandbox and save the plots
Good to know
- Local Linux backends do not support container images, pooling or interactive sessions.
- Local Linux backends share the host kernel and are not a VM boundary.
- Windows adapters are experimental, and MXC initially supports Python and JavaScript only.
- Linux backends need unprivileged user namespaces enabled on the host.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Run LLM-generated code safely
- Execute generated code in isolated containers
- Capture plots from generated analysis code
Alternatives to LLM Sandbox
All alternatives →Oh My Posh Validator is listed as an MCP server, but the source is the README for oh-my-posh, a cross platform prompt theme engine. It does not describe an MCP server, tools, or schema validation.
Sim is a workspace for building, deploying and managing AI agents and workflows. Its MCP server lets Claude, Claude Code, Codex or another MCP client manage workspaces, workflows, tables, knowledge bases, files and logs.
Omnara deploys durable AI agents on any model and any machine. It is an open-source, self-hostable managed agent platform under Apache 2.0, with a REST API, TypeScript SDK, CLI, and MCP server.
Strata is an MCP server from Klavis AI for progressive tool usage, described as a way to optimize the AI agent's context window. The repository is deprecated, but it remains public for reference and for local or hosted use.
VoiceMode is an MCP server that adds voice conversations to Claude Code and other MCP capable agents. It uses speech-to-text and text-to-speech. It suits people whose hands or eyes are busy.
Gives an AI agent access to the skills, plugins, MCP connections, and Google Workspace and Microsoft 365 capabilities assigned to you by your OpenWork organization, through one OAuth MCP URL. Intended for people and teams who want to reuse the same setup across agents, tools, and machines.
Compare with Oh My Posh Validator, Sim or Omnara
LLM Sandbox: common questions
What is LLM Sandbox used for?
It runs code generated by LLMs in an isolated sandbox through one API. The project describes it as a way to execute generated code securely.
Does it work with Claude Desktop?
The project provides an MCP server that lets MCP clients such as Claude Desktop run LLM-generated code in a sandbox environment.
Can it run without Docker?
Yes. The source describes Bubblewrap and NsJail local Linux backends that run without Docker or a daemon, plus Windows adapters that need no container SDK.
How do I install LLM Sandbox?
In Claude Code run claude mcp add llm-sandbox -- uvx llm-sandbox. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is LLM Sandbox the official server?
LLM Sandbox is a community project by vndee, not verified by a company domain.
Is LLM Sandbox free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is LLM Sandbox safe to use?
It scores 88 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to LLM Sandbox?
Similar MCP servers: Oh My Posh Validator, Sim, Omnara, strata.
Does LLM Sandbox work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
