Skip to content

fix(dashboard): discover MCP tools on startup - #40407

Closed
kurom1ii wants to merge 3 commits into
NousResearch:mainfrom
kurom1ii:fix/dashboard-mcp-discovery
Closed

fix(dashboard): discover MCP tools on startup#40407
kurom1ii wants to merge 3 commits into
NousResearch:mainfrom
kurom1ii:fix/dashboard-mcp-discovery

Conversation

@kurom1ii

@kurom1ii kurom1ii commented Jun 6, 2026

Copy link
Copy Markdown

Problem

The hermes dashboard command (used by the Hermes Desktop Electron app as its backend process) starts the web UI server without discovering MCP tools. Unlike the CLI chat path which calls _prepare_agent_startup(), the dashboard's cmd_dashboard() function skips this entirely because "dashboard" is not in _AGENT_COMMANDS.

This means MCP servers like github-mcp and codegraph are never connected when the dashboard starts, so the Desktop's AI agent sessions have no MCP tool access until the user manually clicks Reload MCP in Settings.

Fix

Added start_background_mcp_discovery() call from cmd_dashboard() before start_server(), using the same background-thread pattern that _prepare_agent_startup() uses for the chat command. This keeps dashboard startup fast even if an MCP server is slow to respond.

Testing

Before the fix: agent.log showed no MCP discovery during dashboard startup. After the fix:

16:22:45  MCP server 'codegraph' (stdio): registered 10 tool(s)
16:22:45  MCP server 'github-mcp' (HTTP):  registered 48 tool(s)
16:22:45  MCP: registered 58 tool(s) from 2 server(s)

MCP tools now appear in the dashboard/Desktop backend on startup without requiring manual Reload MCP.

@kurom1ii
kurom1ii force-pushed the fix/dashboard-mcp-discovery branch 2 times, most recently from 45a1a1a to 5da6e5e Compare June 6, 2026 10:01
@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 Jun 6, 2026
kurom1ii added 2 commits June 6, 2026 22:33
The dashboard command (used by Hermes Desktop) did not call _prepare_agent_startup(), so MCP tools like github-mcp and codegraph were never discovered. Fix by calling start_background_mcp_discovery() from cmd_dashboard() before start_server(), matching the pattern in _prepare_agent_startup().
- Add  atom + McpServerStatusItem type in session store
- Wire session.info mcp_servers payload into
- Add mcp.status RPC in tui_gateway/server.py
- Display green dot next to connected MCP servers in settings
- Show red 'disconnected' label for unreachable servers
@teknium1

Copy link
Copy Markdown
Contributor

Superseded by PR #44512fix(desktop): discover MCP tools for dashboard /api/ws backends (commit 73969771a, merged June 11), which is now on main and resolves issue #42694.

#44512 implements the same fix this PR proposes: cmd_dashboard() spawns a background MCP discovery thread via hermes_cli.mcp_startup.start_background_mcp_discovery() before start_server(), and tui_gateway.server._make_agent() waits on that thread before snapshotting tools. Verified on current main.

Thanks for the fix — closing as redundant. Credit to you and the other contributors who independently caught this (#42703, #43189, #40407 all targeted the same gap).

@teknium1 teknium1 closed this Jun 28, 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