agentloom-mcp
AgentLoom MCP lets a local coding agent coordinate remote worker nodes over an outbound WebSocket hub — sending tasks, tracking threads, moving artifacts, and gating risky actions behind human approval.
Discover nodes —
agentloom_list_agentslists accessible workers with online/execution status.Dispatch tasks —
agentloom_sendsends@node_namemessages, optionally continuing athread_idand waiting (10–600s) for replies.Review collaboration —
agentloom_list_threadsandagentloom_get_threadenumerate threads and fetch recent messages, artifacts, and metadata.Move files and logs —
agentloom_upload_artifactpushes local files or inline text (optionally attached to a thread);agentloom_download_artifactsaves anart_xxxartifact locally or returns small UTF-8 text.Control workers —
agentloom_controlissues arestartcommand to an online node (admin token required).Human-in-the-loop safety —
agentloom_request_approvalcreates an approval request for sensitive actions and optionally blocks until an admin decides.Scoped by RBAC/ACL — every call is limited to what the current token's role (admin/operator/worker) and node whitelist permit.
Supports routing tasks to remote worker nodes backed by Hermes Agent, using its local HTTP API with automatic CLI fallback.
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., "@agentloom-mcp Ask prod-us-1 to check disk usage and report back"
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.
AgentLoom
AgentLoom 是一个开源的多节点 Agent 协作织网(Collaboration Hub + Outbound Worker + Zero-Dependency MCP Server)。
它让你本地的编码 Agent(Antigravity / Claude Code / Codex / Cursor)能够与远端 VPS、Docker 容器、内网主机或无入站端口的 Kubernetes Pod 里的 Agent 协同工作,并通过统一的深色观测看板实时围观、接管与管理权限。
为什么做 AgentLoom?
纯出站 WebSocket 穿透:远端节点只需主动外连 Hub 的
wss://.../ws,无需开放 SSH、无需公网 IP、不怕 Pod 重建漂移。零依赖 MCP 客户端:本地
agentloom-mcp完全基于 Python 标准库实现,装好即可接进任意支持 MCP 的客户端,无需维护额外虚拟环境。开箱支持多种 Agent 后端:内置
hermes、openai(任意 OpenAI Chat Completions 接口)、qwenpaw(AgentScope SSE)、cli(桥接claude/codex/opencode或自定义命令)与echo适配器。多人协作 RBAC 与节点 ACL:支持
admin/operator/worker三级凭证与节点白名单隔离。在 Web 控制台点一下即可签发受限operatorToken 并生成 MCP 配置 JSON,安全拉协作者或朋友加入指定节点。
Related MCP server: Agent Collab MCP
架构概览
flowchart LR
Local["Local Coding Agent\n(Antigravity / Claude Code / Codex)"] -- "stdio JSON-RPC 2.0" --> MCP["agentloom-mcp\n(Python stdlib)"]
MCP -- "HTTPS REST + Token" --> Hub["AgentLoom Hub\n(FastAPI + SQLite WAL + Web UI)"]
Web["Web Console\n(Browser)"] <-- "WSS + RBAC" --> Hub
W1["Worker A (hermes)"] -- "Outbound WSS" --> Hub
W2["Worker B (cli: claude/codex)"] -- "Outbound WSS" --> Hub
W3["Worker C (qwenpaw / openai)"] -- "Outbound WSS" --> Hub界面预览
多节点协作总览

多 Agent 实时协作线程(Markdown / 代码块 / @mention 路由)

RBAC 凭证签发与一键生成 MCP 邀请配置

3 分钟快速开始
1. 启动中枢 Hub
方式 A:Docker Compose(推荐)
git clone https://github.com/kirimasei/agentloom.git
cd agentloom
docker compose up -d首次启动若未设置 AGENTLOOM_ADMIN_TOKEN,Hub 会自动生成一个管理员 Token 并保存在 ./data/admin.token(权限 0600)。
方式 B:直接通过 Python 从 GitHub 安装运行
pip install "agentloom[hub] @ git+https://github.com/kirimasei/agentloom.git"
agentloom hub --host 0.0.0.0 --port 3000 --data-dir ./data生产环境建议在前端挂一个支持 WebSocket 的反向代理(参考 deploy/Caddyfile.example 或 Cloudflare Tunnel)。
2. 接入远端 Worker 节点
先在 Web 控制台右上角点击 🔑 凭证(或使用 CLI agentloom token create --role worker ...)为节点签发一个 worker Token,然后在远端主机执行:
pip install "agentloom[worker] @ git+https://github.com/kirimasei/agentloom.git"
agentloom worker \
--name prod-us-1 \
--server wss://hub.example.com/ws \
--adapter hermes \
--token al_wk_xxxxxxxx \
--region "US · RackNerd" \
--color "#818cf8" \
--capabilities "docker,caddy,linux"也可以使用一键安装脚本自动识别 systemd / tmux / nohup 挂后台运行:
bash deploy/install-worker.sh \
--name prod-us-1 \
--server wss://hub.example.com/ws \
--token al_wk_xxxxxxxx \
--adapter cli --cli-preset claude内置适配器一览
Adapter | 参数示例 | 适用场景 |
|
| Hermes Agent(自动读取 |
|
| 桥接 |
|
| 任意 OpenAI Chat Completions 兼容端点(vLLM / Ollama / OneAPI 等) |
|
| AgentScope QwenPaw |
|
| 零成本联调、健康测试与端到端校验 |
3. 接入本地 Coding Agent(或邀请朋友加入)
在 Web 控制台点击
🔑 凭证-> 选择角色operator-> 填好协作者昵称与允许访问的节点白名单(如staging-1或*)-> 点击签发。直接点击
复制 MCP 配置 JSON(或本地执行agentloom init --url https://hub.example.com --token al_op_xxx --verify)。将生成的 JSON 贴入 Antigravity / Claude Code / Cursor 的 MCP 配置文件(参考 plugin/mcp_config.example.json):
{
"mcpServers": {
"agentloom": {
"command": "uvx",
"args": ["--from", "git+https://github.com/kirimasei/agentloom.git", "agentloom-mcp"],
"env": {
"AGENTLOOM_URL": "https://hub.example.com",
"AGENTLOOM_TOKEN": "al_op_your_token_here",
"AGENTLOOM_SENDER": "alice-local"
}
}
}
}如果本地没有 uvx,可把 command 改为 python3、args 改为 ["-m", "agentloom.mcp"](通过 pip install --no-deps "git+https://github.com/kirimasei/agentloom.git" 安装纯 stdlib 包)。
安全与权限模型(RBAC + ACL)
角色 | Token 前缀 | 权限范围 |
|
| 全部节点访问、签发/吊销子凭证、向节点发送 |
|
| 登录 Web UI 或挂载本地 MCP;仅可见并 |
|
| 仅允许以白名单内的节点身份通过 |
吊销任意 Token(DELETE /api/tokens/{id} 或在 UI 点 吊销)时,Hub 会立即拒绝该凭证的新请求并主动断开其现存 WebSocket 连接。
V2 / V3 协作增强能力
实时流式进度(
stream_chunk->agent_stream):所有内置适配器(hermes/openai/qwenpaw/cli/echo)均支持在执行过程中把输出流式推给控制台与线程观察者,长任务无需盲等。双向托管文件与构建产物中转(v0.3.0 Worker Bridge):
本地通过 MCP
agentloom_upload_artifact/agentloom_download_artifact或agentloom artifact upload|list|downloadCLI 传输;远端 Worker 收到含
art_xxx或线程附件的消息时,自动校验 SHA-256 预下载到本机 inbox 并注入本地路径;远端 Agent 在回复中单独一行输出
[[ARTIFACT_UPLOAD: /path/to/file]](可选| custom_name.ext),Worker 运行时自动安全上传(硬拦截.token/.env/ SSH 私钥等敏感路径)并替换为带art_id与 SHA-256 的回执,彻底突破 8000 字符消息截断。
高危操作人工审批门(HITL Approvals):在 Worker 启动时传入
--require-approval-patterns "rm -rf,systemctl restart,drop table",命中规则的任务会先向中枢发起approval_request暂停等待;只有admin在控制台「🛡️ 审批」或线程卡片点「批准」后才会放行,否则拦截并回传拒绝说明。
本地开发与测试
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[all,dev]"
pytest -q
node tests/test_ui_script.mjsLicense
Available Tools
8 toolsagentloom_controlA
Send a control command (restart) to an online worker node. Requires an admin token.
Inputs: agent (required), action (required).
agentloom_download_artifactA
Download an artifact from the Hub to a local path or return UTF-8 text if small.
Inputs: artifact_id (required), save_path.
agentloom_get_threadB
Fetch messages, artifacts, and metadata for a specific collaboration thread.
Inputs: thread_id (required), limit.
agentloom_list_agentsA
List all remote worker nodes accessible by the current token along with online and execution status.
Inputs: no named parameters.
agentloom_list_threadsB
List collaboration threads accessible by the current token.
Inputs: no named parameters.
agentloom_request_approvalC
Create a human-in-the-loop approval request on the Hub and optionally wait for an admin decision.
Inputs: action (required), summary (required), timeout, thread_id, +2 more.
agentloom_sendB
Send a task or message containing @node_name mentions to remote worker nodes, optionally waiting for replies.
Inputs: content (required), timeout, thread_id, wait_for_reply.
agentloom_upload_artifactB
Upload a local file or text log/config artifact to the Hub (optionally attached to a thread).
Inputs: filename, file_path, thread_id, content_text, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct resource and action: node discovery (list_agents), dispatch (send), node administration (control), thread listing/fetching (list_threads vs get_thread), artifact transfer (upload/download), and approvals. The only superficially similar pair, send and control, is clearly separated by purpose and the admin-token requirement.
All names share the agentloom_ prefix and mostly follow verb_noun (list_agents, list_threads, get_thread, upload_artifact, download_artifact, request_approval). Two bare-verb names (send, control) break the pattern and would read better as send_task or restart_node.
Eight tools is well within the sweet spot and each one maps to a distinct capability in the collaboration-hub workflow. No tool appears redundant or filler.
The surface covers discovery, messaging, artifacts, admin control, and human-in-the-loop approvals, which is solid lifecycle coverage. Minor gaps remain: no way to poll or list approval decisions after a non-blocking request_approval, no artifact listing/deletion, and node control is limited to restart.
Maintenance
Related MCP Connectors
Coordination hub for AI coding agents: message teammates, ask humans, audit every event.
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
Command center for developers coordinating AI coding agents across projects.
Multiplayer for the coding agents your team already uses: shared tasks, decisions, skills and tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects Claude Code instances to a clawborrator hub via WebSocket, enabling cross-session communication, file exchange, and agent dispatch.1252 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables multiple AI coding agents to collaborate on a project by coordinating tasks, file leases, and messages through a shared hub, preventing conflicts and enabling parallel development.MIT
- AlicenseNot gradedqualityBmaintenanceEnables self-hosted remote control of your own computers from Claude and ChatGPT, allowing file management, terminal access, and process control on paired machines via an outbound WebSocket relay you host.8MIT
- AlicenseNot gradedqualityCmaintenanceEnables remote AI agents to read, patch, and (opt-in) execute commands in a local workspace, with all actions approved locally and fully audited.3MIT