Skip to content

fix: preserve hermes mcp add command routing - #17294

Closed
asdigitos wants to merge 5 commits into
NousResearch:mainfrom
asdigitos:fix/mcp-add-command-routing
Closed

fix: preserve hermes mcp add command routing#17294
asdigitos wants to merge 5 commits into
NousResearch:mainfrom
asdigitos:fix/mcp-add-command-routing

Conversation

@asdigitos

Copy link
Copy Markdown

Summary

  • stop hermes mcp add ... from falling back into chat/TUI when --command is omitted
  • store the stdio flag on mcp_stdio_command and keep a back-compat fallback in cmd_mcp_add
  • add regression coverage for parser routing and stdio command handling

Root cause

mcp add defined --command on the same argparse destination used by the top-level subparser (args.command). When --command was omitted for URL-based servers, argparse overwrote the top-level mcp command with None, so Hermes treated the invocation like bare hermes and launched chat.

Test Plan

  • source venv/bin/activate && pytest -q tests/hermes_cli/test_argparse_flag_propagation.py tests/hermes_cli/test_mcp_config.py

- keep the top-level mcp subcommand from being clobbered by --command
- read the new mcp_stdio_command parser dest with back-compat fallback
- add regression tests for parser routing and stdio command handling
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/mcp MCP client and OAuth labels Apr 29, 2026
@teknium1

teknium1 commented May 7, 2026

Copy link
Copy Markdown
Contributor

The mcp dispatch fix here is now shipped in #21204 (commit 4f364c4). Your PR actually identified this bug earliest of the three duplicates (Apr 29) — thank you for that.

The four other commits on this branch are unrelated to the mcp dispatch bug and we'd love to review them, but they need to be separate PRs:

  • ac773dce9 fix: support Slack thread targets in send_message
  • 65893239b fix: accept Slack root channel targets
  • 5b44e5b7e fix: preserve Slack explicit target validation
  • 9226ddb61 fix: tolerate mixed-version tool registry cache

Closing this one because the titular mcp fix is redundant, but please file one PR per commit above (or one "slack send_message target handling" PR for the three Slack fixes + a separate tool-registry-cache PR). Happy to review as soon as you split them. If you'd rather we salvage the four directly and credit you, just leave a comment here.

@teknium1 teknium1 closed this May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/mcp MCP client and OAuth type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants