Skip to content

Support repository-level Copilot CLI MCP configuration #1291

@pmb5

Description

@pmb5

Describe the feature or problem you'd like to solve

Currently, MCP servers for the CLI can only be configured globally via ~/.copilot/mcp-config.json, VSCode can be per folder/project

Proposed solution

Currently, MCP servers can only be configured globally via ~/.copilot/mcp-config.json.

Feature Request:
Enable repository-level MCP server configuration, similar to LSP servers. This would allow teams to:

  • Share project-specific MCP servers via version control
  • Automatically enable relevant MCP tools when working in specific directories
  • Keep global config clean by only loading servers when needed

Proposed Implementation:

// .github/mcp.json
{
    'servers': {
        'ProjectSpecificServer': {
            'type': 'stdio',
            'command': 'dotnet',
            'args': ['run', '--project', '../mcp-servers/project-mcp/project-mcp.csproj'],
            'env': { 'CONNECTION_STRING': '...' }
        }
    }
}

This would work exactly like the .vscode folder where we can have custom MCP server for each project/folder

Example prompts or workflows

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions