Skip to content

Commit f12fd0b

Browse files
timrogersfelicitymayhubwriterSiaraMist
authored
Tweak Copilot coding agent docs (#56147)
Co-authored-by: Felicity Chapman <[email protected]> Co-authored-by: hubwriter <[email protected]> Co-authored-by: Siara <[email protected]>
1 parent 8b17a7e commit f12fd0b

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

content/copilot/using-github-copilot/coding-agent/best-practices-for-using-copilot-to-work-on-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ This is a Go based repository with a Ruby client for certain API endpoints. It i
105105

106106
## Using the Model Context Protocol (MCP)
107107

108-
You can extend the capabilities of {% data variables.copilot.copilot_coding_agent %} by using MCP. This allows {% data variables.copilot.copilot_coding_agent %} use tools provided by local MCP servers. For more information, see [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp).
108+
You can extend the capabilities of {% data variables.copilot.copilot_coding_agent %} by using MCP. This allows {% data variables.copilot.copilot_coding_agent %} to use tools provided by local MCP servers. The {% data variables.product.github %} MCP server is enabled by default. For more information, see [AUTOTITLE](/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp).
109109

110110
## Pre-installing dependencies in {% data variables.product.prodname_copilot %}'s environment
111111

content/copilot/using-github-copilot/coding-agent/extending-copilot-coding-agent-with-mcp.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,31 @@ redirect_from:
2121
2222
{% data reusables.copilot.coding-agent.mcp-brief-intro %}
2323

24-
The agent can use tools provided by local MCP servers. For example, the [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools to interact with web pages and pull in additional context when executing on the requested task.
24+
The agent can use tools provided by local MCP servers. For example, the [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools to interact with web pages and pull in additional context when executing on the requested task. Some MCP servers are configured by default to provide the best experience for getting started.
2525

2626
For more information on MCP, see [the official MCP documentation](https://modelcontextprotocol.io/introduction). For information on some of the currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
2727

2828
> [!NOTE]
2929
> * {% data variables.copilot.copilot_coding_agent %} only supports tools provided by MCP servers. It does not support resources or prompts.
3030
> * {% data variables.copilot.copilot_coding_agent %} currently only supports local MCP servers. To learn more about transport types, see the [official MCP documentation](https://modelcontextprotocol.io/docs/concepts/transports).
3131
32-
## Staying safe with MCP servers
32+
## Default MCP servers
3333

34-
Once you've configured an MCP server, {% data variables.product.prodname_copilot_short %} will be able to use the tools provided by the server autonomously, and will not ask for your approval before using them.
34+
The following MCP servers are configured automatically for {% data variables.copilot.copilot_coding_agent %}:
3535

36-
We recommend that you restrict your servers to read-only tools. You can use the `tools` configuration option to only expose known, safe tools to {% data variables.product.prodname_copilot_short %}.
36+
* **{% 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](/copilot/customizing-copilot/using-model-context-protocol/using-the-github-mcp-server).
37+
* 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 [Customizing the built-in {% data variables.product.github %} MCP server](#customizing-the-built-in-github-mcp-server) below.
3738

38-
## About setting up MCP servers in a repository
39+
## Setting up MCP servers in a repository
40+
41+
> [!WARNING]
42+
> Once you've configured an MCP server, {% data variables.product.prodname_copilot_short %} will be able to use the tools provided by the server autonomously, and will not ask for your approval before using them.
3943
4044
As a repository administrator, you can configure MCP servers for use within your repository. This is done via a JSON-formatted configuration that specifies the details of the MCP servers you want to use. You enter the JSON configuration directly into the settings for the repository on {% data variables.product.prodname_dotcom_the_website %}.
4145

42-
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 %} on each assigned task.
46+
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.
47+
48+
{% data variables.product.prodname_copilot_short %} will use available tools autonomously, and will not ask for approval before use.
4349

4450
### Creating your JSON MCP configuration
4551

@@ -67,15 +73,15 @@ The configuration object can contain the following keys:
6773

6874
* `command` (`string`): The command to run to start the MCP server.
6975
* `args` (`string[]`): The arguments to pass to the `command`.
70-
* `tools` (`string[]`): The tools from the MCP server to enable. You may be able to find a list of tools in the server's documentation, or in its code. We recommend that you allowlist specific tools, but you can also enable all tools by including `*` in the array.
76+
* `tools` (`string[]`): The tools from the MCP server to enable. You may be able to find a list of tools in the server's documentation, or in its code. We strongly recommend that you allowlist specific read-only tools, since the agent will be able to use these tools autonomously and will not ask you for approval first. You can also enable all tools by including `*` in the array.
7177
* `type` (`string`): Optional field. {% data variables.copilot.copilot_coding_agent %} only accepts `"local"`.
7278
* `env` (`object`): The environment variables to pass to the server. This object should map the name of the environment variable that should be exposed to your MCP server to either of the following:
7379
* The name of a {% data variables.product.prodname_actions %} secret you have configured, beginning with `COPILOT_MCP_`.
7480
* A string value.
7581

76-
## Example configurations
82+
### Example configurations
7783

78-
### Example: Playwright
84+
#### Example: Playwright
7985

8086
The [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools which allow {% data variables.product.prodname_copilot_short %} to browse the internet.
8187

@@ -91,7 +97,7 @@ The [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provide
9197
}
9298
```
9399

94-
### Example: Sentry
100+
#### Example: Sentry
95101

96102
The [Sentry MCP server](https://github.com/getsentry/sentry-mcp) gives {% data variables.product.prodname_copilot_short %} authenticated access to exceptions recorded in [Sentry](https://sentry.io).
97103

@@ -117,7 +123,7 @@ The [Sentry MCP server](https://github.com/getsentry/sentry-mcp) gives {% data v
117123
}
118124
```
119125

120-
### Example: Notion
126+
#### Example: Notion
121127

122128
The [Notion MCP server](https://github.com/makenotion/notion-mcp-server) gives {% data variables.product.prodname_copilot_short %} authenticated access to notes and other content from [Notion](https://notion.so).
123129

@@ -148,7 +154,7 @@ The [Notion MCP server](https://github.com/makenotion/notion-mcp-server) gives {
148154
}
149155
```
150156

151-
### Example: Azure
157+
#### Example: Azure
152158

153159
The [Azure MCP server](https://github.com/Azure/azure-mcp) creates a seamless connection between {% data variables.product.prodname_copilot_short %} and key Azure services such as Azure Cosmos DB and the Azure Storage platform.
154160

@@ -202,7 +208,7 @@ To use the Azure MCP with {% data variables.copilot.copilot_coding_agent %}, you
202208
}
203209
```
204210

205-
## Reusing your MCP configuration from {% data variables.product.prodname_vscode %}
211+
### Reusing your MCP configuration from {% data variables.product.prodname_vscode %}
206212

207213
If you have already configured MCP servers in {% data variables.product.prodname_vscode_shortname %}, you can leverage a similar configuration for {% data variables.copilot.copilot_coding_agent %}.
208214

@@ -217,7 +223,7 @@ To adapt the configuration for {% data variables.copilot.copilot_coding_agent %}
217223

218224
For more information on MCP in {% data variables.product.prodname_vscode_shortname %}, see the [{% data variables.product.prodname_vscode_shortname %} docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
219225

220-
## Adding your configuration to your repository
226+
### Adding your configuration to your repository
221227

222228
Repository administrators can configure MCP servers by following these steps:
223229

@@ -245,7 +251,7 @@ You must be a repository administrator to configure a {% data variables.product.
245251
1. Under "Environment secrets", click **Add environment secret**.
246252
1. Give the secret a name beginning `COPILOT_MCP_`, add the secret value, then click **Add secret**.
247253

248-
## Validating your MCP configuration
254+
### Validating your MCP configuration
249255

250256
Once you've set up your MCP configuration, you should test it to make sure it is set up correctly.
251257

@@ -262,9 +268,7 @@ If your MCP servers require any dependencies that are not installed on the {% da
262268

263269
## Customizing the built-in {% data variables.product.github %} MCP server
264270

265-
The {% data variables.product.github %} MCP server is enabled by default, giving {% data variables.product.prodname_copilot_short %} access to {% data variables.product.github %} data like issues and pull requests.
266-
267-
By default, the MCP server connects to {% data variables.product.github %} with a specially scoped token that only has read-only access to the current repository.
271+
The {% data variables.product.github %} MCP server is enabled by default and connects to {% data variables.product.github %} with a specially scoped token that only has read-only access to the current repository.
268272

269273
If you want to allow {% data variables.product.prodname_copilot_short %} to access data outside the current repository, you can give it a {% data variables.product.pat_generic %} with wider access.
270274

content/copilot/using-github-copilot/coding-agent/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ topics:
77
- Copilot
88
children:
99
- /about-assigning-tasks-to-copilot
10-
- /best-practices-for-using-copilot-to-work-on-tasks
1110
- /enabling-copilot-coding-agent
1211
- /using-copilot-to-work-on-an-issue
1312
- /asking-copilot-to-create-a-pull-request
1413
- /reviewing-a-pull-request-created-by-copilot
1514
- /using-the-copilot-coding-agent-logs
1615
- /extending-copilot-coding-agent-with-mcp
16+
- /best-practices-for-using-copilot-to-work-on-tasks
1717
- /troubleshooting-copilot-coding-agent
1818
redirect_from:
1919
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks

0 commit comments

Comments
 (0)