37chengshan/agent-mcp 预览 preview

37chengshan/agent-mcp

Project Overview项目介绍

agent-mcp is a cross-CLI agent orchestration framework built around a three-layer Skill/MCP/Daemon architecture that lets a host agent dispatch work to whichever native runtime best fits the task rather than forcing every agent into a single CLI. The MCP surface in mcp_server.py exposes 34 tools, while the underlying daemon manages queues, Run/Goal scheduling, mailbox P2P collaboration, policy chains, and journaled idempotent execution across sessions. Installation is driven by install.py / install.sh and targets 21 hosts: six primary carriers (codex, claude, omp, opencode, kimi, zcode) plus 15 extension hosts (grok, cursor, gemini, pi, copilot, cline, qwen, devin, windsurf, amazon-q, atomcode, kiro, goose, hermes, crush), and DSH is wired in through the bundle at packages/dsh-plugin/ via dsh plugin --profile web add dsh-plugin-agentmcp, documented in docs/dsh-integration.md.

In a typical workflow the orchestrating Skill first scores incoming task characteristics against an S/M/L complexity gate, then the control plane selects a CLI × model pairing and issues spawn_agent or DAG-shaped orchestrate_task calls; child runs publish to a shared mailbox, can be steered with steer_agent, continued with followup_task, or resumed across sessions, while consensus votes, budget and approval policies, and audit journals supply cross-runtime governance. A bundled web console at http://127.0.0.1:8765 (token delivered through a 0600 bootstrap file rather than argv) renders the session tree, Run/Goal panels, token dashboards, and a flow-edge conversation canvas over SSE, giving operators one place to observe and terminate activity regardless of which underlying CLI is executing the work.

The project is MIT-licensed, requires Python 3 plus whichever target CLIs the operator intends to register, and ships 600+ passing pytest cases plus a --doctor JSON health probe to validate first-run wiring. Honest caveats from the README matter: the SANDBOX_MAP is not yet wired into the execution chain (real enforcement currently lives in adapter PERMISSION_FLAGS), verify_command is allowlist-deny by default and needs AGENT_MCP_VERIFY_ALLOW_PREFIXES to be useful, the Prime Agent adapter is integrated but marked DEGRADED until real smoke tests land, and running --host all rewrites many user-level host configurations at once, so users should back up those configs first or scope the install with --host <name>.

agent-mcp 是一个跨 CLI 的代理编排框架,采用 Skill/MCP/Daemon 三层架构,让宿主代理把任务派发到最适配的原生 Runtime 上执行。它通过 mcp_server.py 暴露 34 个 MCP 工具,配合 daemon 提供队列、Run/Goal 调度、mailbox 协作与审计治理。安装脚本支持 21 个宿主:--host claude 仅改动该配置,--host all 会改写六主载体(codex、claude、omp、opencode、kimi、zcode)加 15 扩展的全部 MCP 注册;DSH 通过 packages/dsh-plugin/ 下的 dsh-plugin-agentmcp bundle,以 dsh plugin --profile web add dsh-plugin-agentmcp 接入,并配套 docs/dsh-integration.md 文档。

工作流上,主代理先调用编排 Skill 评估任务特征与复杂度 S/M/L 门级,再由调度层挑选 CLI × 模型组合并下派;子代理通过 spawn_agent/orchestrate_task DAG 跨 Runtime 互派消息,借助 steer_agent/followup_task/resume 续接,治理面提供预算、审批、限权策略链与 mailbox 共识投票。配套 Web 控制台(默认 http://127.0.0.1:8765)用 SSE 推送会话树、Run、Token 仪表盘。该工具适合需要把多代理跨 CLI 编排、需要统一控制面、又不想让某个 CLI 承载全部推理的工程团队。

依赖 Python 3、目标 CLI(如 claude-code、codex、omp、opencode 等)已安装并可登录,凭据通过 0600 文件下发且不进入 argv;MIT 开源免费。首次运行建议先跑 python3 start_agent_mcp.py --doctor 做健康体检。诚实限制:沙箱 SANDBOX_MAP 未接入执行链,verify_command 默认拒绝需配 AGENT_MCP_VERIFY_ALLOW_PREFIXES,Prime Agent 适配器能力标记 DEGRADED、真实冒烟尚未完成;--host all 会改写多套用户配置,使用前请备份。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
  • Not DSH-native: a multi-platform tool that may require Node / Electron or another runtime first非 DSH 原生,是多平台兼容工具:可能要先装 Node / Electron 等运行时
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:37chengshan/agent-mcp

把 37chengshan/agent-mcp 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

Agent MCP

agent-mcp

让 Agent 跑在最适配的底座上 · 打破 Agent 之间的隔离
任务特征 → 最适配 CLI × 模型 · 跨 Runtime 编排 / 消息互通 / 统一治理

version tools tests license mcp security

动态架构:匹配最适配底座并打破隔离

控制台总览 对话树

版本 v4.0.0a1 · 单一来源 agent_mcp/__init__.py · CHANGELOG · v4 路线图 · DSH 接入


核心思想

不是:所有 Agent 挤在同一个 CLI 里
而是:每个 Agent 跑在最适配它的底座上,彼此可通信、可协作、可统一治理
主张 含义
最适配底座 按任务特征选择 CLI × 模型(重构 → Claude Code,长上下文 → Codex,低延迟 → omp…),执行留在原生 Runtime
打破隔离 跨 Agent 消息(mailbox)、共识投票、子任务互派、跨会话续接,不再各干各的
统一控制面 派发 / 监控 / 续接 / 终止 / 预算 / 审计在同一个 Control Plane,与底座无关

三层架构(详见 architecture.md · ADR-0001):

Skill   是否委派 · 怎么拆 · 选最适配 CLI×模型 · 怎么验收     ← 编排控制面
  ↓
MCP     稳定工具面 · 会话隔离 · daemon 拉起                  ← 能力面(薄、无状态)
  ↓
Daemon  队列 · 进程 · Run/Goal/Schedule · 策略 · 协作         ← 执行面
  ↓
Native Runtime   claude / codex / omp / prime / custom        ← 真正执行(最适配底座)

边界:模型推理与工具执行留在原生 CLI;agent-mcp 只做编排、调度、托管、协作、观测与治理。

flowchart LR
  Host["Host Agent + Skill"] -->|MCP stdio| MCP["mcp_server.py"]
  Web["Web 控制台"] -->|SSE| CP["Control Plane daemon"]
  MCP --> CP
  CP --> Store["store_v4 · journal"]
  CP --> EM["Execution Manager · Run"]
  EM --> Ad["Backend Adapters"]
  Ad --> RT["Native CLIs"]

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-enter-customizer 下一个 Next niulai-pet →