fix(dashboard): discover MCP tools at startup so TUI sessions have them available - #42704
Closed
oreoluwa wants to merge 1 commit into
Closed
fix(dashboard): discover MCP tools at startup so TUI sessions have them available#42704oreoluwa wants to merge 1 commit into
oreoluwa wants to merge 1 commit into
Conversation
…em available
The `hermes dashboard` path (web_server.py) never called `discover_mcp_tools()`
at startup, so MCP server tools were never registered in the dashboard process.
Every other entrypoint (tui_gateway/entry.py) already does this correctly —
the dashboard was simply missed.
Without discovery, `validate_toolset("hospitable")` returns False because the
`"hospitable" -> "mcp-hospitable"` alias is never registered, and all MCP tools
are silently dropped from every TUI session's tool list.
The fix mirrors entry.py exactly: start a daemon thread at lifespan startup
that calls `discover_mcp_tools()`, guarded so it only runs when MCP servers
are configured.
Contributor
|
Thanks for identifying the dashboard MCP-discovery gap. This is now redundant; automated hermes-sweeper review verified the complete fix on current
The duplicate cross-reference to #43189 aligns with this result; that PR's maintainer discussion records #44512 as the superseding implementation. |
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.
Problem
When running
hermes dashboard, the dashboard process (web_server.py) never callsdiscover_mcp_tools()at startup. This means MCP server tools are never registered in the process, and every TUI session launched from the dashboard has an empty MCP tool list regardless of which MCP servers are configured.The root cause:
get_tool_definitions()resolves an MCP server name (e.g."my-server") by looking up the"my-server" → "mcp-my-server"alias thatdiscover_mcp_tools()registers. Without discovery,validate_toolset()returnsFalsefor every MCP server name and the tools are silently dropped.Every other entrypoint already handles this correctly —
tui_gateway/entry.pystarts a daemon thread for MCP discovery at startup. But it appears the dashboard was simply missed.Fix
Mirror what
entry.pydoes: start a daemon thread in_lifespanthat callsdiscover_mcp_tools(), guarded so it only runs when MCP servers are actually configured.Behaviour after fix
MCP tools are discovered within ~1 second of dashboard startup (before any WebSocket session connects), so all TUI sessions get the full MCP tool list for every configured server without any manual
/reload-mcpcall.🤖 Generated with Claude Code