GitHub Copilot now supports enterprise-managed allowlists and denylists for Model Context Protocol servers. That matters because an MCP server is not just a chat extension: it can expose files, call APIs, run local commands, or change systems on a developer’s behalf. A tool that is useful in a personal experiment may be unacceptable in a production repository.
The new allowedMcpServers and deniedMcpServers settings let enterprise owners control remote HTTP or SSE servers and local stdio servers centrally. The safest starting point is a short allowlist, explicit ownership, and a deny-first test for every tool that should remain unavailable.
Model the trust boundary before writing settings
List what each MCP server can read, write, execute, or transmit. Record whether it is remote or local, who maintains it, which clients use it, what credentials it receives, and whether its output can influence a deployment or data mutation.
An MCP server that only reads public documentation has a different risk from one that can access a private repository, issue tracker, cloud account, or database. The name shown in a client is not enough evidence. GitHub notes that serverName is a convenience matcher because users can rename servers.
Use URL and command matchers as the primary policy signals:
{
"allowedMcpServers": [
{ "serverUrl": "https://docs.example.com/mcp" },
{ "serverCommand": "npx -y @example/docs-mcp" }
],
"deniedMcpServers": [
{ "serverUrl": "https://unapproved.example.com/*" }
]
}
The example is a starting shape, not a universal policy. Confirm the exact matcher syntax and supported client versions in GitHub’s current documentation before deploying it.
Start with a narrow allowlist
An allowlist makes the intended tool catalog visible. Add a server only when a team can explain its purpose, maintainer, data flow, and removal owner. Avoid * URL patterns at the beginning because they turn an access-control policy into a discovery shortcut.
For local servers, match the full command and arguments where possible. A policy that allows a broad interpreter command may permit a different script to run under the same executable. Review package managers, shell wrappers, environment variables, and working directories as part of the command’s effective authority.
For remote servers, verify the canonical HTTPS URL, certificate ownership, authentication method, logging policy, and tenant boundary. Wildcards should be treated as a deliberate expansion of trust, not as a way to avoid listing approved endpoints.
Understand fail-closed behavior
GitHub says malformed or unverifiable MCP policy is blocked rather than allowed, and a server must pass every applicable policy layer. That is helpful for security, but it can interrupt developers if a team deploys an invalid configuration without a test path.
Test three states before rollout:
| State | Expected result |
|---|---|
| Exact approved server | Starts and works in the supported client |
| Unknown server | Is blocked with an understandable message |
| Malformed or conflicting policy | Fails closed and appears in admin diagnostics |
Do not turn a failed test into a global wildcard just to restore convenience. Fix the configuration or explicitly decide that a specific server belongs in the catalog.
Separate client support from policy intent
The current announcement says allowlists are enforced in the GitHub Copilot app, Copilot CLI, and VS Code. Check the actual client versions in your fleet. A managed setting that works in one client but is ignored by an older client creates an uneven control surface.
Record client version, policy version, repository, user or team scope, server matcher, and observed result during a pilot. If a developer can use the server in one client but not another, investigate before claiming the enterprise policy is effective.
Keep sensitive tools behind another approval boundary
An allowlist answers “may this server run?” It does not answer “should this action be approved right now?” Keep stronger controls around production deployments, financial mutations, secret management, and destructive data operations.
Use separate credentials for development and production. Give the MCP server the minimum scope needed for its stated job. Require a human review or protected environment for actions that change production state. Log the actor, tool, target, and decision without storing private prompts or credentials.
This is especially important for an agent that can call several tools in sequence. A harmless read can become a confused-deputy problem if the agent uses data from one server to authorize a write through another. Validate the target and authority at the final action boundary.
Roll out with a representative pilot
Choose repositories with different languages, permission models, and developer workflows. Start with one documentation server and one local development server. Test installation, startup, authentication failure, timeout, unavailable server, and a tool request that should be denied.
Capture evidence:
- policy file commit and review owner;
- client versions tested;
- server URL or command and maintainer;
- data and credential scope;
- allowed and denied test results;
- developer impact and rollback method.
Do not pilot only with administrators. The policy should be understandable to the developer who receives a block message at 11 p.m. during an incident.
Review changes like code
Store managed settings in the organization’s controlled repository, require review for matcher changes, and alert on additions to the allowlist. A server URL change can be equivalent to changing a dependency or credential recipient.
When removing a server, first identify workflows that depend on it. Disable access, watch failures, then delete stale configuration. When ownership changes, re-verify the server rather than inheriting approval forever.
Primary references
- GitHub Changelog: MCP allowlists in enterprise managed settings
- GitHub documentation: enterprise managed settings
- Model Context Protocol security best practices
- GitHub security hardening for Actions
Use allowlists to make tool access intentional and reviewable. A small, tested catalog with least-privilege credentials is more useful than a policy that technically exists but allows every server a developer can discover.
Discussion
What would you try, change, or challenge after reading this guide? Specific results and errors help the next reader.
Comments will load as you reach this section.