Integrate MCP servers with Copilot | Visual Studio Code Extension API
AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Integrate MCP servers with Copilot View as Markdown Ask in VS Code Ask in VS Code Insiders This reference helps Model Context Protocol (MCP) server and plugin authors integrate their tools with Copilot in VS Code.
It covers configuration, supported capabilities, and editor-specific integrations. The Copilot harness uses the Copilot SDK, the shared agent runtime used by VS Code, GitHub Copilot CLI , and the GitHub Copilot app . Building for its MCP support makes the same server usable across these compatible Copilot experiences, not only in the editor. Your server implements MCP and doesn't need to depend on the Copilot SDK. Make your server available: choose a delivery method .
Check compatibility: review Copilot capability support and connected-client requirements. Maintain an existing Local integration: expand the deprecated Local compatibility appendix The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation . . For protocol and server implementation guidance, use the MCP documentation and SDKs .
Tip For information about using MCP servers as an end user, see Use MCP servers in VS Code . Make your server available to Copilot Use a managed connection for a supported service, or distribute your own server configuration or integration: Delivery method When to use it Copilot connector Copilot connectors is in preview and might change before it becomes generally available. Use a GitHub-managed MCP connection for a supported service.
GitHub handles configuration and authentication, with no local server setup. Native configuration Provide a launch command or HTTP endpoint that compatible Copilot clients can use without an editor extension. Agent plugin Bundle the server with skills and other customizations for a reusable workflow. Servers load through the plugin, not as copies in an editor profile. Connected-editor integration Offer an installation URL or register the server from an extension .
Eligible editor-provided definitions can be forwarded to the runtime. Connectors reuse the managed connection across supported Copilot clients signed in with the same account. For self-managed servers, prefer native configuration or an agent plugin for cross-client reuse. Each execution host needs the required dependencies, credentials, and service access. Editor-dependent features don't automatically transfer to another client.
Native configuration In VS Code, users add servers through Chat: Open Customizations > MCP Servers > Add Server . Global > Copilot Global selects the native user configuration. Link your installation instructions to the connection walkthrough . For manual configuration, provide an entry using the portable mcpServers format. This example connects to an HTTP server: { "mcpServers" : { "myService" : { "type" : "http" , "url" : "https://example.com/mcp" , "tools" : [ "*" ] } } } Replace the example URL with your server's MCP endpoint and document any authentication requirements.
Don't include credentials in shared configuration. The harness reads native configuration directly on the host where it runs: Workspace: .mcp.json at the workspace root. User: $COPILOT_HOME/mcp-config.json , or ~/.copilot/mcp-config.json when COPILOT_HOME is unset. For stdio commands, supported fields, secrets, and remote hosts, see the MCP configuration reference . Don't use the deprecated Local servers format for new native configurations.
Before distributing an integration, verify an actual tool call in the intended Copilot experience. Adding configuration alone doesn't confirm that the session can use its tools. For failures, see MCP troubleshooting . MCP support in Copilot Start with tools, then add capabilities that your integration needs. Support depends on both the Copilot harness that runs the session and the client that presents it. Some capabilities require a connected client, such as the editor that renders MCP Apps or handles authentication.
Capability Support and limitations in Copilot Tools Invokes server tools under the session's tool availability and approval policies. Sampling Deprecated in MCP. Supported on compatible connections during an active turn, with per-server approval. Elicitation Presents form and URL requests through host-rendered input during an active turn. MCP Apps Displays interactive tool UI in a connected client that renders MCP Apps.
This integration is Experimental. Authorization Supports MCP OAuth with authentication handled by the connected client. Resources Reads resources for MCP Apps. Native servers don't automatically appear in the editor's resource browser. Roots Deprecated in MCP. Existing integrations must check the runtime's negotiated capability and returned roots. Prompts The editor's /mcp.<server>.<prompt> completion flow isn't exposed in Copilot sessions.
Use skills to distribute reusable workflows. This table describes available integrations, not full MCP specification conformance. Check the capabilities negotiated with the target client and match your implementation to the SDK's protocol-version guidance . Sampling and roots are deprecated in MCP 2026-07-28 , so prefer their alternatives for new integrations. For stdio , Streamable HTTP, and legacy SSE transport configuration, see the MCP configuration reference .
Tools For native servers, tool availability depends on the server's tools filter and the controls for the selected harness. See native MCP configuration and tool management . Tool approval depends on session permissions, organization policy, and existing approvals. Don't assume every call prompts the user or that readOnlyHint bypasses approval. Tool annotations describe behavior, not permission grants. If your server uses dynamic tool discovery , verify tool-list changes in each target Copilot client.
Clients can refresh their tool catalogs differently, and discovered tools still need to pass the session's availability filters. Resources In Copilot sessions, MCP Apps can read resources, but native servers don't automatically appear in the editor's resource browser. Return content in a tool result when the agent needs it to complete a task, rather than relying on resource discovery. For editor-managed browsing, see the Local compatibility appendix .
Prompts To distribute reusable workflows for Copilot, bundle skills in an agent plugin . Skills are separate from the MCP prompts protocol. The editor's /mcp.<server>.<prompt> picker and argument dialogs aren't exposed in Copilot sessions. For existing integrations that still need this workflow, expand the Local compatibility appendix and see Local prompt commands . Authorization Copilot sessions support MCP servers that require OAuth authentication.
For directly configured servers, the runtime requests authentication through the connected client. VS Code stores these credentials, rather than relying on the runtime's keychain store. Choose an authentication method that works with your configuration source. An editor input variable or an extension's SecretStorage value isn't automatically forwarded to a native server. See authentication and secrets . Connected-editor OAuth integration The connected editor provides OAuth integration for Copilot sessions, including built-in authentication support for GitHub and Microsoft Entra.
It also supports other OAuth identity providers through Dynamic Client Registration (DCR) or a pre-registered OAuth client. For your server integration: Implement the MCP authorization specification . Choose an identity provider that supports DCR, or provide instructions for a pre-registered client ID and, when required, a client secret. This isn't the OAuth cl
The rest of this page is on the live site.