Agent Workspace MCP logo

Agent Workspace MCP

Sandboxed Docker workspace for secure file operations, Bash commands, and uv-based Python project execution.

Install Agent Workspace MCP

Run the project’s own setup commands, in order.

Setup steps from the project

Agent Workspace MCP installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    docker pull ghcr.io/hrrodan/agent-workspace-mcp:latest
    
  2. 2. Install
    docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t agent-workspace-mcp .
    
  3. 3. Start the server
    docker run -i --rm --init \
      --network none \
      --memory=2g --cpus=2.0 --pids-limit=256 \
      --cap-drop=ALL --security-opt=no-new-privileges:true \
      --read-only \
      --tmpfs /tmp:size=64m \
      --tmpfs /home/mcpuser/.cache:size=512m \
      --user 1000:1000 \
      -v /path/to/your/projects:/workspace \
      ghcr.io/hrrodan/agent-workspace-mcp:latest
    

Overview

Agent Workspace MCP MCP server provides a containerized workspace for agent-driven coding, testing, and debugging. It exposes filesystem operations, Bash execution, and project workflows built around uv through MCP tools, with access restricted to the mounted `/workspace` directory. Docker configuration adds non-root execution, dropped capabilities, resource limits, and a read-only root filesystem. Reach for it when an agent needs to modify and run project files without direct access to the host system.

Use cases

  • Create and run Python projects in an isolated workspace
  • Inspect and edit files mounted from a host project directory
  • Run tests and shell commands with enforced timeouts
  • Search and modify structured source files with syntax validation

Key features

  • Sandboxed Docker workspace
  • Path-traversal-protected filesystem tools
  • Timed Bash execution with RTK output filtering
  • uv-based Python project workflow
  • Syntax-aware search and replace
  • Container resource and privilege controls

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

20/20 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit14d agoMost recent push to the default branch.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Agent Workspace MCP works

What Agent Workspace MCP does

Agent Workspace MCP MCP server gives MCP clients an isolated environment for working with files and running development commands. The workspace is provided by a Docker container, with a host directory mounted at /workspace. Agents can create or inspect project files, search the workspace, apply structured edits, and execute shell commands from that directory.

The included workflow supports Python projects managed with uv, including initialization, dependency installation, and execution through uv run. The server is intended for autonomous coding tasks such as writing a script, running tests, and investigating failures while keeping server code and the container system separate from the working files.

How it works

An MCP client communicates with the FastMCP process over stdio using JSON-RPC. Tool requests pass through path and security validation before accessing /workspace. Bash commands run as subprocesses through /bin/sh, with a default 60-second timeout and process-group handling.

The container can be started from the published GHCR image or built locally. Docker options in the documented examples include a non-root UID and GID, CPU and memory limits, a PID limit, dropped capabilities, no-new-privileges, a read-only root filesystem, and temporary filesystems for runtime directories. Network isolation is available as an optional Docker setting.

Output from commands such as directory listings, Git operations, and test runners can be filtered through RTK before being returned to the client. Logging is sent to the MCP client interface and to a rotating audit log.

Setup and configuration

Pull ghcr.io/hrrodan/agent-workspace-mcp:latest, or build the image with the host UID and GID. Run it with Docker in interactive mode, mount the project directory to /workspace, and use --init for signal forwarding and child-process cleanup. The README provides configuration examples for Claude Desktop and Cursor, as well as programmatic use with the OpenAI Agents SDK.

Configuration is supplied through Docker environment variables:

  • COMMAND_TIMEOUT sets the default Bash timeout and defaults to 60.
  • MAX_SEARCH_RESULTS limits search results and defaults to 50.
  • MAX_READ_SIZE_BYTES limits reads to 1048576 bytes by default.
  • MAX_WRITE_SIZE_BYTES limits writes to 5242880 bytes by default.
  • LOG_LEVEL controls Python logging and defaults to INFO.

On Linux, replace the example 1000:1000 user and group with the values returned by id -u and id -g.

Tools and capabilities

Agent Workspace MCP MCP server exposes these tools:

  • read_file reads text with optional offsets and line limits.
  • write_file creates files, validates supported structured formats, and refuses overwrites by default.
  • list_directory lists files and directories with type prefixes.
  • search_workspace searches by glob pattern and supports exclusions.
  • run_bash executes commands in /workspace, applies the timeout, and can use RTK output reduction.
  • search_and_replace performs multi-edit operations with whitespace-tolerant matching, indentation preservation, dry-run support, and syntax checks for Python, JSON, JSONL, TOML, and YAML.

Limitations and notes

The documented write-size guard is 5 MB, while the default read limit is 1 MB. Bash commands are time-limited by default, and search results are capped unless configuration changes those limits. File operations are restricted to the designated workspace by path validation. The container isolation model depends on the Docker options used at launch, so callers should preserve the documented security settings when running untrusted or autonomous workloads.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agent Workspace MCP

Agent Workspace MCP is an MCP server that connects MCP clients to a Docker-isolated project workspace. Its main tools read, write, list, and search files, apply validated replacements, and run Bash commands with timeouts. It also supports uv-based Python project workflows while restricting file access to `/workspace`.

Install it by pulling the published Docker image or building the repository locally, then configure an MCP client to launch the image with Docker. Mount a project directory at `/workspace`, pass the recommended security flags, and use the client configuration shown in the README.

Yes, Agent Workspace MCP works with Cursor through a Docker-based MCP configuration. Add the provided `mcpServers` entry to Cursor settings, set the workspace volume, and replace the example user and group values when required by the host.

Set the `COMMAND_TIMEOUT` environment variable when starting the Docker container. Its default is 60 seconds, and the value controls the default timeout applied to `run_bash` commands.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgent Workspace MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agent-workspace-mcp?style=directory)](https://allmcps.com/mcp/agent-workspace-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/agent-workspace-mcp"><img src="https://allmcps.com/api/badge/agent-workspace-mcp?style=directory" alt="Agent Workspace MCP on AllMCPs" /></a>