GitHub Copilot uses MCP (Model Context Protocol) servers to reach tools and data outside your code, and it supports them in VS Code and other IDEs, Copilot CLI, the GitHub Copilot app and Copilot cloud agent. You add a server once per surface: with MCP: Add Server in VS Code, copilot mcp add or ~/.copilot/mcp-config.json in the CLI, and a JSON block in repository settings for cloud agent.
GitHub's MCP overview gives a plain example of why: "you can connect an issue tracker so Copilot can look up a bug while working on a fix, without asking you to copy the issue into chat." This guide covers setup on each surface as documented on 26 October 2026. New to the protocol? Start with what is MCP.
Where can you use MCP with GitHub Copilot?
Setup is different on each surface, and the config files are not shared everywhere. GitHub says so directly: "Use the setup guide for your surface rather than assuming that the same configuration location applies everywhere."
| Surface | Where servers are configured | Built in by default |
|---|---|---|
| VS Code | MCP: Add Server, ~/.copilot/mcp-config.json, .mcp.json or .vscode/mcp.json |
None listed |
| Copilot CLI | ~/.copilot/mcp-config.json, .mcp.json, .github/mcp.json |
GitHub, Playwright, fetch, time |
| Cloud agent and code review | Repository Settings > Copilot > MCP servers | GitHub, Playwright |
| Visual Studio, JetBrains, Xcode, Eclipse | The IDE's tools or MCP settings (an mcp.json in Visual Studio, JetBrains and Xcode) |
None listed |
| GitHub Copilot app | Repository or local Copilot configuration, plus the Customize tab | Not stated |
GitHub's plan tables list MCP as included on every plan, from Copilot Free to Enterprise. To find servers, GitHub maintains the GitHub MCP Registry, a curated list of partner and community servers, which is in public preview.
How do you add an MCP server in VS Code?
VS Code's own MCP server guide (updated 21 October 2026) walks through it:
- Open the Command Palette (⇧⌘P on macOS, Ctrl+Shift+P on Windows and Linux) and run MCP: Add Server.
- Choose HTTP (HTTP or Server-Sent Events) if you have a server URL, or Command (stdio) if you have a launch command such as
npx -y @playwright/mcp@latest. - Enter a server ID, such as
playwright. - For a personal setup, select Global, then Copilot Global.
- Review any trust or sign-in prompts, then try a prompt that names the server.
You can also browse servers in the Extensions view by searching @mcp, then choose Install for yourself or Install in Workspace to share it with the project.
Where the config lands matters:
- Copilot Global writes to
~/.copilot/mcp-config.json(or$COPILOT_HOME/mcp-config.json). That is the same file path GitHub documents for Copilot CLI's user config, so in Kipt's reading the two can share servers; neither doc says so directly. - Workspace-root
.mcp.jsonshares a server with your team. The guided flow offers it when the experimentalchat.mcp.workspaceRootConfig.enabledsetting is on. .vscode/mcp.jsonor the user-profilemcp.jsonare still available for input variables or per-server sandboxing, but VS Code labels them deprecated in the guided flow.
The formats differ. VS Code's docs: "Portable files use a top-level mcpServers object. The VS Code format uses servers." GitHub's IDE setup guide still shows the VS Code format, which needs VS Code 1.99 or later:
{
"servers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
MCP tools are used by Copilot in agent mode. To pick which tools are active, open Chat: Open Customizations > Tools in a Copilot session, or Configure Tools in the chat input for a Local harness session. Servers can also offer resources (Add Context > MCP Resources) and prompts, which you call in chat as /<server>.<prompt>.
How do you add MCP servers to Copilot CLI?
Copilot CLI ships with four built-in servers: github-mcp-server (issues, pull requests, code search, Actions), playwright, fetch and time. Add others in one of three ways, per GitHub's CLI MCP guide:
- Type
/mcp addin a session, fill in the form, and press Ctrl+S to save. The server is available right away. - Run
copilot mcp addfrom your shell. - Edit
~/.copilot/mcp-config.jsondirectly.
# local stdio server
copilot mcp add context7 -- npx -y @upstash/context7-mcp
# remote HTTP server
copilot mcp add --transport http notion https://mcp.notion.com/mcp
# list configured servers
copilot mcp list
The config file uses mcpServers, and each server needs a tools list (["*"] for all):
{
"mcpServers": {
"playwright": {
"type": "local",
"command": "npx",
"args": ["@playwright/mcp@latest"],
"tools": ["*"]
}
}
}
For project servers, the CLI loads .mcp.json and .github/mcp.json from the working directory up to the Git root, but only in a trusted folder. When names clash, the CLI reference gives this order, highest first: --additional-mcp-config, plugin servers, workspace files, then ~/.copilot/mcp-config.json.
Other useful options:
--additional-mcp-config=JSONadds a server for one session (a JSON string, or@file).--disable-builtin-mcpsturns off the built-in servers;--disable-mcp-server=NAMEturns off one.--enable-all-github-mcp-toolsgives the GitHub server its full tool set instead of the CLI's default subset.
Moving from VS Code? GitHub's reference gives a one-liner that renames servers to mcpServers:
jq '{mcpServers: .servers}' .vscode/mcp.json > .mcp.json
The CLI asks before it runs any MCP tool: "All MCP tool invocations require explicit permission. This applies even to read-only operations on external services." See the Copilot CLI guide for its permission flags.
How do you configure MCP for Copilot cloud agent and code review?
On GitHub.com, a repository admin sets up servers once and both Copilot cloud agent and Copilot code review use them. GitHub's repository MCP guide lists the steps:
- Open the repository's Settings.
- Under "Code, planning, and automation", click Copilot, then MCP servers.
- Paste your JSON into "MCP configuration" and click Save MCP configuration.
- Store any keys as Agents secrets or variables whose names start with
COPILOT_MCP_.
This example is adapted from GitHub's Sentry example, with the required tools field added and the explanatory comments removed:
{
"mcpServers": {
"sentry": {
"type": "local",
"command": "npx",
"args": ["@sentry/mcp-server@latest", "--host=$SENTRY_HOST"],
"env": {
"SENTRY_HOST": "https://contoso.sentry.io",
"SENTRY_ACCESS_TOKEN": "$COPILOT_MCP_SENTRY_ACCESS_TOKEN"
},
"tools": ["*"]
}
}
}
Replace "*" with the specific tool names from the server's docs once you know which ones the agent needs. The GitHub server is on by default with "a specially scoped token that only has read-only access to the current repository," and the Playwright server can only reach localhost or 127.0.0.1 in the agent's environment.
Limits to know before you rely on it:
- The agent uses MCP tools "autonomously and does not ask for approval before calling them." Allowlist specific read-only tools rather than
"*". - Cloud agent and code review support MCP tools only, not resources or prompts.
- Remote servers that use OAuth are not supported here yet.
- Code review only uses tools that declare
annotations.readOnlyHint: true.
To test cloud agent, assign an issue to Copilot, open the session logs from the pull request it creates and expand the Start MCP Servers step. For code review, request a Copilot review and read the "Setting up environment" section of the review session log.
How do you use MCP in Visual Studio, JetBrains, Xcode and Eclipse?
From GitHub's IDE guide:
- Visual Studio 17.14 or later: in Copilot Chat, switch to Agent, click the tools icon, then the plus icon, and fill in the server ID, type and fields.
- JetBrains IDEs: click the MCP icon in Copilot Chat to install from the registry, or in Agent mode open the tools icon and click Add MCP Tools to edit
mcp.json. - Xcode: in the Copilot for Xcode settings, use Browse MCP Servers on the Tools tab, or Edit Config on the MCP tab.
- Eclipse 2024-09 or later: click the MCP icon in Copilot Chat to install from the registry, or define servers by hand under Configure Tools in the chat window.
GitHub's examples for all four IDEs use the servers format, like VS Code.
What policies control MCP in Copilot?
For organizations, one policy matters most. GitHub: "Enterprises and organizations can choose to enable or disable use of MCP for members of their organization or enterprise with the MCP servers in Copilot policy. The policy is disabled by default." It only applies to Copilot Business and Copilot Enterprise; Free, Pro, Pro+ and Max users are not governed by it.
Enterprises can go further with a registry URL and an allowlist. In Copilot CLI, the allowlist check is fail-closed: if GitHub can't verify the policy, non-default servers are blocked, and built-in servers are always exempt. VS Code notes the same thing in short: "Your organization can restrict which servers are available."
How do you use MCP with Copilot safely?
- Review a server before you install it. VS Code warns that "Local MCP servers can run code on your machine."
- Enable only the tools a task needs. For the GitHub MCP server, GitHub notes that disabling unused toolsets "frees up tokens in the AI's context window."
- Keep secrets out of config files. Use
COPILOT_MCP_secrets for cloud agent and environment variables locally. - Check a real tool call. Expand the call in chat and confirm it came from the server you added.
For server ideas, see best MCP servers.
Keep your MCP prompts in one place
The prompts that drive MCP tools well, like "look up this Sentry issue and propose a fix," are worth saving. Kipt keeps your prompts and Agent Skills as Markdown in a private GitHub repo you own, with Cmd+K search, so the same prompt is ready in VS Code, Copilot CLI or any other agent.