You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for repo-specific / folder-specific MCP configs #288
Describe the feature or problem you'd like to solve
I want to be able to support sourcing the MCP configuration from multiple sources - ideally a global config and a project-specific config. The reason for this is that for some projects I need specific MCP servers e.g. neo4j memory MCP server, whereas for other projects it would not be applicable (or would have a different neo4j MCP server config for example).
Proposed solution
A simple solution would be to provide a repeatable --mcp-config flag that would be able to source a MCP config from multiple places and internally you could concatenate the MCP configuration. This could also work by having the global MCP config in your ~/.copilot directory being loaded automatically, with support for additional source of MCP configurations.
Example prompts or workflows
When starting a new session I would say:
Read your neo4j memory to understand the structure, patterns, rules and features of this codebase, all the previous work that has been implemented so far and all the learnings that have come from it.
+1 - This would also help open up creating subagents (with specific mcp tools) to operate on specific directories of a repo. Currently we are limited to the set of tools for a given global configuration.
I merged in a change to the CLI to add --additional-mcp-config, which allows you to pass either a JSON document or a path to a JSON file.
The --additional-mcp-config flag that allows you to temporarily add or override MCP server configurations for a single CLI session without modifying your ~/.copilot/mcp-config.json file.
You can pass MCP server configuration in two ways:
@ellismg Excuse my ignorance as I might be missing something but shouldn't have been easier just to add a mcp-config.json file in your repo my-cool-repo/.github/ folder (or subfolder) to override the global ~/.copilot/mcp-config.json?
Reacted by Wesley Nelson, Felipe Plets and Amir Asyraf
Currently I have 2 MCP files .mcp.json that works with Claude Code and .vscode/mcp.json that works with VS Code / GitHub Copilot Chat.
Even though I got copilot --additional-mcp-config @.mcp.json to work, and have compatibility between claude code and Copilot CLI it would be great to use either of these files by default or at least to have way to use ~/.copilot/config to set the MCP project file by default.
In a large team these small quirks prevent adoption.
@ellismg I have observed that copilot --additional-mcp-config @/path/to/config.json is unable to overwrite the same MCP if it has already been specified in the global settings.
Because this creates a slight obstacle to having local development repos of MCPS for debugging, while the production MCPS can already operatetting files; that might be also the point of #1291
@ellismg Excuse my ignorance as I might be missing something but shouldn't have been easier just to add a mcp-config.json file in your repo my-cool-repo/.github/ folder (or subfolder) to override the global ~/.copilot/mcp-config.json?
Excatly. All other AI agent harnesses out there use the sane default of local config overriding the global config. With OpenCode, Claude and pretty much most other tool out there follows this convention
This was addressed in v0.0.343, which added the --additional-mcp-config flag for per-session MCP config overrides and explicitly marked this issue as fixed. Workspace-local config sources such as .mcp.json and .vscode/mcp.json are also now automatically loaded and merged with the global config. If you believe this isn't fully resolved, feel free to reopen.
Activity
kvenkatrajan commentedon Oct 13, 2025
+1 - This would also help open up creating subagents (with specific mcp tools) to operate on specific directories of a repo. Currently we are limited to the set of tools for a given global configuration.
@RyanHecht @skylar-anderson
ellismg commentedon Oct 16, 2025
I merged in a change to the CLI to add
--additional-mcp-config, which allows you to pass either a JSON document or a path to a JSON file.The
--additional-mcp-configflag that allows you to temporarily add or override MCP server configurations for a single CLI session without modifying your~/.copilot/mcp-config.json file.You can pass MCP server configuration in two ways:
You can also pass the flag multiple times (later values override earlier ones):
This should ship in today's release of the CLI (and should be there now if you install the
@prereleasetagg). You'll see the new flag in--help.kvenkatrajan commentedon Oct 16, 2025
great thank you!
roperi commentedon Feb 1, 2026
@ellismg Excuse my ignorance as I might be missing something but shouldn't have been easier just to add a
mcp-config.jsonfile in your repomy-cool-repo/.github/folder (or subfolder) to override the global~/.copilot/mcp-config.json?felipeplets commentedon Feb 5, 2026
Currently I have 2 MCP files
.mcp.jsonthat works with Claude Code and.vscode/mcp.jsonthat works with VS Code / GitHub Copilot Chat.Even though I got
copilot --additional-mcp-config @.mcp.jsonto work, and have compatibility between claude code and Copilot CLI it would be great to use either of these files by default or at least to have way to use~/.copilot/configto set the MCP project file by default.In a large team these small quirks prevent adoption.
hstaudacher commentedon Feb 16, 2026
Support for .mcp json has landed in https://github.com/github/copilot-cli/releases/tag/v0.0.401.
Anselmoo commentedon Mar 4, 2026
@ellismg I have observed that
copilot --additional-mcp-config @/path/to/config.jsonis unable to overwrite the same MCP if it has already been specified in the global settings.Because this creates a slight obstacle to having local development repos of MCPS for debugging, while the production MCPS can already operatetting files; that might be also the point of #1291
amirasyraf commentedon Mar 14, 2026
Excatly. All other AI agent harnesses out there use the sane default of local config overriding the global config. With OpenCode, Claude and pretty much most other tool out there follows this convention
examon commentedon Apr 6, 2026
This was addressed in v0.0.343, which added the
--additional-mcp-configflag for per-session MCP config overrides and explicitly marked this issue as fixed. Workspace-local config sources such as.mcp.jsonand.vscode/mcp.jsonare also now automatically loaded and merged with the global config. If you believe this isn't fully resolved, feel free to reopen.