GitHub Copilot MCP setup differs on every surface: Copilot CLI reads ~/.copilot/mcp-config.json plus a project .mcp.json or .github/mcp.json, the cloud agent reads JSON saved in repository settings, and the VS Code Copilot harness reads ~/.copilot/mcp-config.json or a workspace-root .mcp.json. On Business and Enterprise seats the “MCP servers in Copilot” policy must also be on.

Applies to: GitHub Copilot CLI 1.0.114 (npm latest, published November 18, 2026), the GitHub Docs MCP pages and VS Code docs dated November 18, 2026. Last checked: November 21, 2026.

On this page

Which file goes with which surface

GitHub’s own overview says to use “the setup guide for your surface rather than assuming that the same configuration location applies everywhere” (Model Context Protocol (MCP)). The table collects those locations in one place.

Surface Where the servers are defined Top-level key Source
Copilot CLI, your user ~/.copilot/mcp-config.json mcpServers Adding MCP servers for GitHub Copilot CLI
Copilot CLI, one project .mcp.json (any directory from the working directory up to the repository root) or .github/mcp.json mcpServers, or the bare format with server names at the top same page
Cloud agent and Copilot code review Repository Settings > Copilot > MCP servers on GitHub mcpServers Configure MCP servers for your repository
Cloud sessions, personal servers Customize menu on github.com/copilot form fields Model Context Protocol (MCP)
VS Code, Copilot harness $COPILOT_HOME/mcp-config.json (or ~/.copilot/mcp-config.json), or .mcp.json at the workspace root mcpServers MCP configuration reference
VS Code, Local harness (deprecated) .vscode/mcp.json or the user-profile mcp.json servers same page
Visual Studio, JetBrains IDEs, Xcode, Eclipse mcp.json opened from the Copilot Chat tools or settings UI, or the registry install button servers in GitHub’s examples Extending GitHub Copilot Chat with MCP servers

The two VS Code rows come from a docs change worth knowing about. The VS Code page dated November 18, 2026 says: “For new Copilot configurations, use these native destinations, not .vscode/mcp.json or profile mcp.json,” and says the Local harness “is deprecated and will be removed in February 2027” (Add and use MCP servers in VS Code). The GitHub Docs IDE page checked on the same day still describes .vscode/mcp.json and settings.json for VS Code 1.99 or later, so you may see both in a team’s notes. Use the VS Code page for VS Code.

Copilot CLI

The GitHub MCP server is built into Copilot CLI and needs no configuration. Other servers can be added in five ways, all from the CLI docs:

  • /mcp add in an interactive session opens a form (name, STDIO or HTTP or SSE, command or URL, environment variables or headers, tools). Press Ctrl+S to save; the server is available without restarting.
  • copilot mcp add writes to ~/.copilot/mcp-config.json from the terminal. For a local server, put the command after --:
copilot mcp add SERVER-NAME -- COMMAND [ARGS...]
  • For a remote server, give the transport and URL:
copilot mcp add --transport http SERVER-NAME URL
  • Edit ~/.copilot/mcp-config.json directly. The docs show a local server and a remote HTTP server in one file:
{
  "mcpServers": {
    "playwright": {
      "type": "local",
      "command": "npx",
      "args": ["@playwright/mcp@latest"],
      "env": {},
      "tools": ["*"]
    },
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "YOUR-API-KEY"
      },
      "tools": ["*"]
    }
  }
}

copilot mcp add also takes --env KEY=VALUE, --header "HEADER: VALUE", --tools, --timeout MS and --json. Manage servers with copilot mcp list, copilot mcp get SERVER-NAME, copilot mcp remove SERVER-NAME, copilot mcp enable SERVER-NAME and copilot mcp disable SERVER-NAME; inside a session the same jobs are /mcp list, /mcp show, /mcp edit, /mcp delete, /mcp enable and /mcp disable. --show-secrets prints environment and header values in full, so the command reference says to use it only in trusted environments.

Project files and trust

When you start the CLI inside a Git repository it walks from the working directory up to the repository root and loads MCP files along the way. If .mcp.json and .github/mcp.json sit in the same directory, .mcp.json wins; on a name clash the file closer to your working directory wins, and project definitions beat ~/.copilot/mcp-config.json (CLI docs). The command reference ranks the sources by trust:

Source Trust level Review
Built-in High No
.github/mcp.json Medium Recommended
.mcp.json Medium Recommended
~/.copilot/mcp-config.json User-defined Your responsibility
Remote servers Low Always

Project-level servers load only after you confirm folder trust. In prompt mode (copilot -p) they load automatically if the directory is already trusted; otherwise they are skipped unless the GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP environment variable is true (command reference).

Warning

The GitHub command reference describes GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP as off by default “to prevent starting repository-controlled MCP servers without interactive trust.” Setting it, or passing --trust-folder, starts whatever a repository’s .mcp.json defines. Do it only for repositories you control; the safer route is to trust the folder once interactively after reading the file.

MCP tool calls still follow the session’s permission rules. The reference shows allowing one tool or a whole server with copilot --allow-tool='MyMCP(create_issue)' and copilot --allow-tool='MyMCP'.

Moving a VS Code config to the CLI

Copilot CLI does not read .vscode/mcp.json; the docs say it uses the unsupported top-level key servers. To migrate, the command reference remaps servers to mcpServers and writes .mcp.json:

jq '{mcpServers: .servers}' .vscode/mcp.json > .mcp.json

This needs jq; the page also gives a PowerShell one-liner. The remap changes only the key. The VS Code page lists what does not carry over to the portable format: envFile, ${input:...} prompts, dev, sandboxEnabled and sandbox, and ${env:NAME} references become ${NAME} (MCP configuration reference).

Cloud agent and code review

Repository administrators paste JSON into Settings > Copilot > MCP servers and click Save MCP configuration. The same configuration serves the cloud agent, automations and Copilot code review. Every server needs tools (a list of names, or *) and type (local, stdio, http or sse); local servers add command and args, remote ones url and optional headers (Configure MCP servers for your repository). The docs’ Azure example:

{
  "mcpServers": {
    "Azure": {
      "type": "local",
      "command": "npx",
      "args": [
        "-y",
        "@azure/mcp@latest",
        "server",
        "start"
      ],
      "tools": ["*"]
    }
  }
}

Secrets must be Agents secrets or variables whose names start with COPILOT_MCP_, referenced as $COPILOT_MCP_API_KEY, ${COPILOT_MCP_API_KEY} or ${COPILOT_MCP_API_KEY:-default}. The GitHub and Playwright servers are on by default; the GitHub one uses a token scoped read-only to the current repository.

Warning

GitHub states that once a server is configured, “Copilot will be able to use the tools provided by the server autonomously, and will not ask for your approval before using them.” The docs “strongly recommend” listing specific read-only tools in tools rather than *, and using a service account instead of personal credentials for servers that need authentication.

Limits the docs list for these surfaces:

  • Only MCP tools work. Resources and prompts are not supported.
  • Remote servers that use OAuth are not supported in repository settings or custom agent profiles.
  • Copilot code review skips any tool whose tools/list annotation readOnlyHint is missing or not true.
  • Custom HTTP and SSE servers cannot have query parameters in the URL; pass them as headers.
  • Up to 50 MCP servers in total across personal and repository configurations; on a name clash the repository entry wins.

To check a setup, assign an issue to Copilot, open the pull request’s View session log and expand the Start MCP Servers step; started servers list their tools at the bottom. A server that needs uv or pipx may need a copilot-setup-steps.yml workflow (Copilot setup steps). Servers can also be attached to one custom agent through the mcp-servers profile property (custom agents).

Who is allowed to use MCP at all

The MCP servers in Copilot policy is disabled by default and applies only to Copilot Business and Copilot Enterprise seats; Free, Pro, Pro+ and Max are not governed by it (Model Context Protocol (MCP)). When it is off, the CLI’s built-in GitHub MCP server does not start either (command reference).

Administrators have two ways to narrow the list. The allowedMcpServers and deniedMcpServers lists in managed-settings.json are described as the more secure, generally available method (Configuring an MCP server allowlist). They apply to user and repository settings but not to servers defined in custom agent profiles. A registry URL with Registry only is in public preview and blocks Copilot connectors (Restrict MCP server access to a custom registry). Connectors, GitHub-verified servers set up once from /mcp in the CLI or the Customize page, are also in public preview and not yet supported in sessions on GitHub Actions (Copilot connectors).