Co-authored-by: Claire W <78226508+crwaters16@users.noreply.github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> Co-authored-by: Jules <19994093+jules-p@users.noreply.github.com> Co-authored-by: Jules Porter <jules-p@users.noreply.github.com> Co-authored-by: hubwriter <hubwriter@github.com> Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
4.6 KiB
title, shortTitle, allowTitleToDifferFromFilename, intro, versions, topics, contentType, redirect_from, category
| title | shortTitle | allowTitleToDifferFromFilename | intro | versions | topics | contentType | redirect_from | category | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model Context Protocol (MCP) and GitHub Copilot coding agent | MCP and {% data variables.copilot.copilot_coding_agent_short %} | true | Find out about using the Model Context Protocol (MCP) with {% data variables.copilot.copilot_coding_agent %}. |
|
|
concepts |
|
|
Overview
{% data reusables.copilot.coding-agent.mcp-brief-intro %}
The agent can use tools provided by local and remote MCP servers. Some MCP servers are configured by default to provide the best experience for getting started.
For more information on MCP, see the official MCP documentation. For information on some of the currently available MCP servers, see the MCP servers repository.
{% data reusables.copilot.mcp.coding-agent-limitations %}
Default MCP servers
The following MCP servers are configured automatically for {% data variables.copilot.copilot_coding_agent %}:
-
{% data variables.product.github %}: The {% data variables.product.github %} MCP server gives {% data variables.product.prodname_copilot_short %} access to {% data variables.product.github %} data like issues and pull requests. To learn more, see AUTOTITLE.
- By default, the {% data variables.product.github %} MCP server connects to {% data variables.product.github %} using a specially scoped token that only has read-only access to the current repository. You can customize it to use a different token with broader access. For more details, see AUTOTITLE.
-
Playwright: The Playwright MCP server gives {% data variables.product.prodname_copilot_short %} access to web pages, including the ability to read, interact and take screenshots.
- By default, the Playwright MCP server is only able to access web resources hosted within {% data variables.product.prodname_copilot_short %}'s own environment, accessible on
localhostor127.0.0.1.
- By default, the Playwright MCP server is only able to access web resources hosted within {% data variables.product.prodname_copilot_short %}'s own environment, accessible on
Setting up MCP servers in a repository
Repository administrators can configure MCP servers for use within that repository. This is done via a JSON-formatted configuration that specifies the details of the MCP servers that {% data variables.copilot.copilot_coding_agent %} can use.
Once MCP servers are configured for use within a repository, the tools specified in the configuration will be available to {% data variables.copilot.copilot_coding_agent %} during each assigned task.
{% data variables.product.prodname_copilot_short %} will use available tools autonomously, and will not ask for approval before use.
For details of how to set up MCP servers for {% data variables.copilot.copilot_coding_agent %} in a repository, see AUTOTITLE.
MCP servers for {% data variables.copilot.custom_agents_short %}
Organization and enterprise administrators can also configure MCP servers as part of {% data variables.copilot.custom_agents_short %}.
MCP servers configured in {% data variables.copilot.custom_agents_short %} are available only to that specific agent and follow the same processing order as other MCP configurations, with {% data variables.copilot.copilot_custom_agent_short %} MCP settings processed after default servers but before repository-level configurations.
For more information on configuring MCP servers for {% data variables.copilot.custom_agents_short %}, see AUTOTITLE.
Best practices
-
Enabling third-party MCP servers for use may impact the performance of the agent and the quality of the outputs. Review the third-party MCP server thoroughly and ensure that it meets your organization’s requirements.
-
By default, {% data variables.copilot.copilot_coding_agent %} does not have access to write MCP server tools. However, some MCP servers do contain such tools. Be sure to review the tools available in the MCP server you want to use. Update the
toolsfield in the MCP configuration with only the necessary tooling. -
Carefully review the configured MCP servers prior to saving the configuration to ensure the correct servers are configured for use.