SandBase Harness — Claude Code MCP server: how to install
A stdio bridge connecting AI coding assistants to the SandBase Harness runtime for session control, turn handling, and sandboxed tool execution.
claude mcp add --env MANAGED_AGENTS_URL=<MANAGED_AGENTS_URL> --env MANAGED_AGENTS_API_KEY=<MANAGED_AGENTS_API_KEY> --transport stdio sandbase-harness -- docker run -i --rm -e MANAGED_AGENTS_URL -e MANAGED_AGENTS_API_KEY ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8What SandBase Harness does
This MCP bridge maps client requests to the SandBase Harness platform via standard input/output. It exposes controls for agent sessions, execution turns, artifact retrieval, and task cancellation. The runtime stores its metadata in a local SQLite database.
Code can execute in several environments: host processes, dedicated Docker containers per session, Kubernetes pods, or custom worker queues. Supported model backends include Anthropic, OpenAI, MiniMax, and OpenAI-compatible endpoints like DeepSeek.
Because the bridge image ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8 runs via Docker, Docker must be active on your machine. The bridge fails immediately if MANAGED_AGENTS_URL and MANAGED_AGENTS_API_KEY do not point to a reachable Harness instance.
What it helps with
- isolate generated code execution inside Docker or Kubernetes containers
- handle persistent agent sessions and review turn history
- stop runaway processes and inspect generated artifacts
- manage tool permissions and API credentials locally
Example prompts for the agent
- Create a new agent session in SandBase Harness and execute the prompt
- Check the status of the current turn and retrieve generated artifacts
- Cancel the active task running in SandBase Harness
How to install SandBase Harness
Platform CLI
claude mcp add --env MANAGED_AGENTS_URL=<MANAGED_AGENTS_URL> --env MANAGED_AGENTS_API_KEY=<MANAGED_AGENTS_API_KEY> --transport stdio sandbase-harness -- docker run -i --rm -e MANAGED_AGENTS_URL -e MANAGED_AGENTS_API_KEY ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8Replace <…> with your own values
Platform CLI
codex mcp add sandbase-harness --env MANAGED_AGENTS_URL=<MANAGED_AGENTS_URL> --env MANAGED_AGENTS_API_KEY=<MANAGED_AGENTS_API_KEY> -- docker run -i --rm -e MANAGED_AGENTS_URL -e MANAGED_AGENTS_API_KEY ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8Replace <…> with your own values
Config file
{
"mcpServers": {
"sandbase-harness": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MANAGED_AGENTS_URL",
"-e",
"MANAGED_AGENTS_API_KEY",
"ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8"
],
"env": {
"MANAGED_AGENTS_URL": "<MANAGED_AGENTS_URL>",
"MANAGED_AGENTS_API_KEY": "<MANAGED_AGENTS_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"sandbase-harness": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MANAGED_AGENTS_URL",
"-e",
"MANAGED_AGENTS_API_KEY",
"ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8"
],
"env": {
"MANAGED_AGENTS_URL": "<MANAGED_AGENTS_URL>",
"MANAGED_AGENTS_API_KEY": "<MANAGED_AGENTS_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e MANAGED_AGENTS_URL=<MANAGED_AGENTS_URL> -e MANAGED_AGENTS_API_KEY=<MANAGED_AGENTS_API_KEY> sandbase-harness docker run -i --rm -e MANAGED_AGENTS_URL -e MANAGED_AGENTS_API_KEY ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8Replace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about SandBase Harness
How to install SandBase Harness in Claude Code?
Run `claude mcp add --env MANAGED_AGENTS_URL=<MANAGED_AGENTS_URL> --env MANAGED_AGENTS_API_KEY=<MANAGED_AGENTS_API_KEY> --transport stdio sandbase-harness -- docker run -i --rm -e MANAGED_AGENTS_URL -e MANAGED_AGENTS_API_KEY ghcr.io/sandbaseai/sandbase-harness-mcp:0.3.8` in your terminal. Replace placeholders with your runtime endpoint and API key.
What does SandBase Harness do?
It bridges an AI assistant to the SandBase runtime. You can manage agent lifecycles, run code in isolated sandboxes, and inspect artifacts.
What is required before running this MCP server?
You need an active Docker daemon to run the container image, plus a running SandBase Harness instance reachable via MANAGED_AGENTS_URL.