MCP setup · GitHub

How to add an MCP server to GitHub Copilot

Copilot's MCP setup has one detail that catches almost everyone: the config key is not the one every other surface uses. Get that wrong and the file parses fine and nothing connects. The other thing worth knowing is that in Business and Enterprise, MCP is gated by an organisation policy that is off until someone turns it on.

How this surface handles MCP

Copilot's MCP configuration in VS Code lives in a workspace file at `.vscode/mcp.json`, or in your personal VS Code settings for servers you want everywhere. The workspace file is committed with the repository, which puts it in the same category as Claude Code's `.mcp.json` and Cursor's `.cursor/mcp.json` — capability that arrives through a pull request and deserves the review a dependency gets.

The detail to internalise is that this file uses `servers` as its top-level key, not the `mcpServers` that Claude Code, Cursor and Gemini CLI share. A definition copied from another tool's documentation will produce a valid JSON file that declares nothing. It also supports an `inputs` block, which is how you prompt for a token at first use rather than committing one — a genuinely better pattern than the environment-variable dance most surfaces leave you with.

The governance story is different in kind from the others here, because GitHub's control point is the organisation rather than the machine. MCP support in Copilot is governed by a policy an organisation or enterprise configures, and GitHub documents it as disabled by default and as applying to users on Business and Enterprise subscriptions — meaning individual paid plans are outside its reach. If your engineers are on personal subscriptions inside your company, the organisation policy does not describe what they can do.

That is a useful shape and a real limit. A policy switch is enforcement without inventory: it decides whether MCP is permitted at all, and it does not enumerate which servers are configured in which repository's `.vscode/mcp.json`, or which of them are also connected to the terminal agent on the same laptop.

Where servers are stored

Workspace.vscode/mcp.json

reaches Anyone who opens this repository in VS Code.

Committed and reviewable. This is the scope worth putting in a CODEOWNERS rule, because it grants capability to every contributor's agent.

UserVS Code settings.json

reaches You, in every workspace on this machine.

Personal configuration that follows you into other people's repositories. Easy to add, easy to forget, invisible to the repository's owners.

The config shape

JSON. The top-level key is `servers` — not `mcpServers`. An `inputs` block prompts for secrets at first use so tokens stay out of the committed file.

GitHub Copilot — MCP server definition

{
  "inputs": [
    {
      "type": "promptString",
      "id": "example-token",
      "description": "Example service token",
      "password": true
    }
  ],
  "servers": {
    "example-server": {
      "command": "npx",
      "args": ["-y", "@example/mcp-server@1.4.2"],
      "env": { "EXAMPLE_TOKEN": "${input:example-token}" }
    }
  }
}

Adding a server

  • Confirm the policy is enabled first

    On Copilot Business or Enterprise, MCP is governed by an organisation policy that GitHub documents as disabled by default. If it is off, a perfectly correct config file will do nothing, and you will spend an afternoon debugging JSON.

  • Create `.vscode/mcp.json` with the `servers` key

    This is the single most common failure. `mcpServers` is the key three other surfaces use and it is not the key here — a file using it is syntactically valid and semantically empty.

  • Declare secrets as inputs, not literals

    Use an `inputs` entry with `type: "promptString"` and reference it as `${input:id}`. VS Code prompts once and stores the value outside the committed file, which is the difference between a shareable config and a leaked credential.

  • Pin stdio server versions

    As everywhere: a launcher with no version resolves to whatever is published at start time, so approval and execution drift apart silently.

Confirming it actually connected

  • Open the workspace and check that the server starts — a server declared under the wrong key produces no error, just no tools, which is why this check comes before any other debugging.
  • Confirm the tools appear in Copilot Chat's tool list, and read their descriptions rather than trusting the names.
  • If nothing appears and the file is correct, check the organisation policy before checking anything else. On Business and Enterprise it is the gate, and it is off by default.

Review this before you connect anything

the part the vendor docs will not tell you

A connected MCP server can read what its credential can read and do what its tools can do, and its tool descriptions reach the model as instructions. None of that is visible from a configuration file that parses correctly.

  • Treat `.vscode/mcp.json` as a CODEOWNERS-protected path

    It grants agent capability to every contributor who opens the repository. If your repository protects CI configuration from unreviewed change, this file belongs in the same rule.

  • Read tool descriptions before approving the pull request

    The descriptions are model-facing instructions. A reviewer skimming for valid JSON will not notice a description that tells the agent to do something it was never asked to do.

  • Check whether the same server is already in another tool

    Copilot's format differs, but the underlying server does not. If it is already reviewed for the terminal agent, reuse that review rather than starting a second one — and if it is not reviewed anywhere, this is the moment.

  • Do not rely on the org policy as an inventory

    The policy is a permission gate. It says MCP may be used; it does not tell you which servers exist in which repositories, and it does not cover engineers outside the subscription it applies to.

Organisational controls

  • Organisation MCP policy

    GitHub documents an MCP policy for Copilot that an organisation or enterprise configures, described as disabled by default — so MCP is opt-in at the org level rather than something to switch off after the fact.

  • Subscription scope of the policy

    The policy applies to users covered by a Copilot Business or Enterprise subscription from an organisation that configures it. Engineers on individual paid plans are outside its reach, which is worth knowing before you treat the switch as complete coverage.

  • Content exclusions

    Separate from MCP, GitHub documents content exclusion configuration for Copilot, which constrains what the assistant may read. It is adjacent governance rather than an MCP control, and the two are often confused in policy documents.

What this cannot tell you

The policy switch and the config file sit at opposite ends of the problem and neither closes it. One says whether MCP is permitted across an organisation; the other declares servers per repository and per machine. Nothing in between reports which servers are actually configured across your repositories and laptops, at which versions, or which of them are the same server your engineers also connected to a different AI tool.

Frequently asked

Why is my MCP server not appearing in Copilot?
Two causes account for most of it. First, `.vscode/mcp.json` uses `servers` as its top-level key rather than `mcpServers`, so a file copied from another tool's docs parses cleanly and declares nothing. Second, on Copilot Business and Enterprise the organisation MCP policy is documented as disabled by default, and a correct file does nothing until it is enabled.
Where does GitHub Copilot store MCP servers in VS Code?
In `.vscode/mcp.json` for a workspace, committed with the repository, or in your personal VS Code settings for servers you want across all workspaces.
Can an organisation turn MCP off for Copilot?
GitHub documents an MCP policy configured by an organisation or enterprise, disabled by default, applying to users covered by a Copilot Business or Enterprise subscription. Users on individual paid plans are not governed by it, which matters if your engineers expense their own.
How do we keep tokens out of a committed MCP config?
Use the `inputs` block with `type: "promptString"` and reference the value as `${input:id}`. VS Code prompts once and keeps the secret out of the file, which is a better pattern than most surfaces offer and worth using even where you could get away with an environment variable.

Sources

Every path, key, table and flag on this page was read from GitHub's own documentation on 2026-07-26. Where a control varies by plan or is changing quickly, this page describes the mechanism rather than asserting a current state.

The wider governance picture

Do this next

The same server, on your other tools

Concepts on this page

Configure it once, not once per tool

Vincosha Registry holds the reviewed, version-pinned set of MCP connectors and distributes it to every AI surface your company runs — whatever key or file each one expects. Vincosha Assay vets a server before it enters that set, and Vincosha Ledger records which versions were live in any session you later have to explain.