You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arch: add process/container isolation for MCP tool bridges #3229
AutoBot's MCP bridges run as in-process FastAPI endpoints, aggregated by api/mcp_registry.py. All bridges share the same backend process. If a bridge executes heavy or misbehaving tool logic (filesystem operations, browser automation, external process calls), it can affect the latency and stability of the entire backend.
Specific risks:
A blocking call in one bridge stalls other requests on the same event loop
An exception in a bridge that isn't caught cleanly can corrupt shared state
No resource limits per tool category — one runaway tool can exhaust memory/CPU for all
Desired State
MCP bridges that execute external tools, run subprocesses, or perform I/O-heavy work should run in isolated processes (subprocess or container), communicating with the main backend over a defined transport (stdin/stdout MCP protocol, or lightweight HTTP).
Bridges with no side effects (pure computation, in-memory lookups) can remain in-process.
Isolation Candidates
Bridge
Risk
Suggested Isolation
api/filesystem_mcp.py
File I/O, path traversal risk
Subprocess with chroot
api/browser_mcp.py
External process, network
Subprocess or container
api/vnc_mcp.py
Network I/O
Subprocess
api/knowledge_mcp.py
In-memory, ChromaDB
In-process OK
api/sequential_thinking_mcp.py
Pure computation
In-process OK
Affected Files
autobot-backend/api/mcp_registry.py
autobot-backend/services/mcp_dispatch.py
autobot-backend/api/filesystem_mcp.py
autobot-backend/api/browser_mcp.py
autobot-backend/api/vnc_mcp.py
autobot-backend/skills/sync/mcp_transport.py
Acceptance Criteria
High-risk bridges execute in isolated process or container
Backend stability unaffected by a misbehaving bridge
MCP registry and dispatcher unchanged from the caller's perspective
Resource limits (CPU/memory) configurable per bridge category
MCP registry and dispatcher caller surface unchanged
Resource limits configurable per bridge via MCP_BRIDGE_CPU_LIMIT, MCP_BRIDGE_MEM_LIMIT_MB, MCP_BRIDGE_NOFILE_LIMIT, MCP_BRIDGE_RESTART_MAX env vars (and per-bridge overrides)
Docker compose overlay with cgroup limits, read-only root, cap_drop ALL available in docker/mcp-bridges.yml
Systemd unit template in autobot-mcp-bridge@.service.j2
Activity
arch(mcp): add process/container isolation for MCP tool bridges (#3229)
fix(mcp-isolation): resolve race conditions in async request handling (…
arch(mcp): add process/container isolation for MCP tool bridges (#4089)
github-actions commentedon Apr 10, 2026
PR #4089 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
arch(mcp): add process/container isolation for MCP tool bridges (#4089)
perf(frontend): lazy-load Cytoscape graph components (#3998) (#4082)
mrveiss commentedon Apr 12, 2026
All acceptance criteria from PR #4089 are met and merged to Dev_new_gui (commit 9840c93):
Closing as fully resolved.
feat(mcp): apply isolated-runtime resource limits to admin-configured…
feat(mcp): apply isolated-runtime resource limits to admin-configured…
feat(mcp): apply isolated-runtime resource limits to admin-configured…