# Agent Workspace MCP

> Agent Workspace MCP is an open-source MCP server for developer tools. Run an agent's code and shell commands in a locked-down Docker workspace. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/hrrodan/agent-workspace-mcp
- **MCP Registry name:** io.github.HrRodan/agent-workspace-mcp
- **Categories:** developer tools, security
- **Listing updated:** 2026-11-15

## About

The server runs as a Docker container that mounts one folder as /workspace, so an agent can write and test code without touching the rest of your machine. The README lists the hardening: non-root user, all Linux capabilities dropped, no new privileges, a read-only root filesystem, memory, CPU and process limits, and optional network isolation with --network none.

Python work goes through uv, covering project setup, dependencies and running scripts. run_bash executes shell commands with a 60 second timeout, and output is compressed through RTK, which the README says saves 60 to 90 percent of context tokens for common commands. Files are protected against path traversal, writes are capped at 5 MB, and write_file will not overwrite an existing file unless asked.

search_and_replace tolerates whitespace differences, preserves indentation, supports dry runs and validates Python, JSON, JSONL, TOML and YAML. Logs go to the client and to rotating audit logs. It is MIT licensed and has an OpenAI Agents SDK example.

## Features

- **Container sandbox:** Read-only root, dropped capabilities and resource limits.
- **uv Python workflow:** Initialise, add dependencies and run scripts.
- **Bash with timeouts:** 60 second default limit and merged output.
- **Token-saving output:** RTK compresses common command output.
- **Precise editing:** Fuzzy whitespace matching with syntax validation.
- **Audit logs:** Rotating logs of server activity.

## Good for

- Let an agent write and test code without host access
- Run Python scripts with managed dependencies
- Edit config files with syntax validation
- Cap an agent's CPU, memory and network
- Embed a sandbox in an OpenAI Agents SDK app

## Install

### Claude Code (Terminal)

```sh
claude mcp add agent-workspace-mcp -- docker run -i --rm ghcr.io/hrrodan/agent-workspace-mcp:1.4.144
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "agent-workspace-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hrrodan/agent-workspace-mcp:1.4.144"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "agent-workspace-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hrrodan/agent-workspace-mcp:1.4.144"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "agent-workspace-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hrrodan/agent-workspace-mcp:1.4.144"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "agent-workspace-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hrrodan/agent-workspace-mcp:1.4.144"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "agent-workspace-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hrrodan/agent-workspace-mcp:1.4.144"
      ]
    }
  }
}
```

## Tools

- `read_file`: Reads text files with offset and limit
- `write_file`: Creates files with syntax validation and a 5MB guard
- `list_directory`: Lists directory contents
- `search_workspace`: Finds files by glob pattern
- `run_bash`: Runs shell commands in /workspace with a timeout
- `search_and_replace`: Multi-edit with fuzzy whitespace matching and validation

## FAQ

### What is mounted into the container?

The folder you pass with -v, available as /workspace.

### Can I block network access?

Yes, add --network none to the Docker arguments.

### How long can a command run?

60 seconds by default, set with COMMAND_TIMEOUT.

### What licence is it?

MIT.

### Is Agent Workspace MCP free?

Yes. Agent Workspace MCP is open source, so you can use and self-host it for free.

### How do I add Agent Workspace MCP to Claude Code?

Run this command in your terminal: claude mcp add agent-workspace-mcp -- docker run -i --rm ghcr.io/hrrodan/agent-workspace-mcp:1.4.144

### What are the best alternatives to Agent Workspace MCP?

The closest alternatives to Agent Workspace MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/agent-workspace-mcp
