To control which MCP servers Copilot can use across an enterprise, you need two things:

  1. Turn on the MCP servers in Copilot policy.
  2. Define an allowlist and denylist with allowedMcpServers and deniedMcpServers in your enterprise's managed-settings.json.

That's GitHub's recommended, generally available method. The older approach, a private MCP registry with the Restrict MCP access to registry servers policy, is still there. GitHub now labels it public preview, "not prioritized for development," and bypassable by users who edit their configuration files (GitHub Docs: MCP server usage in your company).

This tutorial walks through the managed settings route step by step, explains where it doesn't reach, and covers when you still need the registry. Everything was checked against GitHub's docs on November 14, 2026.

Before you start: what each control does

There are four controls, and they stack:

Two things the MCP policy doesn't do. It doesn't block built-in default servers such as the GitHub MCP server, which are always allowed and can't be denied. It also doesn't control the GitHub MCP server when it runs in third-party hosts like Cursor or Claude. GitHub points to the GitHub MCP Server repository's governance docs for that (GitHub Docs: Managing policies in your enterprise).

Step 1: Inventory the servers you'll allow

Start with a list, not a config file. For each server, record whether it's remote (HTTP or SSE) or local (stdio), its exact URL or launch command, what data it can reach, and who owns it internally. GitHub advises reviewing a third-party server's tools, authentication and data access before enabling it (GitHub Docs: MCP best practices). Remote or local decides your matcher: serverUrl never matches a local server, and serverCommand never matches a remote one.

Step 2: Enable the MCP policy

  1. Go to your enterprise, then AI controls.
  2. In the sidebar, click MCP.
  3. Set MCP servers in Copilot to enabled for the enterprise, or for the organizations that should be allowed MCP.
  4. If you previously set Restrict MCP access to registry servers to Registry only, change it to Allow all. You can also clear MCP Registry URL.

GitHub recommends step 4 so the allowlist and the registry don't conflict and you keep one source of truth (GitHub Docs: Configuring an MCP server allowlist).

One thing to know if you delegate this policy to organizations: a user licensed by several organizations gets the least restrictive result. If any of their organizations enables MCP, they have it (GitHub Docs: Policy conflicts).

GitHub Enterprise MCP settings with MCP servers in Copilot, MCP Registry URL and Restrict MCP access to registry servers
Enterprise MCP policy: the server toggle, registry URL and registry restriction. Screenshot from our own GitHub Enterprise, November 2026.

Step 3: Create the governance repository

Managed settings live in a .github-private repository owned by one organization in your enterprise.

  1. Create .github-private from GitHub's governance template, or from scratch.
  2. Go to Enterprise > AI controls > Agents.
  3. Under Configuration source, select the organization that owns the repository.

The settings apply to every user on your enterprise's Copilot plan, whether or not they can see the repository. GitHub recommends internal visibility, with edits restricted to administrators and AI managers (GitHub Docs: Creating a .github-private repository). Protect copilot/managed-settings.json with CODEOWNERS and a ruleset. That way an allowlist change is a reviewed pull request, not a quiet edit.

Step 4: Write the allowlist and denylist

Create copilot/managed-settings.json. This example is based on GitHub's reference. The last allowlist entry is a placeholder for an internal remote server:

{
  "allowedMcpServers": [
    { "serverUrl": "https://api.githubcopilot.com/*" },
    { "serverCommand": ["npx", "@playwright/mcp@latest"] },
    { "serverUrl": "https://mcp.internal.example.com/*" }
  ],
  "deniedMcpServers": [
    {
      "serverCommand": [
        "npx", "-y",
        "@modelcontextprotocol/server-filesystem",
        "/"
      ]
    }
  ]
}

The three matchers behave differently (GitHub Docs: Enterprise managed settings, allowedMcpServers):

Each entry must contain exactly one matcher. Clients then evaluate in this order (GitHub Docs: Evaluation rules):

  1. Built-in default servers are always allowed.
  2. Anything matching deniedMcpServers is blocked.
  3. If allowedMcpServers exists, anything not matching it is blocked.
  4. Any server whose URL or command contains an unresolved variable, such as ${VARIABLE}, is blocked.

Three behaviours are worth knowing before you ship:

Step 5: Decide what to do about Copilot connectors

Copilot connectors are GitHub-verified remote MCP servers, so the allowlist governs them too. If you define allowedMcpServers, connectors are blocked unless their URL matches an entry. To allow all of them, including ones added later, add this entry:

{ "serverUrl": "https://api.github.com/copilot-connectors/api/v1/connectors/*/mcp" }

To allow only specific connectors, list each one's URL instead. GitHub publishes the full list. For example, Slack is .../connectors/githubcopilotslackmcp/mcp. To block a connector, add its URL to deniedMcpServers. Because connectors are in public preview, the Editor preview features policy must also be enabled for them to work (GitHub Docs: Allowing Copilot connectors).

Step 6: Give specific teams a different list

Both keys can be overridden for enterprise teams:

  1. In managed-settings.json, wrap the matcher objects in overridable.
  2. Put each team's list in a file under copilot/teams/, using the normal syntax.
  3. Map team slugs to those files in copilot/team-mappings.json.

This setup is documented in GitHub Docs: Getting started with enterprise-managed settings. It's how you let a platform team trial a new server without opening it to everyone.

Step 7: Validate and roll out

  1. Commit to the default branch.
  2. Check the Copilot settings validation section on the enterprise Agents tab. It names the file and JSON path for each error, and it isn't shown when there are no issues.
  3. Wait about an hour for supported clients to pick up the change, or restart or sign in again to refresh immediately.
  4. Confirm on a test machine that an unlisted server is refused and an allowed one starts.

Users licensed by more than one billing entity must select your enterprise under "Usage billed to" in their personal Copilot settings to receive these settings (GitHub Docs).

Where the allowlist doesn't reach

This is the section to share with your security team. According to the managed settings client support table, allowedMcpServers and deniedMcpServers are supported in:

The gaps:

When you still need the private registry

Use a registry if developers on Visual Studio, Eclipse or Xcode need enforcement, or if you want a curated catalogue for discovery. The requirements (GitHub Docs: Configure an MCP registry):

Then set the MCP Registry URL and choose Allow all or Registry only (GitHub Docs: Restrict MCP server access to a custom registry). Keep its limits in mind:

Lock down repository MCP for the cloud agent

Repository administrators configure MCP for Copilot cloud agent, automations and Copilot code review under Settings > Copilot > MCP servers. GitHub warns that Copilot uses these tools autonomously, without asking for approval (GitHub Docs: Configure MCP servers for your repository). So:

GitHub's cloud guardrails tutorial also recommends putting Copilot and MCP configuration files under CODEOWNERS with required code owner review.

Common questions

Can I block the GitHub MCP server?

No, not inside Copilot. Built-in first-party servers are exempt from deny rules. Govern what it can reach through token scope and repository permissions instead.

Does the MCP allowlist apply to developers using Copilot with a personal plan?

Not through server-managed settings or the MCP policy. Device-level delivery through MDM or a file in the OS-specific location applies regardless of the license.

The MCP allowlist is one part of a wider Copilot policy set. If you'd like help designing the allowlist and the review workflow around it, see our Copilot enablement service.