用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/lukemcqueen/hermes-cortex --skill mcp-health-monitoring命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Cross-server agent health monitoring using binary status vectors — deploy health endpoints on each agent, poll from orchestrator, alert on state transitions.
Wire a self-hosted Langfuse instance to Hermes Agent — generate API keys, configure env vars, enable the bundled plugin, install SDK, and verify traces flow.
Use before enforcement code changes or shared-repo commits.
| name | mcp-health-monitoring |
| description | Probe MCP server health; extend the governance watchdog. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["linux","macos"] |
| metadata | {"hermes":{"tags":["mcp","health","watchdog","governance","monitoring","probe"],"related_skills":["mcp-server-building","fleet-commands","cron-job-management"]}} |
Detect and diagnose MCP server outages — the class that silently write-deadlocked the fleet on 2026-08-18 (mcp SDK 2.0 removed the decorator API; all three cortex servers crashed at import, sessions lost loop-governance tools, and the enforcer blocked every write because the lock tool lived in the dead server). The core lesson: an MCP outage that goes unnoticed is a fleet outage; the probe below catches the failure class in seconds.
agent-mcp-health-watchdog (no_agent cron, every 5 min, source
ops/scripts/health/agent-mcp-health-watchdog.py) probes every configured
server in ~/.hermes/config.yaml:
list_tools → verifies
required tool names presenttirith mcp-server) get a REAL stdio initialize handshake instead;
tools/list is probed opportunistically (resource-only servers that reject
it with -32601 still pass — the handshake is the health signal)~/.hermes/logs/mcp-stderr*.log for import-crash signatures
(watermark-based, catches the 2026-08-18 class on first fresh hit)~/.hermes-cortex/state/mcp-health-state.jsonExtending: add the new server's config key to the EXPECTED_TOOLS map with
its severity + required tool names. Servers without a map entry are still
probed (WARNING, non-empty tool list required).
Catches the real failure class (import crash → no tools) without a full stdio
handshake. Runnable helper: scripts/mcp-probe.py <server_path> — invoke it
with the server's OWN python:
"$SERVER_PYTHON" "$HOME/.hermes/skills/devops/mcp-health-monitoring/scripts/mcp-probe.py" /path/to/server.py
# prints ["tool1","tool2",...] on success; exits non-zero with traceback on crash
Requires the server to expose module-level async def list_tools(ctx, params=None) (the mcp 2.0 constructor-API shape) and guard main() behind
if __name__ == "__main__": so import never starts the stdio server.
The fleet watchdog dispatches automatically: python-script servers use this
import probe; binary-CLI servers (command is an executable and args[0] is
a subcommand, not a .py file) fall back to a real stdio initialize
handshake (tests/test_mcp_health_watchdog.py proves both paths — run it
after any probe change).
~/hermes-*
paths via Path.home() at import. Probing under a different HOME or a bare
subprocess env fails with ModuleNotFoundError: No module named 'hermes_models' while the server is perfectly healthy. Run probes with the
user's real HOME and cwd=HOME to mirror the gateway's spawn environment.offset = offsets.get(path, size)
then if size == offset: continue never stores the offset → the scan
re-initializes every run and never fires. Correct: offset = offsets.get(path); if offset is None: offsets[path] = size; continue.begin_change, end_change, check_lock).agent-bus while the
doctor's expected list uses cortex-bus; the doctor's "configured" check
passes via the args path, not the key. Parse the LIVE config for probes.tirith mcp-server, python -m module) have a
non-.py args[0] — treating it as a script path failed with
script not found: mcp-server every 5 min and alerted hourly while the
server was perfectly healthy. The dispatcher now routes non-.py args to a
real stdio handshake. Never os.path.exists(args[0]) as the sole check.tools/list errors
(-32601) are normal for them; the initialize handshake (serverInfo) is the
health signal. Don't fail a server whose tools/list is unsupported.enabled: false and only probe servers actually configured on
that host (loop-governance is orchestrator-only — a non-orchestrator without
it must NOT false-CRITICAL).docs/elicit/2026-08-18_governance-fail-loudly-party.md.AttributeError