← Back to Plugins
MCP Server MCP

LLM Sandbox

github By github 👁 1 views ▲ 0 votes

Securely run LLM-generated code in isolated containers across 7 languages and 3 container backends.

Homepage Verified source GitHub

Install

uvx llm-sandbox

Configuration Example

{
  "remotes": [],
  "packages": [
    {
      "registryType": "pypi",
      "registryBaseUrl": "https://pypi.org",
      "identifier": "llm-sandbox",
      "version": "0.3.43",
      "runtimeHint": "uvx",
      "transport": {
        "type": "stdio"
      },
      "runtimeArguments": [
        {
          "description": "Install the MCP server extra. The base llm-sandbox package intentionally ships no container or MCP dependencies, so the extra is required for the server to start.",
          "isRequired": true,
          "value": "llm-sandbox[mcp-docker]",
          "type": "named",
          "name": "--from"
        }
      ],
      "environmentVariables": [
        {
          "description": "Container backend to use. Must match the installed extra: mcp-docker, mcp-podman, or mcp-k8s.",
          "default": "docker",
          "choices": [
            "docker",
            "podman",
            "kubernetes"
          ],
          "name": "BACKEND"
        },
        {
          "description": "Docker or Podman socket URL, e.g. unix:///var/run/docker.sock",
          "name": "DOCKER_HOST"
        },
        {
          "description": "Path to kubeconfig file when BACKEND=kubernetes.",
          "name": "KUBECONFIG"
        },
        {
          "description": "Kubernetes namespace used for sandbox pods when BACKEND=kubernetes.",
          "default": "default",
          "name": "NAMESPACE"
        },
        {
          "description": "Commit the container after a run so installed libraries persist between sessions.",
          "default": "true",
          "name": "COMMIT_CONTAINER"
        },
        {
          "description": "Keep the base image after the session ends to avoid re-pulling it on the next run.",
          "default": "true",
          "name": "KEEP_TEMPLATE"
        },
        {
          "description": "Network mode for the sandbox container. Set to 'none' for hardened isolation. Docker and Podman backends only.",
          "name": "SANDBOX_NETWORK_MODE"
        },
        {
          "description": "Mount the sandbox root filesystem read-only. Recommended: true. Docker and Podman backends only.",
          "name": "SANDBOX_READ_ONLY"
        },
        {
          "description": "Comma-separated Linux capabilities to drop. Recommended: ALL. Docker and Podman backends only.",
          "name": "SANDBOX_CAP_DROP"
        },
        {
          "description": "Comma-separated container security options, e.g. no-new-privileges. Docker and Podman backends only.",
          "name": "SANDBOX_SECURITY_OPT"
        },
        {
          "description": "Memory limit for the sandbox container, e.g. 4g. Docker and Podman backends only.",
          "name": "SANDBOX_MEMORY"
        },
        {
          "description": "Fractional CPU allocation for the sandbox container, e.g. 1.5. Docker and Podman backends only.",
          "name": "SANDBOX_CPUS"
        }
      ]
    }
  ]
}
mcp model-context-protocol pypi

Comments

Sign in to leave a comment

Loading comments...