-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support per-repository MCP server configuration (.github/mcp.json) #2528
Copy link
Copy link
Open
Labels
Description
Feature Request
Problem
Currently, MCP server configuration in Copilot CLI is stored only at the user level (~/.copilot/mcp-config.json). There is no way to define per-repository MCP servers, unlike custom instructions (.github/copilot-instructions.md) and LSP servers (.github/lsp.json), which already support repo-level configuration.
This means:
- Teams cannot share MCP server configurations through version control.
- Developers must manually add/remove MCP servers when switching between projects that need different servers.
- There is no parity with VS Code, which supports
.vscode/mcp.jsonat the repo level.
Proposed Solution
Support a repo-level MCP config file, for example:
.github/mcp.json
This file would follow the same schema as ~/.copilot/mcp-config.json and be automatically loaded when Copilot CLI starts in a repository that contains it. User-level config would still apply as a fallback/merge.
Additional Context
- VS Code already supports
.vscode/mcp.jsonfor per-repo MCP config. When using Copilot CLI via/ideintegration with VS Code, MCP servers defined in.vscode/mcp.jsonare not inherited by the CLI, which is a surprising gap. - Other repo-level configs already exist:
.github/copilot-instructions.md,.github/instructions/**/*.instructions.md,.github/lsp.json,.github/agents/. MCP config is the odd one out. - A natural precedence order would be: repo-level
.github/mcp.jsonmerges with (or overrides) user-level~/.copilot/mcp-config.json, similar to how VS Code handles workspace vs user settings.
Benefits
- Team collaboration — shared MCP servers checked into version control.
- Project isolation — different projects can use different MCP servers without manual switching.
- Onboarding — new contributors get the right MCP servers automatically.
- Parity — consistent experience across VS Code and Copilot CLI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.