Agent Workspace MCP
io.github.HrRodan由 GitHub 账号 HrRodan 发布v1.4.135更新于 Nov 8, 2026
一个沙箱化的智能体工作区,提供安全的文件系统、bash 以及由 uv 驱动的 Python 执行环境。
AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。
原文描述
A sandboxed, agentic workspace providing secure filesystem, bash, and uv-powered Python execution.
概览
Agent Workspace 的本地 MCP 服务;无需登录;STDIO。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
安装
在 SourceWeft 中
- 打开 控制台中的 Agent Workspace MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🛡️ Agent Workspace MCP Server
[CI] [License: MIT] [Python 3.14+]
A unified Model Context Protocol (MCP) server providing a highly secure, containerized workspace for Large Language Models (LLMs). It acts as an isolated "agentic playground" where agents can autonomously code, test, and debug without risking the host machine.
✨ Features
- 🏗️ Full Project Lifecycle: Bootstrap projects with
uv init, manage dependencies withuv add, and execute viauv run. - 🐚 Secure Bash Access: Execute shell commands with mandatory timeouts and merged output streams.
- 🚀 Token-Optimized Output: Integrates RTK (Rust Token Killer) to automatically filter and compress
run_bashoutputs (likels,git, and test runners), saving 60-90% of LLM context tokens. - 📂 Robust Filesystem: Path-traversal protected operations for reading, writing, and searching the workspace.
- 🛡️ Multi-Layer Security: Non-root execution, dropped capabilities, resource limits, and a read-only root filesystem.
- ⚡ Precision Editing: Advanced
search_and_replacewith fuzzy whitespace matching, indentation preservation, dry-run support, and syntax validation for Python, JSON, JSONL, TOML, and YAML. - 📊 Real-time Observability: Direct logging to MCP client UI and persistent rotating audit logs.
🏗️ Architecture
📦 Quick Start
1. Pull or Build the Docker Image
2. Programmatic Usage (OpenAI Agents SDK)
Here is a quick boilerplate showing how to use the containerized workspace programmatically using the standard openai-agents SDK:
3. Use with MCP Clients (Claude / Cursor)
Add the following configuration to your claude_desktop_config.json or Cursor settings.
[!IMPORTANT] Linux Users: Replace
1000:1000with your actual UID:GID (runid -uandid -g). Claude Desktop does not expand environment variables. Signal Handling: The--initflag is essential for proper signal forwarding and zombie process reaping.
🛠️ Tool Reference
⚙️ Configuration
The server supports the following environment variables (passed via Docker --env):
🛡️ Security & Architecture Model
This server employs a defense-in-depth strategy, explicitly separating strict security boundaries from developer experience and operational reliability features.
🔒 Core Security Features
These features are designed to protect the host system and enforce strict isolation boundaries.
- Kernel Hardening: All Linux capabilities are dropped (
--cap-drop=ALL), neutralizing privilege escalation vectors. - Immutable Server Code: The
/appdirectory containing the server source and its virtual environment is owned byrootand read-only for themcpuser. This prevents the server from modifying itself or being tampered with viarun_bash. - Privilege Lockdown: Enforces
no-new-privileges:trueto prevent any process from gaining elevated rights. - Immutable System Core: The container's root filesystem is mounted entirely read-only, providing a second layer of defense against OS-level tampering.
- Resource Quotas: Hard limitations on CPU, Memory, and PIDs mitigate denial-of-service (DoS) attempts like fork-bombs and host exhaustion.
- Strict Boundary Enforcement: A robust path validator comprehensively blocks all path traversal attacks outside the designated
/workspace. - Process & Resource Control: Mandatory command timeouts (default 60s) and strict process group isolation ensure runaway or malicious processes are killed.
- Memory-Overload Protection: Hard limits on file reads (1MB) and command outputs (50KB) prevent memory exhaustion.
- Information Leakage Prevention: Internal stack traces and system paths are suppressed and sanitized from tool outputs.
🛠️ Developer Experience & Convenience
Features focused on seamless integration, usability, and reducing friction during agentic workflows.
- Host-Aligned Non-Root Identity: Runs as
mcpuserwith UID/GID customizable at build time, eliminating tedious file permission conflicts on host volume mounts. - Automatic Token Optimization: Shell commands executed via
run_bashare transparently rewritten through RTK to provide ultra-compact, LLM-friendly output without altering underlying command behavior. - Intelligent Search Exclusions: High-noise or sensitive directories (
.git,.venv) are automatically ignored to keep context windows lean and relevant. - Ephemeral Workspaces: Containers are strictly ephemeral (
--rm), guaranteeing a clean, predictable slate for every new session without state leaking across connections. - Standardized Discovery: Complies with the OCI Image Specification for standardized container ecosystem integration and transparent auditing.
⚙️ Reliability & Safety Mechanisms
Features ensuring the structural integrity of the workspace and providing observability.
- Pre-Write Syntax Validation: Both
write_fileandsearch_and_replaceperform in-memory syntax validation for Python, JSON, JSONL, TOML, and YAML before persisting changes, preventing broken code states. - Fail-Safe Writing:
write_fileblocks accidental overwrites of existing files by default and enforces a 5MB size guard to prevent workspace flooding. - Atomic File Operations: Edits utilize temp-and-move logic to guarantee file integrity and prevent corruption, even during unexpected interruptions or crashes.
- Transparent Observability: All tool invocations and state changes are streamed in real-time to the MCP client UI for immediate operator oversight.
🌐 Network Isolation (Optional)
By default, the container has full network access via Docker's bridge network. For maximum isolation, you can completely disable the network stack using --network none:
This creates a fully air-gapped sandbox — only the loopback interface exists inside the container. All outbound connections (curl, DNS, uv add, etc.) will fail immediately, eliminating data exfiltration and lateral movement risks entirely.
[!NOTE] With
--network none, the agent cannot install packages at runtime. All dependencies must be pre-installed in a custom image or pre-populated in the mounted workspace volume.
🤝 Contributing
- Install Dev Dependencies:
uv sync - Run Linting:
uv run ruff check . - Run Unit Tests:
uv run pytest tests/ --ignore=tests/integration/ - Run Integration Tests: Set
OPENROUTER_API_KEYand runuv run pytest tests/integration/
© 2026 HrRodan. Licensed under MIT.
来源:README.md,提交 2541460
工具
0版本历史
28- v1.4.134Nov 3, 2026
- v1.4.132Nov 1, 2026
- v1.4.130Nov 1, 2026
- v1.4.129Oct 26, 2026
- v1.4.128Oct 25, 2026
- v1.4.127Oct 25, 2026
- v1.4.126Oct 24, 2026
- v1.4.125Oct 19, 2026
- v1.4.124Oct 18, 2026
- v1.4.123Oct 18, 2026
- v1.4.122Oct 18, 2026
- v1.4.121Oct 18, 2026
- v1.4.120Oct 12, 2026
- v1.4.119Oct 11, 2026
- v1.4.118Oct 11, 2026
- v1.4.116Oct 5, 2026
- v1.4.115Oct 4, 2026
- v1.4.114Oct 4, 2026
- v1.4.112Sep 30, 2026
- v1.4.110Sep 29, 2026
- v1.4.109Sep 28, 2026
- v1.4.108Sep 27, 2026
- v1.4.107Sep 27, 2026
- v1.4.106Sep 27, 2026
- v1.4.105Sep 21, 2026
- v1.4.104Sep 20, 2026
- v1.4.102Sep 20, 2026
- v1.4.101Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。