Skip to content

Commit f7b1aa4

Browse files
nhu-doCopilothubwritertimrogers
authored
Update docs to include Remote MCP support in CCA (#56499)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: hubwriter <hubwriter@github.com> Co-authored-by: Tim Rogers <timrogers@github.com>
1 parent d1ea412 commit f7b1aa4

File tree

2 files changed

+65
-13
lines changed

2 files changed

+65
-13
lines changed

content/copilot/how-tos/agents/copilot-coding-agent/asking-copilot-to-create-a-pull-request.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,30 @@ You can ask {% data variables.product.prodname_copilot_short %} to work on a tas
6666

6767
{% data variables.product.prodname_copilot_short %} will start a new session and respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
6868

69+
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the {% data variables.product.github %} MCP server
70+
71+
As an alternative to using {% data variables.copilot.copilot_chat_short %}, you can use the remote {% data variables.product.github %} MCP server to trigger {% data variables.copilot.copilot_coding_agent %} from any MCP host.
72+
73+
> [!NOTE]
74+
> * This capability is only available on the remote {% data variables.product.github %} MCP server and host applications where remote MCP servers are supported.
75+
76+
1. Install the {% data variables.product.github %} MCP server in your preferred IDE or agentic coding tool. See [AUTOTITLE](/copilot/how-tos/context/model-context-protocol/using-the-github-mcp-server).
77+
78+
1. Ensure the `create_pull_request_with_copilot` tool is enabled.
79+
80+
1. Open chat.
81+
82+
1. Type a prompt asking {% data variables.product.prodname_copilot_short %} to create a pull request, with the details of what you want to change.
83+
84+
For example, `Open a PR in my repository to expand unit test coverage.`
85+
86+
> [!TIP]
87+
> * You can ask {% data variables.product.prodname_copilot_short %} to open a pull request using a specific branch as the base branch by including it in your prompt.
88+
89+
1. Submit your prompt.
90+
91+
{% data variables.product.prodname_copilot_short %} will start a new session, open a draft pull request and work on the task in the background. As it works, it will push changes to the pull request, and once it has finished, it will add you as a reviewer. In most cases, the MCP host will show you the URL of the created pull request.
92+
6993
## Monitoring progress
7094

7195
You can view your current and past {% data variables.product.prodname_copilot_short %} sessions from the [Agents page](https://github.com/copilot/agents). See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/using-the-copilot-coding-agent-logs).

content/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ redirect_from:
2424

2525
{% data reusables.copilot.coding-agent.mcp-brief-intro %}
2626

27-
The agent can use tools provided by local MCP servers. Some MCP servers are configured by default to provide the best experience for getting started.
27+
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.
2828

2929
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).
3030

3131
> [!NOTE]
3232
> * {% data variables.copilot.copilot_coding_agent %} only supports tools provided by MCP servers. It does not support resources or prompts.
33-
> * {% 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).
33+
> * {% data variables.copilot.copilot_coding_agent %} does not currently support remote MCP servers that leverage OAuth for authentication and authorization.
3434
3535
## Default MCP servers
3636

@@ -77,14 +77,23 @@ You configure MCP servers using a special JSON format. The JSON must contain an
7777

7878
The configuration object can contain the following keys:
7979

80-
* `command` (`string`): The command to run to start the MCP server.
81-
* `args` (`string[]`): The arguments to pass to the `command`.
80+
**Required keys for local and remote MCP servers**
8281
* `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.
83-
* `type` (`string`): {% data variables.copilot.copilot_coding_agent %} only accepts `"local"`.
84-
* `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:
82+
* `type` (`string`): {% data variables.copilot.copilot_coding_agent %} accepts `"local"`, `"http"`, or `"sse"`.
83+
84+
**Local MCP specific keys**
85+
* `command` (`string`): Required. The command to run to start the MCP server.
86+
* `args` (`string[]`): Required. The arguments to pass to the `command`.
87+
* `env` (`object`): Optional. 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:
8588
* The name of a {% data variables.product.prodname_actions %} secret you have configured, beginning with `COPILOT_MCP_`.
8689
* A string value.
8790

91+
**Remote MCP specific keys**
92+
* `url` (`string`): Required. The MCP server's URL.
93+
* `headers` (`object`): Optional. The headers to attach to requests to the server. This object should map the name of header keys to either of the following:
94+
* The name of a {% data variables.product.prodname_actions %} secret you have configured, beginning with `COPILOT_MCP_` preceded by a `$`
95+
* A string value
96+
8897
### Example configurations
8998

9099
#### Example: Sentry
@@ -96,6 +105,7 @@ The [Sentry MCP server](https://github.com/getsentry/sentry-mcp) gives {% data v
96105
{
97106
"mcpServers": {
98107
"sentry": {
108+
"type": "local",
99109
"command": "npx",
100110
// We can use the $SENTRY_HOST environment variable which is passed to
101111
// the server because of the `env` value below.
@@ -122,6 +132,7 @@ The [Notion MCP server](https://github.com/makenotion/notion-mcp-server) gives {
122132
{
123133
"mcpServers": {
124134
"notionApi": {
135+
"type": "local",
125136
"command": "docker",
126137
"args": [
127138
"run",
@@ -185,19 +196,36 @@ To use the Azure MCP with {% data variables.copilot.copilot_coding_agent %}, you
185196
{
186197
"mcpServers": {
187198
"Azure": {
188-
"command": "npx",
189-
"args": [
190-
"-y",
191-
"@azure/mcp@latest",
192-
"server",
193-
"start"
199+
"type": "local",
200+
"command": "npx",
201+
"args": [
202+
"-y",
203+
"@azure/mcp@latest",
204+
"server",
205+
"start"
194206
],
195-
"tools": ["*"]
207+
"tools": ["*"]
196208
}
197209
}
198210
}
199211
```
200212

213+
#### Example: Cloudflare
214+
215+
The [Cloudflare MCP server](https://github.com/cloudflare/mcp-server-cloudflare) creates connections between your Cloudflare services, including processing documentation and data analysis.
216+
217+
```json copy
218+
{
219+
"mcpServers": {
220+
"cloudflare": {
221+
"type": "sse",
222+
"url": "https://docs.mcp.cloudflare.com/sse",
223+
"tools": ["*"]
224+
}
225+
}
226+
}
227+
```
228+
201229
### Reusing your MCP configuration from {% data variables.product.prodname_vscode %}
202230

203231
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 %}.

0 commit comments

Comments
 (0)