codex-hermes-worker

codex-hermes-worker

A Windows-first, dual-mode MCP bridge that delegates bounded work to Hermes Agent and a local Qwen model via an OpenAI-compatible endpoint, providing restricted batch or trusted full execution modes.

Category
访问服务器

README

Codex Hermes Worker

Current release / 当前正式版本:1.0.0

English | 简体中文

English

A Windows-first, dual-mode MCP bridge that lets Codex delegate bounded work to Hermes Agent and a local Qwen model served through an OpenAI-compatible endpoint such as LM Studio.

Architecture

Codex
  -> project-local stdio MCP bridge
  -> Hermes Agent
  -> LM Studio / local Qwen
  -> restricted deterministic tools or explicitly authorized host tools

Codex remains responsible for planning, high-risk judgment, verification, and the final answer. Hermes and the local model handle repetitive, batch-oriented, and tool-heavy work.

Key capabilities

  • Eight high-level MCP tools for health, delegation, durable jobs, result summaries, bounded queries, cancellation, and explicitly authorized host work.
  • SQLite job state with WAL, JSONL exports, review manifests, and recovery.
  • restricted_batch for read-only research inputs and project-scoped outputs.
  • trusted_full for explicitly authorized terminal, file, code, browser, skill, memory, and delegation capabilities available in Hermes.
  • Windows PowerShell scripts for install, status, tests, and uninstall.
  • Unit, integration, live MCP, Hermes, and local-model capability tests.

Safety

restricted_batch is the default for untrusted or bulk input.

trusted_full is intentionally high risk. It can launch an unsandboxed host terminal and must never be selected automatically merely because restricted execution is inconvenient. Network access requires a separate opt-in.

Local secrets, generated Codex configuration, virtual environments, job data, SQLite databases, logs, and Hermes profiles are excluded from version control. See SECURITY.md before enabling host tools.

Quick start

Requirements:

  • Windows
  • Python 3.11+
  • Codex CLI or Desktop with local stdio MCP support
  • Hermes Agent
  • LM Studio or another OpenAI-compatible local model server
  • A tool-capable local model
git clone https://github.com/RANJIANG23/codex-hermes-worker.git
cd codex-hermes-worker
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\status.ps1

Run the complete validation flow:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\test.ps1

For configuration, first delegation examples, recovery, and uninstall instructions, read the Chinese guide.

License

MIT


简体中文

这是一个可运行、可测试、可供其他团队成员复用的 Windows 本地分层代理系统:

Codex / GPT-5.6
→ 项目级 stdio MCP Bridge
→ Hermes Agent
→ LM Studio / Qwen3.6 27B
→ 受限批处理工具或显式授权的完整 Hermes 工具

Codex 负责规划、复杂推理、冲突裁决和最终验收;Hermes/Qwen 负责批量、重复和本机工具密集型工作。

组件作用

  • Codex:上层主代理和最终决策者。
  • Bridge:提供 8 个高级 MCP 工具、参数校验、任务状态、摘要隔离和双模式权限。
  • Hermes:本地 Agent Loop,选择并调用工具。
  • Qwen:负责本地语义判断、分类、初筛、复核和工具规划。
  • SQLite/JSONL:持久保存任务、证据、结果和复核清单。

两种执行模式

restricted_batch(默认)

用于游戏研究数据、外部输入和批处理:

  • 无通用终端、无浏览器、无网络工具。
  • 只读 testdata、work/input 或 config/local.yaml 中明确加入的目录。
  • 只写本项目的 work 目录。
  • 通过专用工具执行哈希、字符串、二进制切片、FFprobe 和结构化查询。

trusted_full(显式授权)

用于你明确希望 Hermes/Qwen 像 Codex 一样执行的电脑任务:

  • 可选择 terminal、file、code_execution、browser、skills、memory、delegation、cronjob 和可用 MCP。
  • 必须传入 authorization="explicit_user_authorized"。
  • 外部网络或可选第三方工具还必须传入 allow_network=true。
  • 主机终端不是沙箱,可能修改文件或执行危险命令。不要对不可信网页、文档或批量输入默认使用。

完整能力和当前缺失依赖见 Hermes 完整工具报告。

快速开始

环境要求:

  • Windows
  • Python 3.11+
  • 支持本地 stdio MCP 的 Codex CLI 或 Desktop
  • Hermes Agent
  • LM Studio 或其他兼容 OpenAI API 的本地模型服务
  • 支持工具调用的本地模型
git clone https://github.com/RANJIANG23/codex-hermes-worker.git
cd codex-hermes-worker
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\status.ps1

运行完整验证流程:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\test.ps1

Bridge 是 stdio MCP,不监听常驻端口。Codex 会按任务需要启动它。

在 Codex 中确认 MCP

请调用 hermes_health,并只报告:
1. 总体状态;
2. Hermes 版本;
3. Qwen 模型 ID;
4. 默认执行模式;
5. trusted_full 是否启用。

命令行检查:

codex mcp get hermes_worker

第一个受限批处理任务

请先调用 hermes_health。

然后调用 submit_local_job:
- task_type: asset_classification
- instructions: 使用确定性元数据和字符串证据分类;不修改输入
- input_paths: ["testdata/assets.jsonl"]
- profile: asset_worker
- output_schema: asset_classification_v1
- max_steps: 8

只返回 job_id。随后轮询 get_local_job_status,完成后读取
get_local_job_summary。只在需要复核时调用 query_local_results,
不要把完整批次载入主上下文。

第一个完整工具任务

只在你明确接受风险时使用:

我明确授权本次任务使用 trusted_full,但不授权外部网络。

请调用 delegate_trusted_full_task:
- authorization: explicit_user_authorized
- working_directory: D:\WorkSpace
- toolsets: ["terminal", "file", "code_execution", "skills"]
- allow_network: false
- include_optional_tools: false
- max_steps: 20
- timeout_seconds: 600
- instructions: <具体任务>

完成后只返回结果摘要、修改文件列表和审计日志路径。

如确实需要浏览器或网络,必须在同一任务中明确授权并设置 allow_network: true。

结果与配置

  • SQLite:work\database\jobs.db
  • 完整 JSONL:work\results\<job_id>.jsonl
  • 复核清单:work\review\<job_id>.jsonl
  • 受限工具审计:work\logs\tool-audit.jsonl
  • 完整模式审计:work\logs\trusted-full-audit.jsonl

本机目录配置保存在不会提交的 config\local.yaml 中。不要把原始游戏目录加入 writable_roots。本地密钥、生成的 Codex 配置、虚拟环境、任务数据、数据库和日志均已排除在版本控制之外。

安全与团队复用

restricted_batch 是处理不可信输入或批量数据时的默认模式。trusted_full 可以启动非沙箱主机终端,只能用于用户明确授权的可信任务。启用主机工具前请阅读 SECURITY.md。

团队成员应复制源码和配置模板,不应复制 .venv、.codex/config.toml、work、.env 或任何密钥。每个人都应在自己的电脑上运行安装器,形成:

成员自己的 Codex → 本机 Bridge → 本机 Hermes → 本机 Qwen

团队部署方法见 docs/team-deployment.md。当前版本不是无认证的远程 GPU 服务,不应直接开放到局域网。

更完整的安装、配置、恢复、故障排查和卸载说明见 中文详细指南。

许可证

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选