agent-sandbox
Clones any public GitHub repository at depth 1 into a disposable workspace, and lets an agent commit changes on a branch, push that branch to a repo the configured token can write to, and open a pull request from the workspace branch.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
agent-sandbox
An MCP server that gives an AI agent a disposable place to build things: clone any public repo, edit it, run commands and tests, commit, and push or open a pull request. Workspaces are throwaway, so an agent can break something without breaking anything that matters.
What an agent can do with it
sandbox_create create a workspace, optionally cloning any public GitHub repo at depth 1
sandbox_list list the live workspaces
sandbox_destroy delete a workspace
sandbox_exec run one command, passed as an argv array, never a shell string
sandbox_read_file read a text file
sandbox_write_file write a text file, creating directories
sandbox_list_files list a directory tree
sandbox_diff git status and git diff for the workspace
sandbox_commit stage everything and commit on a branch
sandbox_push push a branch to a repo the token can write to
sandbox_open_pr open a pull request from a workspace branchRelated MCP server: GitHub Agent MCP Server
Run it
npm install
npm run build
SANDBOX_MODE=local npm start # trusted machine only
SANDBOX_MODE=docker npm start # the default and the safe oneThen point an MCP client at it. Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"agent-sandbox": {
"command": "node",
"args": ["/absolute/path/to/agent-sandbox/dist/server.js"],
"env": { "SANDBOX_MODE": "docker", "SANDBOX_IMAGE": "agent-sandbox:latest" }
}
}
}Cursor and Windsurf take the same command and args in their MCP settings.
Safety posture
The point of a sandbox is that the agent cannot reach the things you care about. In order of importance:
dockermode is the default. Every command runs in a container with--memory 1g,--pids-limit 256,--cpus 1,--cap-drop ALL,--security-opt no-new-privileges, and--network none, so a cloned repo cannot call out anywhere. Only the workspace directory is mounted, at/workspace.No shell, ever. The caller passes an argv array and the first element is the program, so a destructive command typed inside an argument is just a string, not a command.
Every path is resolved and proved to sit inside its workspace before a file is touched. Absolute paths, drive letters, null bytes and parent-directory escapes are refused.
Every command has a wall-clock timeout and its output is truncated at 20,000 characters, keeping both ends and saying how much it dropped.
Repository names must be
owner/name. A URL is refused, so a token cannot be smuggled in through one. Pushing passes the token through the environment, not into a remote URL stored on disk.
SANDBOX_MODE=local runs commands on the host itself. It is for a machine that is itself disposable.
Configuration
variable | default | meaning |
|
|
|
|
| where workspaces live |
|
| image commands run in |
|
| set to |
|
| per-command limit |
| unset | needed only for |
Verified
npx tsc --noEmitexits 0.npm test9 passing: path escapes, null bytes, argv validation, container caps, output truncation.npm run smokedrives the real server over stdio: clonesoctocat/Hello-World, lists it, writes and reads a file, runsgit status, and is refused when it asks for a path outside the workspace.
Not verified in the build environment: docker mode, because no docker daemon was available there. The container arguments are asserted in a test, but a real container run is the first thing to check on a machine with docker.
Deliberately not built
A hosted HTTP endpoint. This speaks stdio, which is how local MCP clients connect. A remote endpoint needs its own authentication story, and shipping one without that would be a public shell.
Persistence across restarts. Workspaces are disposable by design; a restart forgets the registry, so the directories are the only record. Prune
SANDBOX_ROOTif you uselocalmode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Git-backed platform for skills, tools, and context for AI agents
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage GitHub repositories, branches, issues, pull requests, releases, and actions through natural language.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitHub via natural language, supporting repository management, issue tracking, file commits, and more.ISC
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to automate GitHub repository management, issue tracking, and commits using natural language.-
- FlicenseNot gradedqualityCmaintenanceEnables autonomous coding agents to inspect Git commits, create pull requests, parse issue threads, and post reviews on GitHub repositories.-