Agent Access and MCP
Expose Loom over /mcp/loom for Claude Code and Codex, connect mcp.json servers, and enforce tool confirmation policies.
External coding agents such as Claude Code and Codex can connect to Loom through its authenticated Streamable HTTP MCP gateway at /mcp/loom. With a gateway token, an agent can inspect paired machines, run non-interactive commands on them, query your Second Brain, and—when Codeman is connected—start and supervise other agent sessions.
Connect an external agent
Open Settings → Security → Agent access to inspect your gateway URL and generate a Bearer token:
- One-time secret: The raw token is displayed once when created; Loom stores only its hash and tracks the most recent client name and timestamp.
- Instant revocation: Rotating or revoking the token (
POST /api/mcp/gateway/tokenwith{"revoke":true}orDELETE /api/mcp/gateway/token) immediately disconnects any client holding the previous token.
Ready-to-copy client configurations provided in the panel:
- Claude Code (user scope makes Loom available to all sessions, including sessions launched by Codeman):
claude mcp add --scope user --transport http loom http://127.0.0.1:2510/mcp/loom \
--header "Authorization: Bearer <token>"- Codex (
~/.codex/config.toml):
[mcp_servers.loom]
url = "http://127.0.0.1:2510/mcp/loom"
http_headers = { "Authorization" = "Bearer <token>" }- Standard
.mcp.json(type: "http"):
{
"mcpServers": {
"loom": {
"type": "http",
"url": "http://127.0.0.1:2510/mcp/loom",
"headers": {
"Authorization": "Bearer <token>"
}
}
}
}Gateway tools and Codeman bridge
When a client connects, Loom supplies MCP server instructions guiding the agent to start with loom_overview.
| Tool | Purpose |
|---|---|
loom_overview | Reports Loom version, machines, active capability bricks, and whether agents__* tools are available. |
loom_machines | Lists local, paired Loom nodes, and saved SSH machines along with their modules. |
loom_machine_run | Executes one non-interactive command on a target machine via local PTY, SSH, or node terminal, returning the exit code and the last 64 KiB of plain-text output (default timeout 60 seconds, max 600). |
loom_gateway_status | Reports upstream MCP servers and the Codeman agents bridge status. |
agents__* | Proxies codeman mcp (list_sessions, start_session, send_prompt, wait_for_session, read_output, interrupt_session, delete_session) when Codeman is connected and codeman is installed on the Loom host. |
brain_*, memory_* | Exposes Second Brain search, notes, and memory retrieval tools. |
Loom passes the Codeman credential to codeman mcp strictly through process environment variables—never on the command line or on disk. An external agent can prompt, interrupt, or delete only the Codeman sessions it started itself.
Managing mcp.json and linked sources
Loom stores its own MCP client configuration at LOOM_HOME/mcp.json with owner-only (0600) file writes and automatic change detection (no restart needed after editing):
- Transports:
command/args/envfor stdio servers, orurl/headersfor Streamable HTTP servers, plus Loom'senabledanddisabledToolsfields. - Read-only linked sources: Under Settings → MCP, link existing
~/.claude.json,.mcp.json,~/.cursor/mcp.json, or.vscode/mcp.jsonfiles (POST /api/mcp/sources) without modifying them. - Safe adoption: Adopting a linked server (
POST /api/mcp/sources/adopt) copies it intoLOOM_HOME/mcp.jsonwithenabled: falseand empty credential placeholders unlesswith_env: trueis explicitly requested (headers are never copied automatically).
Capability policies and approvals
Every gateway tool call is evaluated against Loom's capability policy engine using the subject mcp.tool:<server>/<tool> (such as mcp.tool:loom/loom_machine_run or mcp.tool:agents/start_session):
- Ask me before acting: Enabling this toggle in Agent access creates two global
confirmrules (agent-access-ask-runandagent-access-ask-session) editable in Settings → Permissions. - Live approval queue: Waiting calls appear in Loom's notification bell, mobile Inbox, and optional
ntfy/Web Push notifications for up to24hours. Command and argument details stay in memory only and are never written to audit logs or pushed to external notification servers. - API inspection: Inspect pending requests with
GET /api/policy/pendingand answer them withPOST /api/workspace/sessions/<session_id>/requests/<request_id>using{"decision":"allow_once"}or{"decision":"deny"}.
Continue to Security and Reverse Proxy to harden remote access.
Voice and Mobile
Run local Jarvis speech with sherpa-onnx over HTTPS port 2543, install Loom's mobile PWA, and configure ntfy, Web Push, and webhook notifications.
Security and Reverse Proxy
Understand Loom's loopback-first boundary, Argon2id owner password, sealed secret stores, port 2543 HTTPS, and TLS reverse-proxy settings.