mcp: add persistent server enablement scopes#326251
Open
connor4312 wants to merge 2 commits into
Open
Conversation
Persist profile and workspace enablement for agent-host-only MCP servers while keeping session overrides independent. Apply durable changes immediately before turns and group profile, workspace, and session actions consistently. Fixes #326167 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds persistent profile/workspace enablement for agent-host MCP servers while preserving session-level controls.
Changes:
- Persists durable MCP enablement and applies changes before turns.
- Unifies profile, workspace, and session actions.
- Adds exact local-server matching and focused tests.
Show a summary per file
| File | Description |
|---|---|
.github/skills/sessions/SKILL.md |
Documents structured MCP tracking. |
src/vs/sessions/AI_CUSTOMIZATIONS.md |
Documents enablement scopes and reconciliation. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostCustomizationHarness.test.ts |
Updates customization-service mock. |
src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.ts |
Adds storage injection and tracking cleanup. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.ts |
Implements durable enablement and turn preparation. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts |
Prepares MCP state before dispatch. |
src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.ts |
Adds scoped enablement actions and exact matching. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts |
Tests pre-turn preparation. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostCustomizationService.test.ts |
Tests persistence and reconciliation behavior. |
src/vs/workbench/contrib/chat/test/browser/aiCustomization/mcpListWidget.test.ts |
Tests action composition and scopes. |
src/vs/workbench/contrib/mcp/browser/mcpCommands.ts |
Adds scoped server-option actions. |
src/vs/workbench/contrib/mcp/test/browser/mcpCommands.test.ts |
Tests unambiguous server correlation. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 4
- Review effort level: Medium
Contributor
|
Base:
|
Use the Sessions-aware active project root for workspace action visibility and include the session working directory in workspace-scoped agent-host MCP preferences. Keep profile preferences shared across repositories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
approved these changes
Jul 17, 2026
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.
Fixes #326167
Summary
Validation
npm run typecheck-clientnpm run valid-layers-checknpm run precommit