Feature: Support VS Code user-profile `mcp.json` for `--global` scope
Summary
Issue #637 named VS Code user-profile mcp.json as in-scope for --global MCP installation. However, the implementation in PR #638 marks VS Code as workspace-only (supports_user_scope = False) because the current VS Code adapter only writes to .vscode/mcp.json (project-local).
VS Code does support a user-level MCP configuration path (e.g. ~/.config/Code/User/settings.json or the VS Code user-profile mcp.json), but the adapter does not currently implement this.
Proposed Change
- Investigate the correct user-profile MCP configuration path for VS Code (varies by platform: Linux, macOS, Windows).
- Add a
user_scope_config_pathproperty (or similar) toVSCodeClientAdapterthat returns the user-level config path. - Set
supports_user_scope = TrueonVSCodeClientAdapteronce the user-profile path is implemented. - Add tests for the new behavior.
Context
- Parent issue: #637
- Related PR: #638 (marks VS Code as workspace-only as a pragmatic scope cut)
- The Copilot CLI and Codex CLI adapters already support user scope via
~/.copilot/and~/.codex/respectively.
Labels
enhancement
Triage decision
needs-design
Proposed labels
theme/portability
area/mcp-config
area/multi-target
type/feature
status/needs-design
Milestone
null
Suggested next action
Document the exact user-profile MCP config paths for VS Code, VS Code Insiders, and VS Codium on Windows/macOS/Linux, decide which variants APM will support, and post that table as a design comment before implementation begins.
Suggested issue comment
This is a natural extension of the work in #637/#638 and the direction is right -- `--global` for VS Code should write to the user-level MCP config, not just the project-local `.vscode/mcp.json`.
The implementation blocker is cross-platform path resolution. VS Code user-profile MCP config paths differ by platform and by VS Code variant:
- **VS Code (stable):** `~/Library/Application Support/Code/User/mcp.json` (macOS), `%APPDATA%\Code\User\mcp.json` (Windows), `~/.config/Code/User/mcp.json` (Linux)
- **VS Code Insiders:** similar paths with `Code - Insiders` instead of `Code`
- **VS Codium:** similar paths with `VSCodium`
Before implementing `get_user_mcp_config_path()` in the VS Code adapter, we need to decide:
1. Which variants does APM support for `--global` scope? (stable only? Insiders? Codium?)
2. How does APM detect which variant is installed? (check paths in order? Require explicit `--client` flag?)
3. What is the fallback when none of the expected paths exist?
Once those questions are answered in a design comment here, the implementation is straightforward and follows the existing multi-target adapter pattern. The path security requirement (validate with `ensure_path_within`) is non-negotiable regardless of which paths are chosen.
Per-lens notes (collapsed)
DevX UX Expert -- User-Need Reviewer
The user task is "install an MCP server once and have it available across all VS Code projects." This maps directly to the --global scope concept. The request is clearly grounded in how VS Code itself separates user-profile settings from workspace settings. The gap (supports_user_scope = False in the current adapter) was a known shortcut in PR #638; this issue is the natural follow-up.
Supply Chain Security Expert -- Risk-Surface Reviewer
Writing to the VS Code user-profile MCP config is higher blast-radius than project-local: a misconfigured or malicious entry affects all VS Code projects on the machine. The implementation must use ensure_path_within path guards when resolving the user config path, validate MCP config before writing, and not follow symlinks out of the expected config directory. theme/portability is primary (cross-OS path resolution); a secondary theme/security concern exists but is addressed by the existing path-security framework.
OSS Growth Hacker -- Contributor-Tone Reviewer
Not activated -- sergio-sisternes-epam is an established collaborator with extensive prior interactions on microsoft/apm; warmth tuning for a new contributor is not needed.
Python Architect -- Architecture Reviewer
The design question is concrete: what are the exact user-profile MCP config paths for each VS Code variant on each platform, and which does APM support? The implementation pattern is well-understood (add get_user_mcp_config_path() to the VS Code adapter, flip supports_user_scope = True). The risk is getting the platform-specific path table wrong. status/needs-design is the right call: a design comment with the confirmed path table should precede the PR to avoid multiple rounds of cross-platform correction.
Doc Writer -- Documentation Reviewer
Implementing --global scope for VS Code will require updating the VS Code installation guide and the CLI reference for the --global flag. area/docs-site as a secondary area is warranted -- but since this is needs-design, deferred until the design is settled. The implementing PR must include doc updates.
APM CEO -- Triage Arbiter
Sound direction, non-trivial cross-platform path resolution. The Python Architect's needs-design recommendation is correct: getting the VS Code variant path table wrong would ship a broken feature and require a fast follow-up release. Spend the design cost upfront. No milestone until design is settled.
{
"decision": "needs-design",
"decision_detail": "Enumerate exact user-profile MCP config paths for VS Code, VS Code Insiders, and VS Codium on Windows/macOS/Linux; decide which variants APM will support and how detection works when multiple variants are installed.",
"theme": "theme/portability",
"areas": ["area/mcp-config", "area/multi-target"],
"type": "type/feature",
"status": "status/needs-design",
"priority": null,
"preserved_labels": [],
"milestone": null,
"next_action": "Post a design comment with the confirmed VS Code user-profile MCP config path table (all supported variants x all platforms) before implementation begins.",
"comment_markdown": "This is a natural extension of the work in #637/#638 and the direction is right -- `--global` for VS Code should write to the user-level MCP config, not just the project-local `.vscode/mcp.json`.\n\nThe implementation blocker is cross-platform path resolution. VS Code user-profile MCP config paths differ by platform and by VS Code variant:\n\n- **VS Code (stable):** `~/Library/Application Support/Code/User/mcp.json` (macOS), `%APPDATA%\\Code\\User\\mcp.json` (Windows), `~/.config/Code/User/mcp.json` (Linux)\n- **VS Code Insiders:** similar paths with `Code - Insiders` instead of `Code`\n- **VS Codium:** similar paths with `VSCodium`\n\nBefore implementing `get_user_mcp_config_path()` in the VS Code adapter, we need to decide:\n1. Which variants does APM support for `--global` scope? (stable only? Insiders? Codium?)\n2. How does APM detect which variant is installed? (check paths in order? Require explicit `--client` flag?)\n3. What is the fallback when none of the expected paths exist?\n\nOnce those questions are answered in a design comment here, the implementation is straightforward and follows the existing multi-target adapter pattern. The path security requirement (validate with `ensure_path_within`) is non-negotiable regardless of which paths are chosen."
}
Triage status: agentic proposal pending human ratification. Silence is approval. Maintainers can:
- Override any label or milestone above by editing it directly -- human edits are authoritative and will not be reverted on subsequent runs.
- Re-trigger triage by applying the
status/needs-triagelabel, or by removingstatus/triagedto enroll the issue in the next daily sweep.Posted by the Triage Panel workflow. See .apm/skills/apm-triage-panel for the panel skill.
Generated by Triage Panel · ● 2.3M · ◷
[i] Status update -- valid and on the roadmap, intentionally sequenced behind the MCP adapter abstraction.
This is a legitimate --global-scope feature and we are keeping it open. It is gated behind #772 (MCP adapter abstraction): the right place to add VS Code user-profile mcp.json writing is through the per-target MCP adapter boundary that #772 establishes, not as a one-off branch in the current per-runtime code. Implementing it before that boundary exists would add exactly the kind of special-case #772 is meant to remove.
Plan of record: #772 lands the adapter boundary first, then this is implemented as a VS Code adapter capability. Keeping status/needs-design until #772's interface is settled. No action needed from you in the meantime, @sergio-sisternes-epam -- thanks for the clear proposal.
One test case I would add here: when both workspace and user-profile MCP configs exist, the installer should make the selected scope explicit and avoid silently merging or overwriting the other one.
For MCP, global scope is often an identity or permission boundary, not just a different file path. I would expect tests for: workspace config remains untouched, user-profile entry is idempotent, and downgrade/removal only affects the selected scope.
Human decision: decline the proposed VS Code-specific user/profile MCP writer and close as not planned.
Prefer the existing Copilot-global MCP configuration route for compatible current VS Code/Copilot clients rather than add another profile- and platform-specific writer to APM.
The current official VS Code MCP documentation, checked on 2026-10-02, documents $COPILOT_HOME/mcp-config.json (falling back to ~/.copilot/mcp-config.json) as a portable user configuration. It explicitly describes the .vscode/mcp.json and VS Code user-profile destinations as deprecated and retained for compatibility, and recommends portable destinations for new servers.
APM's existing Copilot adapter already writes that Copilot-global location at user scope. This is an alternative route, not a claim that apm install -g --target vscode now supports global MCP configuration.
Important boundaries:
- The shared route is not equivalent to VS Code-only or per-profile isolation. Other compatible Copilot applications may read the same configuration; their native authentication, trust and execution controls remain applicable.
- This decision does not remove or deprecate APM's existing project-level VS Code integration, migrate user files, change install defaults, or retire any target. An APM retirement or migration would require its own explicit scope and communication.
- Upstream deprecation is not removal. The cited page retains compatibility and does not establish a removal date; do not promise every older client, VS Code variant or execution mode supports the shared route.
This supersedes the earlier plan to keep this request open behind #772. The proposed profile writer is not deferred for later implementation. This does not decide #772 itself.
Recorded by Copilot on behalf of @danielmeppiel after his explicit choice to close this request as "won't do" given the documented shared alternative. Apply status/declined and close as not_planned; preserve the earlier discussion.
Dropping some notes here since VS Code Local harness is still superior to the Copilot harness
Source references pinned to microsoft/vscode@14df69c.
| APM Copilot output | Read by VS Code Local harness by default? | Source |
|---|---|---|
~/.copilot/mcp-config.json |
Yes. Workbench MCP discovery, copilot source enabled by default; honors COPILOT_HOME |
mcpConfiguration.ts#L48, nativeMcpDiscoveryAdapters.ts#L109 |
.mcp.json (workspace root) |
Yes (WorkspaceDotMcpDiscovery) |
workspaceDotMcpDiscovery.ts#L24 |
~/.copilot/copilot-instructions.md |
Yes (PromptsService.listAgentInstructions; gated by useInstructionFiles, default on) |
promptsServiceImpl.ts#L917 |
~/.copilot/instructions/ |
Yes (DEFAULT_INSTRUCTIONS_SOURCE_FOLDERS) |
promptFileLocations.ts#L187 |
~/.copilot/agents/ |
Yes (COPILOT_USER_AGENTS_SOURCE_FOLDER) |
promptFileLocations.ts#L204 |
~/.copilot/skills/ (also ~/.agents/skills/) |
Yes (DEFAULT_SKILL_SOURCE_FOLDERS) |
promptFileLocations.ts#L177 |
~/.copilot/hooks/ |
Discovered (DEFAULT_HOOK_FILE_PATHS), but hook schemas aren't shared across harnesses |
promptFileLocations.ts#L216 |
~/.copilot/prompts/ |
No. Default is only .github/prompts; add "~/.copilot/prompts": true to chat.promptFilesLocations |
promptFileLocations.ts#L194 |
Caveat: MCP discovery honors COPILOT_HOME, but the prompt, agent, skill, instruction and hook defaults are hard-coded to ~/.copilot/.... If COPILOT_HOME is set, the Local harness reads MCP servers from the new location but still reads customizations from ~/.copilot.