Agent Loom
Agent Loom is a local MCP server that routes ChatGPT chats to explicitly allowed workspace roots through one endpoint/token, exposing file, shell, Git-review, and optional persistent agent tools.
Workspace routing: list, discover, open, use, and show current workspaces; each MCP chat session maintains its own selected workspace.
File inspection: read files with line ranges, view images, list directory trees, and search by text/regex/symbol with glob and hidden-file options.
File editing: write, targeted edit, apply unified diffs, and import ChatGPT attachment files; optional SHA-256 checks prevent stale overwrites.
Workspace-scoped shell: run allowlisted verification commands in the selected workspace with configurable timeouts.
Git review: show_changes summarizes git status, diff stats, and unified diffs instead of raw git commands.
Optional persistent agents: start and interact with Pi or Codex agent pools bound to explicit Git repository roots.
Allows AI chats to be routed to explicitly allowed Git workspaces, with tools for reading/writing files, inspecting Git status and diffs, and running workspace-scoped commands.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agent Loom Start a Codex pool in /projects/project-a named auth-fix and send coder 'fix login bug'."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agent Loom
Agent Loom is a local MCP server for routing multiple ChatGPT chats to multiple explicitly allowed workspaces through one endpoint and one token.
Agent Loom is derived from the MIT-licensed CodexPro connector. It exposes an OMP-native capability layer to ChatGPT Web, with direct workspace tools, OMP agents/skills/rules, and bounded one-shot Pi/Codex compatibility.
Why
ChatGPT Web can inspect and edit explicitly allowed local projects without exposing the rest of the host or relying on a per-chat launcher directory. Workspace selection is isolated per MCP session and remains explicit after reconnects.
Related MCP server: Cheap Labor
MCP interface
Direct ChatGPT workspace tools
ChatGPT Web is the active coding agent; Agent Loom supplies the OMP capability model instead of starting a second model process. In the default standard mode it can directly use:
read,write,edit, andapply_patchfor files;tree,search, andview_imagefor inspection;bashfor workspace-scoped verification commands;show_changesfor Git status and diff review;ompto load OMP-native context, skills, and agent instructions into this ChatGPT conversation;agentsto inspect OMP-compatible roles and model routing;taskfor one-shot compatibility workers.
Every file/shell tool accepts an explicit workspace_id or uses the workspace selected in the current MCP session. After a ChatGPT reconnect, Agent Loom deliberately refuses to fall back to the launcher root: reopen the requested project or pass its stable workspace_id. Default policy is write=workspace and bash=safe; trusted local deployments can opt into full Bash explicitly.
workspace
Each HTTP MCP connection has its own selected workspace. Different ChatGPT chats can therefore select different projects while sharing the same server URL and token.
{"action":"list"}{"action":"use","workspace_id":"ws_..."}Actions: list, discover, open, use, current.
discover finds bounded nested Git repositories under aggregate directories. open also returns repository candidates when the selected directory is not itself a Git root. Direct file tools can use either a repository or an allowed aggregate directory.
OMP-native ChatGPT Web runtime
omp is a capability bridge, not a model launcher. ChatGPT Web remains the active model and continues in the same conversation. No OMP/Pi/Codex model process is started by omp.
After selecting a workspace, call omp(action=status) to verify the mode, then omp(action=context) once. The context includes OMP SYSTEM.md, project/user rules, native agents, skills, prompt templates, slash-command definitions, and the OMP-native MCP tools available under the current Agent Loom policy. The native_tools field is intentionally an OMP-only subset; separate task, pi, codex, handoff, and session tools are not included.
{"action":"context","workspace_id":"ws_..."}Load focused OMP instructions when needed:
{"action":"skill","workspace_id":"ws_...","skill_name":"debugging"}{"action":"agent","workspace_id":"ws_...","agent_name":"reviewer"}The loaded OMP instructions guide this ChatGPT conversation. File and shell operations still go through Agent Loom's guarded MCP tools; write, edit, and apply_patch follow AGENT_LOOM_WRITE_MODE, while bash follows AGENT_LOOM_BASH_MODE.
agents and generic task
agents(action=list) discovers project .omp/agents, user OMP agents, and bundled roles with first-wins precedence. agents(action=models) reports the selected backend's model inventory and configured roles. Built-in routing uses zai/glm-5.3-flash for @fast work and openai-codex/gpt-5.6-luna for @task/@review; set AGENT_LOOM_FAST_MODEL, AGENT_LOOM_TASK_MODEL, or AGENT_LOOM_REVIEW_MODEL to override selectors.
task(action=run) remains the one-shot compatibility workflow for bounded read-only workers. Choose agent=scout or agent=reviewer with mode=review for evidence, agent=security-reviewer for security review, or agent=task for implementation planning. Native workers run read-only inside a sanitized workspace mirror; apply approved changes through Agent Loom's guarded write/edit tools. mode=write is rejected. backend=auto selects OMP first, then Pi, then Codex. The persistent supervisor enforces global max_concurrency=1, queues up to eight generic tasks, and starts the next queued task after completion.
Native task launch requires Linux and the bwrap (bubblewrap) executable; other platforms fail closed rather than run an unguarded backend. Model inventory remains separate from task launch.
{"action":"run","agent":"reviewer","backend":"auto","workspace_id":"ws_...","mode":"review","task":"Review the current diff.","timeout_seconds":1200}task(action=wait) and task(action=status) return structured metadata, output summary, bounded stdout_tail/stderr_tail, and the task artifact path. Each task directory contains task.json, worker.json, stdout.log, stderr.log, result.json, result.md, and the sanitized workspace mirror.
Direct pi and codex compatibility
The pi and codex tools remain available for callers that need an explicit backend. Their actions are run, wait, status, and stop; pi also supports models. Explicit compatibility calls do not queue behind another task and return a busy error when the one-task slot is occupied.
Native tasks are read-only. mode=write is rejected until a guarded native write adapter exists; use Agent Loom's direct guarded write/edit tools for authorized changes. Each task exits with fresh context; no pools, forums, agent worktrees, idle dispatchers, or h5i processes are created.
{"action":"run","workspace_id":"ws_...","mode":"review","model":"openai-codex/gpt-5.6-luna","task":"Review the current diff.","timeout_seconds":1200}{"action":"wait","task_id":"...","wait_seconds":60}One endpoint, many projects
Add the generated MCP URL to ChatGPT as a new connector named Agent Loom. Do not reuse or prompt for an older CodexPro connector: connector names and cached tool schemas belong to the ChatGPT connection, not to the local command. After an upgrade that changes tools or cards, refresh or recreate the Agent Loom connector.
npm install
npm run build
AGENT_LOOM_HTTP_TOKEN='use-at-least-24-random-bytes' \
node dist/http.js \
--root /projects/default \
--allow-root /projects/project-a \
--allow-root /projects/project-bConnect every ChatGPT chat to:
https://your-host.example/mcp?agent_loom_token=...Each chat calls workspace({"action":"use", ...}) independently. A workspace path is accepted only when it is under a configured allowed root.
Local state
Do not run git init in $HOME. Agent Loom keeps launcher configuration under ~/.agent-loom/ and accesses only explicitly allowed workspace roots.
Requirements
Node.js 20+
Git
Optional
ompCLI, Bun, and Linuxbwrapfor the one-shot native OMP compatibility backend used bytask(action=run).
Development
npm ci
npm run build
npm run smokeSecurity
One HTTP token gates the endpoint.
Workspace roots are allowlisted before routing.
File and Bash operations remain constrained by the configured write and Bash modes.
See SECURITY.md and docs/architecture.md.
License
MIT. Original CodexPro copyright and license notices are retained.
Available Tools
13 toolsapply_patchApply PatchADestructive
Apply one unified diff patch inside the workspace. Paths are validated before applying. Prefer edit for tiny replacements and apply_patch for multi-file diffs.
Inputs: patch (required), workspace_id.
bashBashADestructive
Run one allowlisted verification command in the workspace, such as tests, build, lint, typecheck, or a project script. Do not use for git status/diff or file inspection; use show_changes, tree, search, and read instead. Do not chain commands with &&, pipes, redirects, or shell file readers.
Inputs: command (required), cwd, session_id, timeout_ms, +1 more.
codexCodex AgentsADestructive
Unified persistent codex agent interface. For action=start, ALWAYS pass the explicit Git repository root from the user's request; MCP reconnects can reset implicit workspace selection. Start once, then send many tasks to stable h5i boxes and conversation sessions. Pools survive MCP requests and route back to their bound workspace by id.
Inputs: action (required), name, pool, root, +8 more.
editEdit FileADestructive
Apply a targeted exact text replacement while retaining the existing file inode and metadata. Returns a unified diff; pass the SHA from read to reject stale multi-session edits.
Inputs: path (required), new_text (required), old_text (required), replace_all, +3 more.
import_fileImport Attachment FileADestructive
Import a ChatGPT Apps SDK attachment into the workspace. Accepts only a platform file object with download_url and file_id. Not a general URL downloader. Overwrite is off by default.
Inputs: file (required), destination (required), overwrite, workspace_id, +1 more.
piPi AgentsADestructive
Unified persistent pi agent interface. For action=start, ALWAYS pass the explicit Git repository root from the user's request; MCP reconnects can reset implicit workspace selection. Start once, then send many tasks to stable h5i boxes and conversation sessions. Pools survive MCP requests and route back to their bound workspace by id.
Inputs: action (required), name, pool, root, +8 more.
readRead FileARead-only
Read a specific text file with line numbers. Avoid rereading files after write/edit/apply_patch unless exact final content is needed.
Inputs: path (required), end_line, max_bytes, start_line, +1 more.
searchSearch FilesARead-only
Use this for targeted verification or code lookup. Prefer one specific final search instead of repeated broad verification searches.
Inputs: query (required), glob, path, regex, +6 more.
show_changesShow ChangesARead-only
Summarize the current workspace changes in one review-oriented result with git status, diff stats, and optional diff. Use this instead of bash git status, bash git diff, git_status, or git_diff when reviewing work.
Inputs: path, since, staged, include_diff, +2 more.
treeFile TreeBRead-only
List files and directories inside the workspace, excluding blocked paths.
Inputs: path, max_depth, max_entries, workspace_id, +1 more.
view_imageView ImageARead-only
Inspect a PNG, JPEG, GIF, or WebP image from the active workspace. Returns native MCP image content plus dimensions and SHA-256.
Inputs: path (required), max_bytes, workspace_id.
workspaceWorkspace RouterARead-only
Route this chat to an allowed project. Use discover when a requested directory is not itself a Git repository; then open the relevant discovered repository before Git operations or starting Pi/Codex pools. Selection belongs only to this MCP session, so other chats may select different projects through the same endpoint.
Inputs: action (required), root, max_depth, max_results, +1 more.
writeWrite FileADestructive
Create or overwrite a meaningful text file inside the workspace. New files use an atomic rename; existing files retain their inode and metadata. Returns a unified diff; pass the SHA from read when overwriting shared files.
Inputs: path (required), content (required), overwrite, create_dirs, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools are clearly separated by purpose: tree/search/read handle inspection, write/edit/apply_patch handle distinct modification styles, and bash/show_changes are explicitly kept apart from git/file review. The only mild overlap is between write, edit, and apply_patch, but their descriptions provide clear boundaries, and pi/codex are differentiated by agent name.
The tool names are readable and consistently lowercase/snake_case, but they mix bare verbs (write, read, edit, search), noun-like commands (tree, bash, workspace), and verb_noun forms (view_image, import_file, show_changes). This is a mixed convention rather than a predictable pattern.
Thirteen tools is a reasonable, well-scoped count for a coding workspace server. Each tool addresses a distinct operational need such as file editing, search, verification, change review, workspace routing, or persistent agent interaction, without feeling bloated.
The set covers core file operations, search, verification, change review, and persistent agent workflows well. However, there are notable gaps: no file delete/remove tool, and the workspace description references a discover capability that is not exposed in the tool list, which creates a potential dead end.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Coordinate coding agents through MCP using existing AI plans, saved work, and independent checks.
Project board for ChatGPT, Claude and coding agents, with scoped MCP access to projects and tasks.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceCentralized multi-project state & handoff MCP server that lets AI agents save checkpoints in one session and resume in another with minimal token overhead, including git snapshots and code-graph integration.-
- AlicenseAqualityDmaintenanceAn MCP server that splits coding work between ChatGPT web (planning, review) and Codex CLI (implementation), enabling agentic workflows over a local repo with risk-gated execution and safety rails.23MIT
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT to securely control remote development servers over OAuth-protected MCP, exposing workspace-bounded tools for file editing, command execution, Git operations, and running Codex or GitHub Copilot subagents.27 npmMIT
- AlicenseNot gradedqualityBmaintenanceOrchestrates multiple coding agents at once so an MCP client can delegate implementation work while retaining judgment: each agent runs in its own isolated git worktree and branch, claims the files it edits, and communicates via a mailbox and shared board. Supports blocking questions to the orchestrator, Codex-written acceptance tests locked before workers start, scope validation, and reporting on first-pass success.1Apache 2.0