You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(mcp): list a chat's MCP servers in the /mcp tray before its first message - #50908
Open /mcp in a new chat and you now see the MCP servers it will get, before you send anything. Until now the tray only said "Connect when you send your next message" and listed nothing.
Before the first message, the /mcp tray lists the chat's servers under the "Connect when you send your next message" line:
Orca rows come from the same resolver delivery uses, for that agent and workspace. Plugin servers are included. Names the agent's own config already has are skipped, as delivery skips them. A server Orca signs in to that is signed out shows "Needs sign-in". The group is hidden when Claude's org settings block Orca's servers or the agent ignores a session's servers.
The agent's own rows (User, Local, Project) come from the agent-config readers, on the account folder the next turn launches on. Disabled servers show as disabled, including Claude's per-folder /mcp disable list.
Claude: the host now answers not-running with an optional servers list. Older clients ignore it and keep the hint.
Codex: at rest it already lists its own servers through a short-lived app-server. The Orca rows that list was missing are now added.
ACP agents and Pi: these have no /mcp of their own. With MCP servers on, the host now offers /mcp for every agent.
At rest they list as above.
While running, they list what Orca delivered at launch plus their own servers, with a new neutral row status unreported. Under the header (which keeps its sign-in counts) a line says " doesn't report connection status", on desktop and phone.
After the first message, Claude and Codex rows switch to live status as before, because the tray already re-reads when the agent starts.
A disabled server reads "Disabled" on both desktop and phone (the phone used to say "Off"; it now reuses the desktop's translations).
Beside an Orca group, the agent's unlabeled servers get the agent's name as a heading (CODEX), so they don't read as Orca's.
Orca already knows before launch which servers a chat will get, and its readers know the agent's own. Building the list on the host means desktop, phone and remote hosts all get it from one place. #50062 added a third .mcp.json reader for Claude only; this reuses the launch resolver and the existing readers instead.
Linked Issue
Part of the MCP servers in Orca work. Supersedes #50062.
Visual Proof
Approved mock (live tray) vs this PR before the first message. Desktop shots are from a hidden dev build with ORCA_MCP_SERVERS=1: three host-list servers (two need sign-in, one command), a scratch repo with .mcp.json and opencode.json. Phone shots render the real phone tray component in a phone-width web harness with the same rows the host returned.
Desktop
Dark
Light
Mock (d14)
Before: Claude at rest
After: Claude at rest
After: Codex at rest
After: OpenCode (ACP) at rest
After: OpenCode (ACP) running
Phone
Dark
Light
Mock
Claude at rest
Codex at rest
OpenCode at rest
OpenCode running
Testing
macOS, hidden dev build with ORCA_MCP_SERVERS=1:
Fresh Claude, Codex and OpenCode chats list Orca rows plus their own before the first message.
After one message, Claude's tray switched to live status in place (Orca rows reported by Claude).
A running OpenCode chat lists its delivered and own rows as unreported.
A "enabled": false OpenCode entry shows Disabled.
Switch off, so gate-off equals main: same profile relaunched without ORCA_MCP_SERVERS.
A fresh Claude chat's tray shows only "Connect when you send your next message".
OpenCode offers no /mcp.
In code, the handler returns before any new work unless isMcpServersFeatureEnabled() (knows), and mcpServers is added to the agents list only with the switch on. Orca-source rows, unreported and not-running.servers only come from a host with the switch on.
pnpm check:changed passes. The existing agent-own-mcp-server-names test covers the refactored config read.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
No test added: this is UI and RPC wiring, proven live above. The config-read refactor keeps delivery's names identical and is covered by the existing test.
Performance
Only with ORCA_MCP_SERVERS=1, and only when a tray asks while the agent can't list its servers. That means on open, on /mcp, and when the agent starts or stops, never on a timer.
Each read does one host-list read, one config read per agent file location, and sign-ins only for the rows shown.
Claude's user file is read only for this folder's block, which also trims the existing launch-time name read.
A running Claude or Codex answer returns before any of this.
One credential-store read is baselined, as mcpServers.list is.
Risk
Level: Low. Everything new sits behind ORCA_MCP_SERVERS, and only mcp-turn-on (#48972, held) turns it on.
Riskiest part: an older desktop or phone talking to a new host with the switch on. It ignores servers and keeps the hint. An unreported row shows as a name with no status. Nothing breaks.
The read path never writes agent files.
Bot chats keep main's behaviour.
Back out with a plain revert.
AI Disclosure
Review
src/main/mcp-servers/session-mcp-at-rest.ts is the new decision.
structured-agent-session-mcp.ts is the gate.
Follow-ups are listed under Notes.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Host-side, so remote hosts and phones get the same list.
No new paths, processes or shell code.
Follow-ups, not in this PR:
OMP's own servers aren't listed yet: its reader needs the launch-time version probe.
The at-rest config read uses the host env plus Claude's account folder, not each agent's settings env overlay or ACP account home.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
Structured-session MCP responses can include known server rows when an agent cannot provide a complete list. The result protocol and panel state support not-running server lists and unreported connection status. The MCP feature flag affects registered-agent capabilities and whether known-server augmentation applies. Desktop and mobile trays display these results with agent-specific status messages and source labels. Status text and translations were updated for disabled, unreported, and sign-in-required servers.
Merge Risk: Low · up to 559aa
The /mcp tray can occasionally hide a configured server or show the wrong status for a disabled Orca bridge. These are small display issues and do not block merging, but owners should follow up.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the /mcp tray now lists a chat's MCP servers before its first message. The changeset adds host-side server listing (session-mcp-at-rest, agent-config readers, mobile a…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template and covers the ELI5, What Changed, Why, Visual Proof, Testing, Performance, Risk, Review, Notes, and Checklist sections. It explains the feature (listin…
Full details: Title check
Explanation
The title names the main change: the /mcp tray now lists a chat's MCP servers before its first message. The changeset adds host-side server listing (session-mcp-at-rest, agent-config readers, mobile and desktop tray rendering) that matches this. The title uses the conventional feat(mcp) prefix and stays concise.
Full details: Description check
Explanation
The description follows the repository template and covers the ELI5, What Changed, Why, Visual Proof, Testing, Performance, Risk, Review, Notes, and Checklist sections. It explains the feature (listing a chat's MCP servers in the /mcp tray before the first message), the mechanism (host-side resolver and agent-config readers), the gating behind ORCA_MCP_SERVERS, and the backout path (plain revert). Visual proof is provided with before/after images for desktop and phone. The Linked Issue section says the work is part of the MCP servers effort and supersedes #50062 but does not contain a 'Fixes #' issue link, which the template says should always exist for outside contributors. The AI Disclosure section is empty. The Level field is filled in as Low. The Performance section is complete. Minor gaps: no issue is linked, and the AI Disclosure section is blank, though the template says it can be skipped for internal team members.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Files skipped from review as they are similar to previous changes: 1
mobile/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Track Orca ownership per scoped entry.
If a user entry and a project entry share a name, and only one is an Orca bridge, this set marks both entries as Orca-owned. knownRows then excludes the non-bridge entry too. The configured server disappears from the tray.
Use the same scope/projectPath/name identity that knownRows uses, or attach ownership to each entry. Keep the name-only collections for delivery deduplication.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Preserve disabled state for Orca bridge rows.
If an Orca bridge entry has enabled: false or disabled: true, agentOwnMcpConfig still records its host name in bridged. This branch excludes the entry before checking entry.disabled. For a non-OAuth host server, orcaRows then displays not-started or unreported instead of disabled.
Carry the bridge's disabled state into its Orca row. Keep its name reserved so delivery does not add a duplicate server.
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
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.
ELI5
Open
/mcpin a new chat and you now see the MCP servers it will get, before you send anything. Until now the tray only said "Connect when you send your next message" and listed nothing.Based on #50062 by @hishikit.
What Changed
/mcptray lists the chat's servers under the "Connect when you send your next message" line:/mcp disablelist.not-runningwith an optionalserverslist. Older clients ignore it and keep the hint./mcpof their own. With MCP servers on, the host now offers/mcpfor every agent.unreported. Under the header (which keeps its sign-in counts) a line says " doesn't report connection status", on desktop and phone.!transport.sessionPending) instead of asking too early and showing "Update Orca".Why
Orca already knows before launch which servers a chat will get, and its readers know the agent's own. Building the list on the host means desktop, phone and remote hosts all get it from one place. #50062 added a third
.mcp.jsonreader for Claude only; this reuses the launch resolver and the existing readers instead.Linked Issue
Part of the MCP servers in Orca work. Supersedes #50062.
Visual Proof
Approved mock (live tray) vs this PR before the first message. Desktop shots are from a hidden dev build with
ORCA_MCP_SERVERS=1: three host-list servers (two need sign-in, one command), a scratch repo with.mcp.jsonandopencode.json. Phone shots render the real phone tray component in a phone-width web harness with the same rows the host returned.Desktop
Phone
Testing
macOS, hidden dev build with
ORCA_MCP_SERVERS=1:"enabled": falseOpenCode entry shows Disabled.Switch off, so gate-off equals main: same profile relaunched without
ORCA_MCP_SERVERS./mcp.isMcpServersFeatureEnabled()(knows), andmcpServersis added to the agents list only with the switch on. Orca-source rows,unreportedandnot-running.serversonly come from a host with the switch on.pnpm check:changedpasses. The existingagent-own-mcp-server-namestest covers the refactored config read.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
No test added: this is UI and RPC wiring, proven live above. The config-read refactor keeps delivery's names identical and is covered by the existing test.
Performance
Only with
ORCA_MCP_SERVERS=1, and only when a tray asks while the agent can't list its servers. That means on open, on/mcp, and when the agent starts or stops, never on a timer.mcpServers.listis.Risk
Level: Low. Everything new sits behind
ORCA_MCP_SERVERS, and onlymcp-turn-on(#48972, held) turns it on.serversand keeps the hint. Anunreportedrow shows as a name with no status. Nothing breaks.AI Disclosure
Review
src/main/mcp-servers/session-mcp-at-rest.tsis the new decision.structured-agent-session-mcp.tsis the gate.Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)