Repository navigation
Description
Bug Description
When starting hermes chat or hermes --tui, HTTP MCP servers (clickup, github, linear — anything using OAuth or Bearer auth over HTTP) show as (http) — failed in the startup banner. The servers actually connect fine within 3–5 seconds, but the banner renders before async MCP initialization completes.
This is a render-timing problem: the banner snapshots MCP connection states while they're still in the "connecting" phase. The servers finish connecting shortly after, but the user's first impression is that their setup is broken.
From agent.log:
WARNING tools.mcp_tool: MCP server 'phpstorm' initial connection failed (attempt 2/3)...
WARNING tools.mcp_tool: MCP server 'phpstorm' failed initial connection after 3 attempts, giving up
INFO tools.mcp_tool: MCP: registered 260 tool(s) from 6 server(s) (1 failed)
Only phpstorm truly failed (needs PhpStorm IDE running). The other 5 (clickup, github, linear, dart-mcp-server, butterfly, gitlab) connected fine. But the banner showed ALL including clickup as "failed".
Steps to Reproduce
- Configure any HTTP MCP server with OAuth or Bearer auth (e.g. clickup, github via githubcopilot, linear)
- Run
hermes chatorhermes --tui - Observe the startup banner — HTTP MCP servers show as
(http) — failed
Wait for the session to fully initialize (3–5s), then check:
hermes mcp list
All servers show as ✓ enabled with tools discovered.
Expected Behavior
The banner should either:
- Show a distinct state like
(http) — connecting...or(http) — pendinginstead offailedfor servers that haven't finished async init yet - Or defer rendering the MCP status section until all servers have resolved (connect or fail)
- Or update the banner dynamically as connections complete
failed should be reserved for cases where startup was attempted and threw/spawn failed.
Actual Behavior
Banner displays clickup (http) — failed for servers that connect successfully moments later. This sends users on a debugging rabbit hole investigating credentials, tokens, and network when there's nothing wrong.
Evidence
$ hermes mcp test clickup
Testing 'clickup'...
Transport: HTTP → https://mcp.clickup.com/mcp
Auth: OAuth 2.1 PKCE
✓ Connected (3452ms)
✓ Tools discovered: 51
$ hermes mcp list
Name Transport Tools Status
clickup https://mcp.clickup.com/mcp all ✓ enabled
github https://api.githubcopilot... all ✓ enabled
linear https://mcp.linear.app/mcp all ✓ enabled
All servers are healthy. The "failed" banner is a false negative.
Related Issues
- cli.py invoked directly bypasses discover_mcp_tools(); banner shows "(stdio) — failed" for unconnected servers #21663: cli.py invoked directly bypasses discover_mcp_tools() (similar banner symptom, different root cause — that issue is about the discovery call never happening)
- TUI v2 feature-parity audit vs v1 CLI: missing overlays, slash commands, @ refs, and curses-command degradation #12130: TUI v2 feature-parity audit (mentions MCP boot status as Tier 1 gap)
- MCP connectivity check resolves server config key as DNS hostname instead of using configured URL #22724: MCP connectivity check resolves config key as DNS hostname (different issue)
Our case is distinct: the hermes wrapper IS calling discover_mcp_tools() correctly (the servers eventually connect and tools are registered), but the startup banner renders before async HTTP connections resolve.
Suggested Fix
In the MCP status rendering path (likely in cli.py or the startup banner code), distinguish between:
failed— spawn was attempted and threw/connection was rejectedconnecting/pending— async init is still in progress (default initial state)connected— handshake complete, tools discovered
For HTTP MCP servers especially, the async connection can take 3–5 seconds due to TLS + OAuth overhead. The banner should not mark these as failed before they've had a chance to complete.
Alternatively, if the calling code can get a future/promise from the connection attempt, the banner could defer rendering the MCP section until all servers have resolved or a timeout elapses.
Operating System
Linux (Kali 6.18.5)
Hermes Version
v0.15.1 (2026.5.29)
Python Version
3.11.15
Additional Context
Full logs confirming:
2026-06-05 19:55:06,933 INFO tools.mcp_tool: MCP: registered 260 tool(s) from 6 server(s) (1 failed)
Only phpstorm failed. clickup, github, linear, dart-mcp-server, butterfly, gitlab — all 6 connected successfully. But the startup banner shown to the user listed all HTTP servers as "failed".
Activity
yong2bba commentedon Jun 6, 2026
Additional reproduction from macOS / Hermes v0.16.0:
Hermes Agent v0.16.0 (2026.6.5) · upstream 15068744failedimmediately at launch, even though they are usable shortly after discovery completes.context7,playwright,lazyweb,oecd,imf,korea_stats,sec_edgar,bok_ecos,penpot,magnific,openosintall displayed asfailed;korean_dartcorrectly displayed asdisabled.Verification that this is a false negative / startup rendering issue rather than actual MCP failure:
Direct MCP tool smoke tests from the same session also succeeded, e.g. Context7 library resolve, Lazyweb health, KOSIS quick stats, OECD categories, and BOK ECOS search.
Timing observation:
So this still appears to be a static startup-banner snapshot racing against async MCP discovery. Slowing down/defering the banner would hide the issue, but the better fix likely needs an explicit
pending/connectingstate or a post-discovery readiness update.failedshould probably only be shown after discovery has resolved for that server.WuFengSheng commentedon Jun 7, 2026
Same issue here on macOS. Every startup shows:
But the servers connect fine ~2-4 seconds later. Logs confirm:
hermes mcp test amap-mapsalso succeeds (connected in 4578ms). The tools work perfectly in-session. The false alarm in the banner is misleading and makes users think something is broken when it isn't.Suggestions:
tkreiner commentedon Jun 12, 2026
I believe I'm having the same issue as reported above, but I'm seeing slightly different symptoms. I'm on a Mac installation. The MCP servers I'm accessing are over a VPN connection. Using
hermes --tui, I see the MCP servers showing at the top in a failed state.Anything I try to do to get Hermes to use the MCP server tools fails. It simply doesn't get the tool context. However, if I issue a
/newcommand and start a new session, then the MCP servers show at a valid status and the use of the tools work as expected.This has felt like a simple timing issue that the UI is loading before the MCP tool definitions have had a chance to fully load.
I have tried extending both
timeoutandconnect_timeoutsettings for the MCP server definitions in the .hermes/config.yaml file and those have appeared to not change the issue.Experienced issue on both versions 0.15.1 and on 0.16.0.
teknium1 commentedon Jul 14, 2026
Implemented on current
mainby later MCP startup/status work. This is an automated hermes-sweeper review.tools/mcp_tool.py:5111-5138now returns distinctconnecting,configured, andfailedstates;failedis reserved for recorded connection errors.hermes_cli/banner.py:764-790rendersconnecting/configuredrather than falling through to redfailed.ui-tui/src/components/branding.tsx:248-268applies the same state handling in the TUI.tui_gateway/server.py:4384-4436refreshes MCP tools that complete discovery before the first turn, addressing the related initial-session availability report.tests/tools/test_mcp_tool.py:125-172andtests/hermes_cli/test_banner.py:171-202.The linked PR #39920 proposed the same status distinction; the current implementation already provides the reported behavior.