# Agent Workspace MCP [Health: Active]

**Category:** 📂 File Systems  
**Repository:** https://github.com/HrRodan/agent-workspace-mcp  
**GitHub Stars:** 1  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-workspace-mcp

## Description
A sandboxed, agentic workspace providing secure filesystem, bash, and uv-powered Python execution.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/HrRodan/agent-workspace-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
docker pull ghcr.io/hrrodan/agent-workspace-mcp:latest
```

2. Install:

```sh
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t agent-workspace-mcp .
```

3. Start the server:

```sh
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
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/agent-workspace-mcp/readme_

