Bug
In hermes -z (oneshot mode), configured MCP servers can pass hermes mcp test <server> but their tools are missing from the agent's available tool list.
Observed
hermes mcp test camoufox succeeds and discovers 17 tools, including camoufox_status.
But running:
HERMES_HOME=~/.hermes/profiles/quinn hermes -z \
"Call mcp_camoufox_camoufox_status"
reports that mcp_camoufox_camoufox_status was not available.
Cause
hermes_cli/oneshot.py builds AIAgent (via _get_platform_tools(...)) before MCP discovery has registered dynamic MCP toolsets and aliases. The agent's available tool list is resolved at construction time, so tools added later by MCP discovery are never seen.
Local Fix
Running discover_mcp_tools() inline in oneshot.py before resolving platform toolsets fixes it:
cfg = load_config()
if isinstance(cfg.get("mcp_servers"), dict) and cfg.get("mcp_servers"):
from tools.mcp_tool import discover_mcp_tools
discover_mcp_tools()
After this, the same hermes -z call successfully used mcp_camoufox_camoufox_status.
Expected
hermes -z should expose configured MCP tools consistently with hermes mcp test and gateway startup.
Bug
In
hermes -z(oneshot mode), configured MCP servers can passhermes mcp test <server>but their tools are missing from the agent's available tool list.Observed
hermes mcp test camoufoxsucceeds and discovers 17 tools, includingcamoufox_status.But running:
reports that
mcp_camoufox_camoufox_statuswas not available.Cause
hermes_cli/oneshot.pybuildsAIAgent(via_get_platform_tools(...)) before MCP discovery has registered dynamic MCP toolsets and aliases. The agent's available tool list is resolved at construction time, so tools added later by MCP discovery are never seen.Local Fix
Running
discover_mcp_tools()inline inoneshot.pybefore resolving platform toolsets fixes it:After this, the same
hermes -zcall successfully usedmcp_camoufox_camoufox_status.Expected
hermes -zshould expose configured MCP tools consistently withhermes mcp testand gateway startup.