claude-operator
claude-operator
TypeScript MCP 服务器,可将任何 Claude Code 会话转化为自主操作员 —— 能够分解目标、在多个项目间生成并协调工作会话、管理两级持久化内存、强制执行护栏,并从回顾性的人工审查中学习。
安装
npm install -g claude-operator
claude-operator init
claude-operator startinit 会构建 ~/.claude-operator/(SQLite 数据库、总线目录、配置)。
start 会在 stdio 上启动 MCP 服务器,并在 http://localhost:7373 启动仪表板。
Related MCP server: AI Team OS
接入 Claude Code
添加到你的 ~/.claude/settings.json 中:
{
"mcpServers": {
"claude-operator": {
"command": "claude-operator",
"args": ["start", "--mcp"]
}
}
}或者指向本地开发构建版本:
{
"mcpServers": {
"claude-operator": {
"command": "node",
"args": ["/path/to/claude-operator/packages/server/dist/server.js"]
}
}
}架构
Operator session (Claude Code)
│ MCP tools (10)
▼
┌─────────────────────────────────┐
│ claude-operator MCP server │
│ ┌──────────┐ ┌─────────────┐ │
│ │ SQLite │ │ File bus │ │
│ │ WAL+FTS5│ │ heartbeat │ │
│ └──────────┘ └─────────────┘ │
│ ┌──────────────────────────┐ │
│ │ Monitor loop (30s poll) │ │
│ └──────────────────────────┘ │
└────────────┬────────────────────┘
│ spawn / bus read-write
┌────────┴────────┐
▼ ▼
Worker A Worker B
(git worktree) (git worktree)
operator/w-abc operator/w-def两级内存 — 一级(易失性,30天自动过期)和二级(持久性,经人工确认)。操作员提出分类建议;人工在仪表板中确认(pending_classification=TRUE)。
文件总线 — 主要的工作者↔操作员状态通道。工作者将心跳写入 <bus-dir>/<worker-id>.json;监控循环检测过期的工作者(心跳超过2分钟)并将其标记为失败。
护栏 — 在任何工具调用前强制执行的 JSON 规则。通过 set_guardrail 设置,通过 get_guardrails 查看。
工具参考
工具 | 描述 |
| 创建一个包含目标、项目路径、优先级和约束的任务 |
| 在隔离的 git 工作树上启动一个 Claude Code 工作者(命名或无头模式) |
| 轮询工作者状态、心跳时长、当前任务 |
| 标记任务完成,合并工作树分支,清理环境 |
| 在操作员内存中进行 FTS5 全文搜索 |
| 写入/更新带有层级和置信度的内存条目 |
| 添加或更新护栏规则 |
| 列出活动的护栏规则 |
| 通过文件总线向正在运行的工作者发送指令 |
| 记录人工判断决策,用于回顾性学习 |
仪表板
http://localhost:7373 — 任务看板、工作者状态、护栏编辑器、内存浏览器、判断决策日志、SSE 日志流。
CLI
claude-operator init # scaffold config + DB
claude-operator start # start MCP server + dashboard
claude-operator status # print active workers + tasks
claude-operator retro # open judgment call log开发
git clone https://github.com/MoyGulati/claude-operator
cd claude-operator
pnpm install
pnpm build
pnpm test # 39 tests
./verify.sh # full gate (build + test)要求: Node 24+,pnpm 10+。
许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your AI mind directs coding agents; work reviewed against your memories: Claude Code, Codex, Cursor
Persistent, governed institutional memory for Claude Code — specs, decisions, learnings.
Shared long-term memory & Stop-hook task handoff across Claude Code, Codex, Cursor, and mobile.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceOrchestrates parallel Claude Code worker swarms with protocol-based behavioral governance for multi-hour autonomous coding sessions.64117MIT
- AlicenseBqualityBmaintenanceTurns Claude Code into a self-driving AI company with autonomous CEO, agent teams, and self-improvement capabilities.126379MIT
- AlicenseNot gradedqualityNot gradedmaintenanceTransforms Claude into an autonomous development team with architect, agent, and QA roles, enabling automated sprint execution, task management, and continuous learning.19 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code, Cursor, and Codex users to orchestrate plan/build/review workflows across host or CLI models with a spec gate, tool vetting, hard per-run and per-day cost/token limits, safe defaults, and clear logs.15 npmMIT