[FEATURE] Support workspace-level (.mcp.json) and global (-g) MCP configurations for Copilot CLI
Is your feature request related to a problem? Please describe.
Currently, managing MCP servers for the GitHub Copilot CLI is limited because APM's copilot integration target is hard-coded to global scope.
Specifically:
- Running
apm integration install copilot always writes the configuration globally to ~/.copilot/mcp-config.json, even when run without -g / --global inside an APM project workspace.
- The APM CLI's Copilot integration does not support project-scoped installations.
Since the GitHub Copilot CLI itself supports project-scoped MCP configurations loaded from .mcp.json or .github/mcp.json at the workspace root, forcing all installations to be global causes environment pollution. This leads to configuration bloat, potential tool argument conflicts between different workspaces, and prevents workspace-specific tools from being checked into version control.
The official Copilot CLI documentation is not fully clear here but as on the main MCP config section it does nto vocer taht option (https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/overview#add-an-mcp-server), though it is officially documented as supproted behaviour here (https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#mcp-server-loading-priority)
Warning message from Copilot CLI that currently this config is not supported.

Working (manually created) project-level .mcp.json config
Describe the solution you'd like
Extend APM's Copilot integration to support both project-local and user-global installation scopes:
- Install-Write Path (
CopilotClientAdapter):
- By default (project scope), write the configuration locally to
<project_root>/.mcp.json.
- Only write to the user-global
~/.copilot/mcp-config.json when the --global / -g flag is explicitly provided.
- Runtime-Read Path (
CopilotRuntime):
- Discover and read MCP configurations following the Copilot CLI's official loading priority:
- Current working directory
.mcp.json
- Current working directory
.github/mcp.json
- User-global fallback
~/.copilot/mcp-config.json
- Ensure the parser supports the workspace-scoped
"mcpServers" root key (used in .mcp.json) in addition to the global "servers" key.
Describe alternatives you've considered
- Manually maintaining local configuration files: Copying and pasting MCP configurations manually to
.mcp.json when working in a specific project. This is error-prone and bypasses APM's dependency resolution, updating, and installation workflows.
- Injecting all project configurations into global config: Keeping the current global-only behavior. This is undesirable because it exposes all workspace tools to Copilot in every directory, increasing startup overhead and causing command/context pollution.
Additional context
[FEATURE] Support workspace-level (.mcp.json) and global (-g) MCP configurations for Copilot CLI
Is your feature request related to a problem? Please describe.
Currently, managing MCP servers for the GitHub Copilot CLI is limited because APM's
copilotintegration target is hard-coded to global scope.Specifically:
apm integration install copilotalways writes the configuration globally to~/.copilot/mcp-config.json, even when run without-g/--globalinside an APM project workspace.Since the GitHub Copilot CLI itself supports project-scoped MCP configurations loaded from
.mcp.jsonor.github/mcp.jsonat the workspace root, forcing all installations to be global causes environment pollution. This leads to configuration bloat, potential tool argument conflicts between different workspaces, and prevents workspace-specific tools from being checked into version control.The official Copilot CLI documentation is not fully clear here but as on the main MCP config section it does nto vocer taht option (https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/overview#add-an-mcp-server), though it is officially documented as supproted behaviour here (https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#mcp-server-loading-priority)
Warning message from Copilot CLI that currently this config is not supported.

Working (manually created) project-level .mcp.json config
Describe the solution you'd like
Extend APM's Copilot integration to support both project-local and user-global installation scopes:
CopilotClientAdapter):<project_root>/.mcp.json.~/.copilot/mcp-config.jsonwhen the--global/-gflag is explicitly provided.CopilotRuntime):.mcp.json.github/mcp.json~/.copilot/mcp-config.json"mcpServers"root key (used in.mcp.json) in addition to the global"servers"key.Describe alternatives you've considered
.mcp.jsonwhen working in a specific project. This is error-prone and bypasses APM's dependency resolution, updating, and installation workflows.Additional context
.mcp.jsonhttps://gh.io/copilotcli-mcpmigrate