Skip to main content
Watch: I Built an AI App Without Leaving Databricks

MCP client - Microsoft - verified

How to add an MCP server to VS Code (GitHub Copilot agent mode)

Where to add MCP servers in VS Code (GitHub Copilot agent mode): Workspace: .vscode/mcp.json (top-level servers) or portable .mcp.json at the workspace root (top-level mcpServers); User: mcp.json in the user profile (MCP: Open User Configuration) or $COPILOT_HOME/mcp-config.json, falling back to ~/.copilot/mcp-config.json. Its docs list support for stdio, Streamable HTTP and SSE. It handles OAuth sign-in for remote servers.

VS Code (GitHub Copilot agent mode) homepage - GitHub Copilot in our tools directory - Compare all MCP clients

Kind
Editor
stdio
Yes
Streamable HTTP
Yes
SSE
Yes

Add a server

Where the config lives
Workspace: .vscode/mcp.json (top-level servers) or portable .mcp.json at the workspace root (top-level mcpServers); User: mcp.json in the user profile (MCP: Open User Configuration) or $COPILOT_HOME/mcp-config.json, falling back to ~/.copilot/mcp-config.json

The example from the VS Code (GitHub Copilot agent mode) docs, copied verbatim. Swap in your server's name, command or URL.

JSON
{
  "servers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Source: code.visualstudio.com/docs/agents/reference/mcp-configuration

Which server?

Pick a server from the verified directory of official MCP servers. Each one lists its transport, auth and the setup snippets its vendor publishes, so you can match it to what VS Code (GitHub Copilot agent mode) supports.

MCP support

What the VS Code (GitHub Copilot agent mode) docs say it supports. Not stated means the docs do not say either way.

VS Code (GitHub Copilot agent mode) MCP features, transports and OAuth, each with its source
FeatureValueSource
ToolsCalls the functions a server exposes.Yescode.visualstudio.com/api/extension-guides/ai/mcp
ResourcesReads data and files a server exposes as resources.Yescode.visualstudio.com/api/extension-guides/ai/mcp
PromptsOffers a server's prompt templates to the user.Yescode.visualstudio.com/api/extension-guides/ai/mcp
SamplingLets a server ask the client's model for a completion.Yescode.visualstudio.com/api/extension-guides/ai/mcp
RootsTells a server which directories it may work in.Yescode.visualstudio.com/api/extension-guides/ai/mcp
ElicitationLets a server ask the user for input mid-task.Yescode.visualstudio.com/api/extension-guides/ai/mcp
DiscoveryPicks up tools, prompts or resources a server adds or removes while connected.Yescode.visualstudio.com/api/extension-guides/ai/mcp
InstructionsUses the instructions a server sends when it connects.Yescode.visualstudio.com/api/extension-guides/ai/mcp
stdioStarts a local server as a subprocess.Yescode.visualstudio.com/api/extension-guides/ai/mcp
Streamable HTTPConnects to a remote server over the current HTTP transport.Yescode.visualstudio.com/api/extension-guides/ai/mcp
SSEConnects over the older HTTP+SSE transport.Yescode.visualstudio.com/docs/agents/reference/mcp-configuration
OAuthSigns in to remote servers with OAuth.Yescode.visualstudio.com/docs/agents/reference/mcp-configuration

Worth knowing

The VS Code MCP developer guide says VS Code implements the full MCP specification, and lists tools, prompts, resources, elicitation, sampling, OAuth authentication, server instructions, roots, MCP Apps and dynamic tool discovery as supported.

FAQ

Where is the VS Code (GitHub Copilot agent mode) MCP config?

Workspace: .vscode/mcp.json (top-level servers) or portable .mcp.json at the workspace root (top-level mcpServers); User: mcp.json in the user profile (MCP: Open User Configuration) or $COPILOT_HOME/mcp-config.json, falling back to ~/.copilot/mcp-config.json. The example on this page is copied from https://code.visualstudio.com/docs/agents/reference/mcp-configuration

Does VS Code (GitHub Copilot agent mode) support remote MCP servers over Streamable HTTP?

Yes, per https://code.visualstudio.com/api/extension-guides/ai/mcp. Its docs list support for stdio, Streamable HTTP and SSE.

Does VS Code (GitHub Copilot agent mode) support OAuth for MCP servers?

Yes. It handles OAuth sign-in for remote servers. Source: https://code.visualstudio.com/docs/agents/reference/mcp-configuration

Which MCP features does VS Code (GitHub Copilot agent mode) support?

Its docs list Tools, Resources, Prompts, Sampling, Roots, Elicitation, Discovery and Instructions.

Sources

Last verified from the pages below.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.