Skip to content

feat(mcp): turn on MCP servers in Orca - #48972

Open
AmoabaKelvin wants to merge 1 commit into
mainfrom
mcp-turn-on
Open

AmoabaKelvin wants to merge 1 commit into
mainfrom
mcp-turn-on

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

On hold for Kelvin: do not merge, mark ready to merge, or auto-merge. Kelvin decides when MCP servers turn on.

ELI5

MCP servers in Orca have shipped behind an off switch. This removes the switch, so everyone gets Settings → MCP servers, the phone page, the bot Tools switch and the repository section, and their agents get the servers they add.

Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 $\color{#cf222e}{\Huge{\mathbf{−}}}$​121 $\color{#cf222e}{\Huge{\mathbf{−}}}$​99
Prod 36 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​126 $\color{#cf222e}{\Huge{\mathbf{−}}}$​124 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

What Changed

  • ORCA_MCP_SERVERS and isMcpServersFeatureEnabled() are gone. mcp-servers.v1 moves from the dark-switch list into RUNTIME_CAPABILITIES (in a zod-free mcp-servers-capability.ts), so every host advertises it.
  • Each gate keeps its other guard:
    • mcpServers.* no longer refuses with mcp_servers_off, and the code is gone;
    • the bot opt-in needs only the bot's own choice;
    • a teammate's relay env still needs the lead's token;
    • terminals still skip SSH connectionId launches and those with no command or agent;
    • the shared-process relay, plugin sync, agent-file sync and sign-in events run unconditionally.
  • bots.tools.list always carries hostMcpServers.
  • Clients keep gating on the capability, so an older host still hides every MCP servers screen.
  • Docs: a new agents/mcp-servers.mdx (next to Chat UI in the sidebar), an MCP servers entry and a Repository line in settings.mdx, and cli/skills.mdx pointing at Settings → MCP servers.
  • The tests that pinned the gate-off behaviour go with the gate; the rest drop their env toggles.

Why

The final step of the MCP servers plan (fleet task 10/10). Every earlier PR built behind the switch so main stayed exactly as it was until this one.

Linked Issue

N/A: fleet work from the approved MCP servers design; no issue.

Visual Proof

Hidden dev build from this branch with no ORCA_MCP_SERVERS in the environment. Settings → MCP servers is listed under Agents and reads the host's list:

The screens themselves were proven, beside the approved mocks, in #48844 and #48940 (desktop) and #48776 (phone).

Testing

  • 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

  • macOS dev build with no env var: mcpServers.list answers and the Settings page shows the list.

  • Focused tests for the touched modules pass: agent-file sync, session launch, shared process, terminal launch and the bot opt-in RPC.

  • pnpm check:changed passes. No tests were added; the gate-off tests were removed because the state they pinned no longer exists.

Performance

Turning it on adds the work the earlier PRs measured, now for everyone:

  • one host-list read per agent launch;
  • the relay for relayed servers;
  • the plugin sync on plugin changes;
  • the agent-file sync for agents the user consented to.

Nothing new runs on hot paths beyond that.

Risk

This is the switch, so everything in the MCP servers stack reaches users at once:

  • launches with host servers, which add agent flags and env;
  • agent-file writes, but only after consent;
  • the "In your agents" discovery reads.

Older paired hosts keep the feature hidden by capability. To back it out, a revert restores the switch, off by default; servers users added stay in their host files, unused.

Level: High

AI Disclosure

Review

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

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)

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

The MCP server feature switch no longer gates runtime capabilities, RPCs, server synchronization, session and terminal launches, or relay handling. The runtime capability list now includes mcp-servers.v1, and the mcp_servers_off failure code is removed. Documentation now describes host-level MCP server setup and repository controls.

Merge Risk: Moderate · up to 17b2d

Turning MCP servers on for every host makes mcpServers.connect reachable by paired devices. That call can return server bearer tokens and command environment values, and its own comment says only the host's CLI should receive them. Refuse paired-device callers on this path before merging. The rest of the change mostly removes the switch checks and updates tests and docs.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(mcp): turn on MCP servers in Orca" matches the main change. The PR removes the ORCA_MCP_SERVERS off switch (isMcpServersFeatureEnabled and assertMcpServersFeatureEnabled are deleted) a…
Description check Passed The description follows the repository template, and its main sections are filled in. ELI5, What Changed, Why, Visual Proof, Testing, Performance, and Risk all contain content. The Risk section names …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(mcp): turn on MCP servers in Orca" matches the main change. The PR removes the ORCA_MCP_SERVERS off switch (isMcpServersFeatureEnabled and assertMcpServersFeatureEnabled are deleted) and enables MCP servers for all hosts, gated only by the mcp-servers.v1 capability. The title is concise and specific, and a teammate scanning history would understand the primary change.

Full details: Description check

Explanation

The description follows the repository template, and its main sections are filled in. ELI5, What Changed, Why, Visual Proof, Testing, Performance, and Risk all contain content. The Risk section names the riskiest part and gives a back-out path. The Performance section gives a concrete answer. The Linked Issue section says N/A with a reason, but the template says outside contributors must link an issue. The author is an internal fleet contributor, so this may not apply. The AI Disclosure section is empty but is marked as skippable for team members. The final pnpm lint/typecheck/test/build checklist item is unchecked, and the description says CI will cover it. The PR is also marked on hold, which the description states explicitly. Overall the description is mostly complete.

Resolution

Optional: confirm the N/A linked-issue reason is accepted, and either check the unchecked pnpm lint/typecheck/test/build item or state that CI will cover it. Also state the reviewer or maintainer sign-off if required by the hold note.

  • 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.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5aa781f2-a2b3-4b42-af49-f7e676a88325
Commits

Reviewing files that changed from the base of the PR and between 67e3217 and c6fbcf1.

Files selected for processing: 18

  • docs/site/content/docs/cli/skills.mdx
  • src/cli/mcp/mcp-connect.ts
  • src/main/core-desktop/desktop-core-composition.ts
  • src/main/mcp-servers/agent-files/mcp-agent-file-sync.test.ts
  • src/main/mcp-servers/agent-files/mcp-agent-file-sync.ts
  • src/main/mcp-servers/session-mcp-launch.performance.test.ts
  • src/main/mcp-servers/session-mcp-launch.ts
  • src/main/mcp-servers/shared-process/shared-mcp-processes.ts
  • src/main/mcp-servers/terminal/agent-teams-teammate-mcp-env.ts
  • src/main/mcp-servers/terminal/terminal-mcp-launch.performance.test.ts
  • src/main/mcp-servers/terminal/terminal-mcp-launch.ts
  • src/main/orcad/host-runtime/orcad-managed-agent-hooks.ts
  • src/main/plugins/contributions/plugin-mcp-server-sync.ts
  • src/main/runtime/rpc/methods/mcp-servers-import.ts
  • src/main/runtime/rpc/methods/mcp-servers.ts
  • src/main/runtime/rpc/server/runtime-rpc-mobile-mcp-server-methods.ts
  • src/shared/bot-tools.ts
  • src/shared/mcp-servers/mcp-servers.ts
Files with no reviewable changes: 5

  • src/main/mcp-servers/session-mcp-launch.performance.test.ts
  • src/main/mcp-servers/shared-process/shared-mcp-processes.ts
  • src/main/mcp-servers/terminal/terminal-mcp-launch.performance.test.ts
  • src/main/runtime/rpc/methods/mcp-servers.ts
  • src/shared/mcp-servers/mcp-servers.ts
Files skipped from review as they are similar to previous changes: 2

  • src/main/runtime/rpc/methods/mcp-servers-import.ts
  • src/shared/bot-tools.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

})
)
// Grok's, Cursor's and Droid's own MCP files follow this host's list; off with its switch.
// Grok's, Cursor's and Droid's own MCP files follow this host's list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

This comment is about line 67, outside the diff; it is anchored on the nearest change, line 74.

Start MCP file sync only after login-shell agent homes are adopted.

startMcpAgentFileSync() runs as soon as readiness is published, and its first run() builds the Grok config target from process.env.GROK_HOME. adoptLoginShellAgentHomes() may still be pending at that point, and it writes GROK_HOME only after its login-shell probe completes. When GROK_HOME is set only in the login shell, that first sync can write ~/.grok/config.toml instead of the configured home. Adoption does not trigger a later sync, so the wrong target can persist until the next host-list change.

Make the sync wait for adoption before the first run. For example, chain the sync start on the adoption promise, or pass the adopted environment into startMcpAgentFileSync. Confirm the chosen ordering keeps the existing readiness behavior.

Every host now serves mcpServers.* and advertises mcp-servers.v1, so
Settings › MCP servers, the phone's page, the bot Tools switch and the
repo section show wherever the host is new enough, and sessions get the
host's servers. The ORCA_MCP_SERVERS switch and its gate-off paths are
gone; older hosts still hide the feature by capability. The MCP servers
docs page and the Settings lines that point to it go out with it.
@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · No code blockers were found; keep the PR on hold until Kelvin authorizes the rollout.RetriggerView in GreptileConfidence Score: 5/5

[High impact] No code blockers were found; keep the PR on hold until Kelvin authorizes the rollout.

Summary

Turns on host-managed MCP servers by removing ORCA_MCP_SERVERS and advertising mcp-servers.v1 from every updated host.

  • Compatible clients can now find and use the host’s MCP server settings.
  • Chats and fresh supported terminals can now receive host MCP servers.
  • People can now choose whether each bot uses host MCP servers.
  • Consented agent files can now stay in sync with the host MCP list.
  • Approved plugin servers can now sync into the host MCP list.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  H[Updated host] --> C[Advertises MCP capability]
  C --> U[Desktop and phone show settings]
  U --> L[Host server list]
  L --> G[Agent and workspace choices]
  G --> S[New chats and terminals]
  L --> B[Bot opt-in]
  B --> S
  L --> A[Agent-file consent]
  A --> F[Managed entries in agent files]
Loading

Reviews (1) · Last reviewed commit: "feat(mcp): turn on MCP servers in Orca" · Reviewed by Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b66279c-2db2-4ea0-9d80-5204c188fe81
Commits

Reviewing files that changed from the base of the PR and between 24c7b1e and 17b2d64.

Files selected for processing: 5

  • src/main/core-desktop/desktop-core-composition.ts
  • src/main/mcp-servers/session-mcp-launch.ts
  • src/main/plugins/contributions/plugin-mcp-server-sync.ts
  • src/main/runtime/rpc/methods/bots-tools.ts
  • src/main/runtime/rpc/methods/mcp-servers.ts
Files skipped from review as they are similar to previous changes: 1

  • src/main/core-desktop/desktop-core-composition.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant