hermes-agent/hermes_cli
Teknium 6716e66e89
feat: add MCP server mode — hermes mcp serve (#3795)
hermes mcp serve starts a stdio MCP server that lets any MCP client
(Claude Code, Cursor, Codex, etc.) interact with Hermes conversations.

Matches OpenClaw's 9-tool channel bridge surface:

Tools exposed:
- conversations_list: list active sessions across all platforms
- conversation_get: details on one conversation
- messages_read: read message history
- attachments_fetch: extract non-text content from messages
- events_poll: poll for new events since a cursor
- events_wait: long-poll / block until next event (near-real-time)
- messages_send: send to any platform via send_message_tool
- channels_list: browse available messaging targets
- permissions_list_open: list pending approval requests
- permissions_respond: allow/deny approvals

Architecture:
- EventBridge: background thread polls SessionDB for new messages,
  maintains in-memory event queue with waiter support
- Reads sessions.json + SessionDB directly (no gateway dep for reads)
- Reuses send_message_tool for sending (same platform adapters)
- FastMCP server with stdio transport
- Zero new dependencies (uses existing mcp>=1.2.0 optional dep)

Files:
- mcp_serve.py: MCP server + EventBridge (~600 lines)
- hermes_cli/main.py: added serve sub-parser to hermes mcp
- hermes_cli/mcp_config.py: route serve action to run_mcp_server
- tests/test_mcp_serve.py: 53 tests
- docs: updated MCP page + CLI commands reference
2026-03-29 15:47:19 -07:00
..
__init__.py chore: release v0.5.0 (v2026.3.28) (#3568) 2026-03-28 13:11:39 -07:00
auth.py fix: make display_hermes_home imports lazy to prevent ImportError during hermes update (#3776) 2026-03-29 15:15:17 -07:00
banner.py feat: add profiles — run multiple isolated Hermes instances (#3681) 2026-03-29 10:41:20 -07:00
callbacks.py fix: replace user-facing hardcoded ~/.hermes paths with display_hermes_home() 2026-03-28 23:47:21 -07:00
checklist.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
claw.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
clipboard.py fix: clean up empty file after failed wl-paste clipboard extraction 2026-03-11 02:56:19 -07:00
codex_models.py fix: add codex forward-compat model listing 2026-03-13 21:34:01 -07:00
colors.py Revert "feat(cli): skin-aware light/dark theme mode with terminal auto-detection" 2026-03-17 10:04:53 -07:00
commands.py feat: config-gated /verbose command for messaging gateway (#3262) 2026-03-26 14:41:04 -07:00
config.py feat(skills): support external skill directories via config (#3678) 2026-03-29 00:33:30 -07:00
copilot_auth.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
cron.py docs: clarify gateway service scopes (#1378) 2026-03-14 21:17:41 -07:00
curses_ui.py feat: show estimated tool token context in hermes tools checklist (#3805) 2026-03-29 15:36:56 -07:00
default_soul.py fix: reset default SOUL.md to baseline identity text (#3159) 2026-03-26 01:34:27 -07:00
doctor.py feat: add profiles — run multiple isolated Hermes instances (#3681) 2026-03-29 10:41:20 -07:00
env_loader.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
gateway.py fix: make display_hermes_home imports lazy to prevent ImportError during hermes update (#3776) 2026-03-29 15:15:17 -07:00
main.py feat: add MCP server mode — hermes mcp serve (#3795) 2026-03-29 15:47:19 -07:00
mcp_config.py feat: add MCP server mode — hermes mcp serve (#3795) 2026-03-29 15:47:19 -07:00
model_switch.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
models.py feat: add Gemini 3.1 preview models to OpenRouter and Nous catalogs (#3803) 2026-03-29 15:44:07 -07:00
pairing.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
plugins.py feat(plugins): add enable/disable commands + interactive toggle UI (#3747) 2026-03-29 10:39:57 -07:00
plugins_cmd.py feat(plugins): add enable/disable commands + interactive toggle UI (#3747) 2026-03-29 10:39:57 -07:00
profiles.py feat: add profiles — run multiple isolated Hermes instances (#3681) 2026-03-29 10:41:20 -07:00
runtime_provider.py fix(config): accept 'model' key as alias for 'default' in model config (#3603) 2026-03-28 14:55:27 -07:00
setup.py fix: make display_hermes_home imports lazy to prevent ImportError during hermes update (#3776) 2026-03-29 15:15:17 -07:00
skills_config.py fix: add missing mattermost/matrix/dingtalk toolsets + platform consistency tests (salvage #3512) (#3583) 2026-03-28 14:05:02 -07:00
skills_hub.py fix: replace user-facing hardcoded ~/.hermes paths with display_hermes_home() 2026-03-28 23:47:21 -07:00
skin_engine.py refactor: consolidate get_hermes_home() and parse_reasoning_effort() (#3062) 2026-03-25 15:54:28 -07:00
status.py fix: replace hardcoded ~/.hermes paths with get_hermes_home() for profile support 2026-03-28 13:51:08 -07:00
tools_config.py feat: show estimated tool token context in hermes tools checklist (#3805) 2026-03-29 15:36:56 -07:00
uninstall.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
webhook.py fix: replace user-facing hardcoded ~/.hermes paths with display_hermes_home() 2026-03-28 23:47:21 -07:00