# Hermes MCP Hermes MCP is a FastAPI + MCP supervisor for market interpretation, strategy selection, and Trader control. ## What Hermes does - builds a market narrative from regime data - scores strategy fit for each account/market concern - records decision snapshots for audit and dashboarding - optionally dispatches Trader control actions through a single guarded write path ## Surface - MCP transport: `/mcp/sse` - Health: `/health` - Dashboard: `/dashboard/` - Primary tool: `report()` ## Hermes to Trader control path Hermes reads Trader state via strategy snapshots and writes only through Trader's canonical action tool: - `apply_control_decision(payload)` Dispatch is gated locally by: - `HERMES_ALLOW_ACTIONS` When the gate is false, Hermes still makes and records decisions, but returns a blocked dispatch result instead of changing Trader state. ## Run ```bash ./run.sh 8590 ``` ## Test ```bash ./tests.sh ``` ## Replay decisions Hermes now stores a full `replay_input` bundle with each new decision, so stored decisions can be replayed against the current decision engine. Replay recent decisions: ```bash python3 scripts/replay_decisions.py --limit 20 ``` Only show changed outcomes: ```bash python3 scripts/replay_decisions.py --limit 50 --only-changed ``` JSON output: ```bash python3 scripts/replay_decisions.py --limit 50 --json ``` Optional filter by concern: ```bash python3 scripts/replay_decisions.py --concern-id ``` Note: decisions created before this replay capture existed will not have `replay_input` yet.