Add cross-harness MCP server manager
What Changed
Adds a Settings → MCP page that inventories the MCP servers each harness loads on every connected computer, and lets one be switched off without hand-editing config files.
- Contracts:
mcpInventory.ts(McpServerInventoryEntry,McpServerInventory,McpServerEnabledPatch) and anEnvironmentMcpServersHttpApigroup —GET /api/mcp-servers(orchestration read scope) andPOST /api/mcp-servers/enabled(operate scope).disabledMcpServersis added toClaudeSettingsandCodexSettings. - Server:
apps/server/src/mcpServers/— Claude discovery reads.claude.jsondirectly (the CLI's ownclaude mcp listhealth-checks every server over the network, far too slow for a settings page); Codex discovery shells out tocodex mcp list --json, which already reports theenabledflag Codex honours natively, so no TOML parser is needed. - Enforcement at session launch: Claude gets
strictMcpConfigplus an explicit server map (configured servers minus disabled, plust3-code) — only once something is actually disabled, so a gap in the reader can never silently drop a server the CLI would have loaded. Codex gets-c mcp_servers.<name>.enabled=falseoverrides alongside the existingt3-codeargs, leavingconfig.tomluntouched. - Web:
McpServersSettingspage +/settings/mcproute + sidebar entry, and a@t3tools/client-runtime/state/mcpfetch/toggle helper. - Server
envvalues are never returned to clients — those blocks routinely hold API keys and this endpoint is reachable remotely.
Cursor, Grok, and OpenCode are deliberately out of scope: they run over ACP, which can add MCP servers to a session but has no lever to suppress the ones the agent loads from its own config. Listing them without a working switch would be misleading.
Structure follows #4630 (cross-harness skill manager) file-for-file — same inventory-endpoint + settings-page shape.
Why
T3 Code already acts as an MCP server (it injects t3-code into every session), but has no view of the servers the underlying CLIs load, and no way to turn one off. Today that means editing ~/.claude.json or ~/.codex/config.toml by hand — on a machine that is often being driven remotely through this exact GUI. MCP tool definitions also cost context on every turn, so switching off servers you are not using is worth doing per project.
Storing the disabled list (rather than an allow-list) keeps "a newly added server is on by default" true, and keeps the toggle out of the user's own config files.
Explicitly not included: a marketplace or install flow. Installing an MCP server means running an arbitrary command, and a one-click installer on a remotely reachable GUI is remote code execution with a trust model this app does not currently own.
UI Changes
New settings page: server list grouped by harness with transport badge, command line, config path, and an enable/disable switch. Screenshots of the page (all servers enabled, and one toggled off) are being attached in a follow-up comment — the page is new, so there is no "before" state.
Validation
vp test run apps/server/src/mcpServers apps/server/src/provider/Layers/ClaudeAdapter.test.ts apps/server/src/provider/Layers/codexLaunchArgs.test.ts apps/web/src/components/settings/McpServersSettings.test.tsvp run --filter t3 typecheck,vp run --filter @t3tools/web typecheck,vp run --filter @t3tools/contracts typecheck,vp lint- Manually through the web dev environment: paired, opened Settings → MCP, saw both Claude servers from
~/.claude.json, toggled one off, and confirmeddisabledMcpServerspersisted touserdata/settings.json. - Pre-existing unrelated failures on Windows in
ProviderInstanceRegistryLive.test.ts(POSIX path assertions) reproduce on a clean tree.
Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] I included before/after screenshots for any UI changes — attaching in a follow-up comment
- [ ] I included a video for animation/interaction changes
[!NOTE] Medium Risk Touches authenticated remote APIs and session MCP wiring; Claude intentionally skips disable enforcement when config reads are incomplete, which can surprise users who expect toggles to always apply.
Overview Adds a cross-harness MCP server manager: contracts and HTTP (
GET /api/mcp-servers,POST /api/mcp-servers/enabled), server discovery inapps/server/src/mcpServers/, and a Settings → MCP page with search, per-environment lists, and enable/disable switches.Discovery reads Claude
.claude.json(user/local scopes plus approved.mcp.jsonproject servers) and runscodex mcp list --jsonfor Codex. Inventory rows redact secret-looking stdio args and mark Claude rows non-toggleable when config is incomplete.Persistence adds hidden
disabledMcpServerson Claude/Codex settings; toggles patch explicitproviderInstancesor legacyproviders.*blobs viaplanDisabledMcpServersWrite, using newupdateSettingsWithfor locked read-modify-write.Session launch: when anything is disabled, Claude enables
strictMcpConfigand passes an explicit filteredmcpServersmap (plust3-code); if config cannot be read fully, it falls back to CLI resolution so disables may not apply that run. Codex adds-c mcp_servers.<name>.enabled=falseoverrides alongside existingt3-codeapp-server args.Cursor/Grok/OpenCode are intentionally omitted from inventory (no suppress lever over ACP).
Reviewed by Cursor Bugbot for commit 15be076e8808d2ef524d6e41a2b8af5f0e67e9b1. Bugbot is set up for automated code reviews on this repo. Configure here.
[!NOTE]
Add cross-harness MCP server manager with inventory API and settings UI
- Adds
McpServerInventorydiscovery for Claude and Codex providers, reading MCP server configs across scopes (user, project, local) and spawningcodex mcp list --jsonfor Codex instances.- Adds two HTTP endpoints under
EnvironmentHttpApi:GET /api/mcp-serversto list all MCP servers andPOST /api/mcp-servers/enabledto toggle a server's enabled state.- Introduces a
/settings/mcproute andMcpServersSettingsUI with per-environment inventory display, search/filter, grouped server rows, and optimistic enable/disable toggles.- Integrates MCP filtering into
ClaudeAdapterandCodexAdapter: when servers are disabled, Claude setsstrictMcpConfigand passes a filtered server map; Codex forwards-c mcp_servers.<name>.enabled=falseTOML overrides.- Adds
disabledMcpServersarray field toClaudeSettingsandCodexSettingsschemas, and a newupdateSettingsWithatomic read-modify-write method toServerSettingsService.- Risk: Claude MCP filtering silently falls back to CLI resolution if any config file is unreadable, which may result in servers appearing enabled that the user intended to disable.
Macroscope summarized 15be076.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
767524e5-59d6-455a-8c78-3478190ea5afYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
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.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Needs human review
This PR introduces a new feature for cross-harness MCP server management, including new HTTP API endpoints, a new settings UI page, new contracts, and changes to how Claude and Codex sessions filter MCP servers at launch. The scope and behavioral impact warrant human review.
You can customize Macroscope's approvability policy. Learn more.
Closing in favor of #2829 (orchestration V2).
#2829 deletes the V1 orchestration layer this PR builds on — apps/server/src/orchestration/**, provider/Layers/*Adapter.ts and provider/Services/** are removed and replaced by apps/server/src/orchestration-v2/**, with the IPC surface renamed to ORCHESTRATION_V2_WS_METHODS. The files this PR touches either no longer exist or are rewritten, so it can't be rebased — it would need reimplementing against the V2 adapters.
This is not a judgement on the change itself. Several of these are real gaps we still want fixed; the base just moved out from under them.
Once #2829 merges, please rebase onto main, port the change to the V2 equivalent, and reopen (or open a fresh PR). Ping me and I'll prioritise the review.