{{ message }}
Repository navigation
refactor(cli): hermes mcp serve leaves core for the mcp-serve plugin - #142556
Merged
Merged
Conversation
…plugin `hermes mcp serve` (mcp_serve.py) moves to the official mcp-serve plugin in hermes-official-plugins, which registers `hermes mcp-serve` and also carries the `--tools` mode from #83364. - delete mcp_serve.py and tests/test_mcp_serve.py (the suite moved with it) - drop the serve subparser, its dispatcher branch, the mcp agent-subcommand row and the inline MCP discovery path only `mcp serve` reached - LEFT_CORE row (command + old_command): `hermes mcp serve` and a bare `hermes mcp-serve` without the plugin print the new spelling and the install line on stderr. MCP clients live outside Hermes, so no home shows the feature in use and nothing installs automatically. - docs, locale tips and the bundled cli-reference point at the plugin agent/transports/hermes_tools_mcp_server.py stays: the codex_app_server runtime launches it as its hermes-tools MCP server.
૮ >ﻌ< ა ci reviewran on 6835110 — refactor(mcp): Hermes as an MCP server leaves core for the m debug infoCI timingsCI timings · View report · View jobWall time 8m5s vs 7m55s (+2.1%). 10 job(s) slower, 9 faster,
|
[Medium impact] Appears safe to merge; no actionable correctness or structural regressions were found.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

hermes mcp serve(Hermes as an MCP server) leaves core for the official mcp-serve plugin, which registershermes mcp-serveand adds the--toolsmode from #83364. The old spelling now prints the new one plus the install line.Changes
mcp_serve.pyandtests/test_mcp_serve.py. The code and its 80 tests moved tohermes-official-plugins/mcp-serve.hermes_cli/subcommands/mcp.py,hermes_cli/mcp_config.py: removed theservesubparser, its dispatcher branch and its usage line. Also dropped the--accept-hooksflag onhermes mcp, because nomcpsubcommand runs hooks any more.hermes_cli/main.py: removed themcprow from_AGENT_SUBCOMMANDS, along with the synchronous inline MCP-discovery branch and_command_has_dedicated_mcp_startup.mcp servewas the only command that reached them;None/chat/rluse background discovery andacp/gateway/cronhave their own.hermes_cli/left_core_migration.py: newcommand+old_commandfields and anmcp-serverow.moved_command_hinthandles two cases:hermes mcp serve(with any flags) exits 2 and prints on stderr, never on stdout (the MCP wire):Hermes as an MCP server moved out of core into the 'mcp-serve' plugin: `hermes mcp serve` is now `hermes mcp-serve`. Install it with: `hermes plugins install mcp-serve`.The install sentence is dropped when the plugin is already installed.hermes mcp-servewithout the plugin says it is not loaded and gives the install line.hermes_cli/console_engine.py: removed the blocked("mcp", "serve")pair.cli-commands.md,hooks.md, the bundledhermes-agentskill's cli-reference,plugins/AGENTS.md(the new row fields), and thet072tip in all 17 locales (hermes mcp-serve).Migration: hint only, no automatic install
MCP clients that run
hermes mcp serve(Claude Desktop, Claude Code, Cursor) keep their config outside Hermes. No profile home records that the feature is in use, so the row'sin_useis always False:hermes updateand agent start never install the plugin. The first time a client launches the old command, its stderr log shows the new spelling and the install command. The user installs the plugin and changes the client's args to["mcp-serve"]. The ten tool names and parameters are unchanged.What stays in core, and why
agent/transports/hermes_tools_mcp_server.pystays. The codex_app_server runtime launches it as itshermes-toolsMCP server:codex_runtime.py,codex_app_server*.pyandcodex_runtime_plugin_migration.pyimportHERMES_TOOLS_MCP_SERVER_NAME, and the migration writespython -m agent.transports.hermes_tools_mcp_serverinto~/.codex/config.toml. It is runtime plumbing, not the user-facing serve command. The plugin's--toolskeeps its own allowlist instead of importing it.hermes mcp add/list/test/...,tools/mcp_tool*.py) stays: that is Hermes connecting to MCP servers.Validation
scripts/run_tests.shon the 6 touched/affected filesscripts/run_tests.shon the 19 files referencing left-core / mcp parser / startup / consoletest_old_mcp_serve_spelling_names_the_plugin_commandon base (left_core_migration.py+subcommands/mcp.pyswapped to main)python scripts/checkHERMES_HOME, no plugin:hermes mcp servehermes mcp servehermes mcp-servewith no pluginhermes plugins install mcp-serve"file://…#mcp-serveon this branch, real MCP client over stdioconversations_list/messages_readreturn the seeded conversation;--toolsadds 5 available allowlisted tools,skills_listdispatchesOrder
The plugin and its catalog entry have landed: NousResearch/hermes-official-plugins#133 (merge
6389dd08c1e4) and #142545 (plugin-catalog/mcp-serve.yaml, pinned to that commit). This PR goes last. The hint names the plugin by its catalog name, so it resolves now.#83364 is closed with a pointer to the plugin: its
--toolsmode ships there, with the safety limits listed in the plugin's README.Infographic