Skip to main content
Glama

hcom-mcp

控制平面 MCP 服务器,用于启动和监管 hcom 所管理的代理。

为什么用 HTTP,而不是 stdio

MCP 服务器通常通过 stdio 运行——客户端为每个会话启动一个服务器进程。对于管理一批代理的控制平面服务器来说,这是个问题:十个终端会话会启动十个相互隔离的 MCP 进程,彼此之间没有任何协调。

hcom-mcp 以单个常驻 HTTP 服务器的方式运行。每个终端会话、每个 MCP 客户端、每个代理都连接到同一个端点。一个进程,即为启动、注册表和生命周期提供唯一事实来源。

Related MCP server: GRACE Orchestrator MCP

前置要求

安装

git clone https://github.com/scchearn/hcom-mcp.git
cd hcom-mcp
npm install
npm run build

运行

前台运行(任意操作系统)

HCOM_MCP_PORT=3111 node dist/index.js

监听 http://127.0.0.1:3111/mcp。仅接受 localhost 连接。

作为守护进程运行

操作系统

机制

设置

Linux

systemd 用户服务

cp docs/systemd/hcom-mcp.service ~/.config/systemd/user/ && systemctl --user enable --now hcom-mcp

macOS

launchd

cp docs/launchd/com.scchearn.hcom-mcp.plist ~/Library/LaunchAgents/ && launchctl load ~/Library/LaunchAgents/com.scchearn.hcom-mcp.plist

Windows

任务计划程序或 nssm

任务计划程序请参阅 docs/windows/hcom-mcp-task.xml,或使用文件注释中的 nssm 命令

请调整配置中的 ExecStart/ProgramArguments 路径,使其与你克隆仓库的位置一致。

MCP 客户端配置

将任何支持 HTTP 的 MCP 客户端指向 http://127.0.0.1:3111/mcp。以 Claude Desktop 为例:

{
  "mcpServers": {
    "hcom-mcp": {
      "type": "http",
      "url": "http://127.0.0.1:3111/mcp"
    }
  }
}

配置

  • HCOM_MCP_PORT — HTTP 端口(默认:3111

  • ~/.hcom/mcp/config.json — 预设、拓扑、模型目录、救援允许列表

  • ~/.hcom/mcp/registry.json — 受管代理注册表

  • .hcom-mcp.json — 可选的工作区覆盖(参见 .hcom-mcp.example.json

救援允许列表

unblockspawn_and_verify 仅当待处理的 launch_blocked 详情与 rescueAllowlist 中的模式匹配时,才会向受阻代理注入输入。默认配置已覆盖已知的可救援对话框(工作区信任、权限模式、模型/提供商选择器);如需为新增对话框添加模式,无需发布代码:

{
  "rescueAllowlist": {
    "enabled": true,
    "patterns": ["trust this folder", "permission mode"]
  }
}

工作区覆盖会扩展全局模式;它们无法移除内置默认项。

技能

通过以下方式安装:

npx skills add scchearn/hcom-mcp

操作指南随 skills/ 目录提供:

  • skills/using-hcom/SKILL.md — 消息传递、线程、转录、事件监视

  • skills/hcom-agent-messaging/SKILL.md — 代理间消息传递模式与注意事项

工具

工具

用途

launch

启动无头代理(使用预设或裸 harness+model)

spawn_and_verify

启动 + 就绪门控,可选对受阻代理进行受保护的救援

launch_topology

根据拓扑预设启动多个代理(可选 verify 门控)

adopt

将外部 hcom 代理纳入受管生命周期

stop / kill

停止或终止受管代理(一个或多个名称,或一个标签)

unblock

对受阻代理进行受保护的 PTY 救援(默认试运行,受配置允许列表约束)

watch_agents

监管自有代理:轮询快照并生成派生标志,或订阅存活/受阻事件

resume / fork

恢复已停止的代理或分叉会话,并通过 resumedFrom 链接登记所有权

send

向一个或多个代理发送 hcom 消息(request/inform/ack,可选 reply_to)

list_managed

列出由此服务器管理的代理

list_all

列出所有存活的 hcom 代理

list_models

列出每个 harness 可用的模型(claude 完整 ID 未经校验直接透传)

list_presets

列出已配置的代理预设

list_topologies

列出已配置的拓扑预设

inspect

检查代理的状态、转录、事件或终端

transcript

读取代理转录、转录搜索结果或转录时间线

continue_from

从存活或已停止的代理获取交接上下文

prune

移除过期的注册表记录

thread_seed

创建工作流线程

thread_inspect

查询线程事件

status

服务器健康与定位信息(包含 hcom status --json 健康状态、配置/注册表路径)

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server that enables AI agents to run a deterministic orchestration loop with decomposition, subagent execution, and review feedback across multiple LLM backends.
    60
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    MCP server for controlling a Hermes agent deployment via its HTTP API, enabling health checks, log retrieval, task management, and deployment configuration from MCP clients.
    17
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    A self-hosted MCP control plane and protocol gateway that aggregates and manages multiple MCP servers, exposing them via stable, authenticated MCP endpoints for any client.
    0
    1
    MIT