Sandfort

v0.1.0
io.github.malinele/sandfort Checked 1 hour ago Published 8 days ago

Self-hosted sandboxes for AI-generated code: run commands, files, snapshots.

Values you need

VariableWhat it is
SANDFORT_BASE_URLrequired Base URL of the Sandfort server, for example http://127.0.0.1:8000
SANDFORT_API_KEYrequired secret Sandfort API key (starts with sf_)

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add sandfort -e 'SANDFORT_API_KEY=<SANDFORT_API_KEY>' -e 'SANDFORT_BASE_URL=<SANDFORT_BASE_URL>' -- uvx sandfort-mcp==0.1.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "sandfort": {
      "args": [
        "sandfort-mcp==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "SANDFORT_API_KEY": "<SANDFORT_API_KEY>",
        "SANDFORT_BASE_URL": "<SANDFORT_BASE_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "sandfort": {
      "args": [
        "sandfort-mcp==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "SANDFORT_API_KEY": "<SANDFORT_API_KEY>",
        "SANDFORT_BASE_URL": "<SANDFORT_BASE_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "SANDFORT_API_KEY",
      "id": "sandfort-api-key",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SANDFORT_BASE_URL",
      "id": "sandfort-base-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "sandfort": {
      "args": [
        "sandfort-mcp==0.1.0"
      ],
      "command": "uvx",
      "env": {
        "SANDFORT_API_KEY": "${input:sandfort-api-key}",
        "SANDFORT_BASE_URL": "${input:sandfort-base-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.sandfort]
command = "uvx"
args = ["sandfort-mcp==0.1.0"]
env = { "SANDFORT_API_KEY" = "<SANDFORT_API_KEY>", "SANDFORT_BASE_URL" = "<SANDFORT_BASE_URL>" }

For AI agents

  1. Ask the user for: SANDFORT_BASE_URL, SANDFORT_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: create_sandbox, run_code, run_command, upload_text_file, download_text_file, list_directory, stat_path, make_directory, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json