What is the LLM Sandbox MCP server?
Securely run LLM-generated code in isolated containers across 7 languages and 3 container backends.
How to install LLM Sandbox
Copy-paste configuration for popular MCP clients.
BACKENDContainer backend to use. Must match the installed extra: mcp-docker, mcp-podman, or mcp-k8s.
DOCKER_HOSTDocker or Podman socket URL, e.g. unix:///var/run/docker.sock
KUBECONFIGPath to kubeconfig file when BACKEND=kubernetes.
NAMESPACEKubernetes namespace used for sandbox pods when BACKEND=kubernetes.
COMMIT_CONTAINERCommit the container after a run so installed libraries persist between sessions.
KEEP_TEMPLATEKeep the base image after the session ends to avoid re-pulling it on the next run.
SANDBOX_NETWORK_MODENetwork mode for the sandbox container. Set to 'none' for hardened isolation. Docker and Podman backends only.
SANDBOX_READ_ONLYMount the sandbox root filesystem read-only. Recommended: true. Docker and Podman backends only.
SANDBOX_CAP_DROPComma-separated Linux capabilities to drop. Recommended: ALL. Docker and Podman backends only.
SANDBOX_SECURITY_OPTComma-separated container security options, e.g. no-new-privileges. Docker and Podman backends only.
SANDBOX_MEMORYMemory limit for the sandbox container, e.g. 4g. Docker and Podman backends only.
SANDBOX_CPUSFractional CPU allocation for the sandbox container, e.g. 1.5. Docker and Podman backends only.
{
"mcpServers": {
"llm-sandbox": {
"command": "uvx",
"args": [
"llm-sandbox",
"--from",
"llm-sandbox[mcp-docker]"
],
"env": {
"BACKEND": "<YOUR_BACKEND>",
"DOCKER_HOST": "<YOUR_DOCKER_HOST>",
"KUBECONFIG": "<YOUR_KUBECONFIG>",
"NAMESPACE": "<YOUR_NAMESPACE>",
"COMMIT_CONTAINER": "<YOUR_COMMIT_CONTAINER>",
"KEEP_TEMPLATE": "<YOUR_KEEP_TEMPLATE>",
"SANDBOX_NETWORK_MODE": "<YOUR_SANDBOX_NETWORK_MODE>",
"SANDBOX_READ_ONLY": "<YOUR_SANDBOX_READ_ONLY>",
"SANDBOX_CAP_DROP": "<YOUR_SANDBOX_CAP_DROP>",
"SANDBOX_SECURITY_OPT": "<YOUR_SANDBOX_SECURITY_OPT>",
"SANDBOX_MEMORY": "<YOUR_SANDBOX_MEMORY>",
"SANDBOX_CPUS": "<YOUR_SANDBOX_CPUS>"
}
}
}
}{
"mcpServers": {
"llm-sandbox": {
"command": "uvx",
"args": [
"llm-sandbox",
"--from",
"llm-sandbox[mcp-docker]"
],
"env": {
"BACKEND": "<YOUR_BACKEND>",
"DOCKER_HOST": "<YOUR_DOCKER_HOST>",
"KUBECONFIG": "<YOUR_KUBECONFIG>",
"NAMESPACE": "<YOUR_NAMESPACE>",
"COMMIT_CONTAINER": "<YOUR_COMMIT_CONTAINER>",
"KEEP_TEMPLATE": "<YOUR_KEEP_TEMPLATE>",
"SANDBOX_NETWORK_MODE": "<YOUR_SANDBOX_NETWORK_MODE>",
"SANDBOX_READ_ONLY": "<YOUR_SANDBOX_READ_ONLY>",
"SANDBOX_CAP_DROP": "<YOUR_SANDBOX_CAP_DROP>",
"SANDBOX_SECURITY_OPT": "<YOUR_SANDBOX_SECURITY_OPT>",
"SANDBOX_MEMORY": "<YOUR_SANDBOX_MEMORY>",
"SANDBOX_CPUS": "<YOUR_SANDBOX_CPUS>"
}
}
}
}{
"mcpServers": {
"llm-sandbox": {
"command": "uvx",
"args": [
"llm-sandbox",
"--from",
"llm-sandbox[mcp-docker]"
],
"env": {
"BACKEND": "<YOUR_BACKEND>",
"DOCKER_HOST": "<YOUR_DOCKER_HOST>",
"KUBECONFIG": "<YOUR_KUBECONFIG>",
"NAMESPACE": "<YOUR_NAMESPACE>",
"COMMIT_CONTAINER": "<YOUR_COMMIT_CONTAINER>",
"KEEP_TEMPLATE": "<YOUR_KEEP_TEMPLATE>",
"SANDBOX_NETWORK_MODE": "<YOUR_SANDBOX_NETWORK_MODE>",
"SANDBOX_READ_ONLY": "<YOUR_SANDBOX_READ_ONLY>",
"SANDBOX_CAP_DROP": "<YOUR_SANDBOX_CAP_DROP>",
"SANDBOX_SECURITY_OPT": "<YOUR_SANDBOX_SECURITY_OPT>",
"SANDBOX_MEMORY": "<YOUR_SANDBOX_MEMORY>",
"SANDBOX_CPUS": "<YOUR_SANDBOX_CPUS>"
}
}
}
}{
"servers": {
"llm-sandbox": {
"type": "stdio",
"command": "uvx",
"args": [
"llm-sandbox",
"--from",
"llm-sandbox[mcp-docker]"
],
"env": {
"BACKEND": "<YOUR_BACKEND>",
"DOCKER_HOST": "<YOUR_DOCKER_HOST>",
"KUBECONFIG": "<YOUR_KUBECONFIG>",
"NAMESPACE": "<YOUR_NAMESPACE>",
"COMMIT_CONTAINER": "<YOUR_COMMIT_CONTAINER>",
"KEEP_TEMPLATE": "<YOUR_KEEP_TEMPLATE>",
"SANDBOX_NETWORK_MODE": "<YOUR_SANDBOX_NETWORK_MODE>",
"SANDBOX_READ_ONLY": "<YOUR_SANDBOX_READ_ONLY>",
"SANDBOX_CAP_DROP": "<YOUR_SANDBOX_CAP_DROP>",
"SANDBOX_SECURITY_OPT": "<YOUR_SANDBOX_SECURITY_OPT>",
"SANDBOX_MEMORY": "<YOUR_SANDBOX_MEMORY>",
"SANDBOX_CPUS": "<YOUR_SANDBOX_CPUS>"
}
}
}
}claude mcp add llm-sandbox --env BACKEND=<YOUR_BACKEND> --env DOCKER_HOST=<YOUR_DOCKER_HOST> --env KUBECONFIG=<YOUR_KUBECONFIG> --env NAMESPACE=<YOUR_NAMESPACE> --env COMMIT_CONTAINER=<YOUR_COMMIT_CONTAINER> --env KEEP_TEMPLATE=<YOUR_KEEP_TEMPLATE> --env SANDBOX_NETWORK_MODE=<YOUR_SANDBOX_NETWORK_MODE> --env SANDBOX_READ_ONLY=<YOUR_SANDBOX_READ_ONLY> --env SANDBOX_CAP_DROP=<YOUR_SANDBOX_CAP_DROP> --env SANDBOX_SECURITY_OPT=<YOUR_SANDBOX_SECURITY_OPT> --env SANDBOX_MEMORY=<YOUR_SANDBOX_MEMORY> --env SANDBOX_CPUS=<YOUR_SANDBOX_CPUS> -- uvx llm-sandbox --from llm-sandbox[mcp-docker]Related MCP servers
Control a real Chrome browser to complete any task: fill forms, extract data, book flights.
World Monitor
Live global intelligence: real-time markets, conflicts, country risk, chokepoints, energy. 39 tools.
Netdata
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Trending hip-hop artist momentum scores across four cultural dimensions.
AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.
Scrapling MCP Server
Give your AI agent stealth web scraping with Cloudflare bypass and CSS selection, powered by Scrapling.