GitHub Copilot MCP: add MCP servers in VS Code

GitHub Copilot uses MCP servers in agent mode. In VS Code you configure them in an mcp.json file or with the MCP: Add Server command. Below are the current steps from the VS Code and GitHub documentation.

How to add an MCP server to GitHub Copilot

VS Code

  1. Run MCP: Add Server from the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and choose Workspace or Global. Or edit the file yourself: .vscode/mcp.json in the project, or your user mcp.json, opened with MCP: Open User Configuration.
  2. For a remote server, add an entry under servers with "type": "http" and the url. Put API keys in an inputs variable rather than in the file.
  3. Start the server with the Start action shown above it in mcp.json. For OAuth servers, click Auth and sign in in the browser.
  4. Open the Chat view, select Agent mode, and use Configure Tools to switch individual tools on or off.
{
  "inputs": [
    {
      "type": "promptString",
      "id": "anythingmcp-key",
      "description": "AnythingMCP API key",
      "password": true
    }
  ],
  "servers": {
    "anythingmcp": {
      "type": "http",
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "${input:anythingmcp-key}" }
    }
  }
}

If you get Copilot through an organization on Copilot Business or Enterprise, an admin has to enable the MCP servers in Copilot policy, which is off by default. Copilot Free, Pro, Pro+ and Max are not governed by that policy.

Other IDEs and Copilot CLI

Copilot also supports MCP in Visual Studio, JetBrains IDEs, Xcode and Eclipse, and in Copilot CLI. GitHub's documentation lists remote MCP support with OAuth or a token for these editors; where the configuration lives differs per IDE.

Steps checked against the vendor documentation on 25 September 2026:

What AnythingMCP adds

With AnythingMCP, Copilot's agent can reach your company's systems, not only your code: REST/OpenAPI, SOAP and GraphQL APIs and SQL databases become MCP tools without code, behind one URL in mcp.json. Per-user MCP API keys, role-based tool access and an audit log come with it. Run it on AnythingMCP Cloud (hosted in Frankfurt, 7-day free trial) or self-host it; it is open source under AGPL-3.0.

Browse ready-made connectors

GitHub Copilot MCP: frequently asked questions

Does GitHub Copilot support MCP?

Yes. MCP works in Copilot Chat in VS Code and other IDEs, in Copilot CLI, and for Copilot's agent on GitHub.com, where MCP servers are configured per repository.

Is MCP in GitHub Copilot free?

You need access to Copilot, and the free plan counts. For Copilot Business and Enterprise, the organization's MCP servers in Copilot policy must be enabled; it is off by default. Copilot Free, Pro, Pro+ and Max are not governed by that policy.

Where does VS Code store MCP servers?

.vscode/mcp.json in a workspace (a top-level servers object), a portable .mcp.json at the project root (an mcpServers object), or the mcp.json in your user profile, opened with MCP: Open User Configuration.

Remote or local MCP server: which one should I use with Copilot?

Local servers run on your machine as a command and can run arbitrary code, so VS Code asks you to trust them first. Remote servers are reached over HTTP ("type": "http"), can authenticate with OAuth or headers, and one server can serve a whole team.