Skip to content

Commit 95420e1

Browse files
committed
Update MCP documentation to enhance clarity on local server setup and GitHub Copilot integration
1 parent 215a7eb commit 95420e1

5 files changed

Lines changed: 45 additions & 55 deletions

File tree

articles/azure-functions/scenario-custom-remote-mcp-server.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,24 +121,27 @@ Use the `azd init` command to create a local Azure Functions code project from a
121121
[!INCLUDE [start-storage-emulator](../../includes/functions-mcp-start-storage-emulator.md)]
122122

123123
## Run your MCP server locally
124+
::: zone-end
125+
::: zone pivot="programming-language-csharp"
126+
In a terminal window, navigate to the `FunctionsMcpTool` project folder:
127+
128+
```console
129+
cd src/FunctionsMcpTool
130+
```
131+
::: zone-end
132+
::: zone pivot="programming-language-csharp,programming-language-java,programming-language-python,programming-language-typescript"
124133

125134
[!INCLUDE [run-locally](../../includes/functions-mcp-run-locally.md)]
126135

127136
## Verify using GitHub Copilot
128137

129-
To verify your code, add the running project as an MCP server for GitHub Copilot in Visual Studio Code:
130-
131-
1. Press <kbd>F1</kbd>. In the command palette, search for and run **MCP: Add Server**.
132-
133-
1. Choose **HTTP (Server-Sent Events)** for the transport type.
134-
135-
1. Enter the URL of the MCP endpoint you copied in the previous step.
138+
The project template includes a `.vscode/mcp.json` file that already defines a `local-mcp-function` server pointing to your local MCP endpoint. Use this configuration to verify your code with GitHub Copilot in Visual Studio Code:
136139

137-
1. Use the generated **Server ID** and select **Workspace** to save the MCP server connection to your Workspace settings.
140+
1. Open the `.vscode/mcp.json` file and select the **Start** button above the `local-mcp-function` configuration.
138141

139-
1. Open the command palette and run **MCP: List Servers** and verify that the server you added is listed and running.
142+
1. In the Copilot **Chat** window, make sure that the **Agent** mode is selected, select the **Configure tools** icon, and verify that `MCP Server:local-mcp-function` is enabled in the chat.
140143

141-
1. In Copilot chat, select **Agent** mode and run this prompt:
144+
1. Run this prompt:
142145

143146
```copilot-prompt
144147
Say Hello

articles/azure-functions/scenario-mcp-apps.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This article supports version 2 of the Python programming model for Azure Functi
5252
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
5353
+ [Node.js](https://nodejs.org/) (required to build the MCP Apps UI)
5454

55-
+ [Visual Studio Code Insiders](https://code.visualstudio.com/insiders) with these extensions:
55+
+ [Visual Studio Code](https://code.visualstudio.com/) with these extensions:
5656

5757
+ [Azure Functions extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions). This extension requires [Azure Functions Core Tools](functions-run-local.md) and attempts to install it when not available.
5858
+ [Azure Developer CLI extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azure-dev).
@@ -63,9 +63,6 @@ This article supports version 2 of the Python programming model for Azure Functi
6363

6464
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
6565

66-
> [!IMPORTANT]
67-
> MCP Apps require [Visual Studio Code Insiders](https://code.visualstudio.com/insiders). The stable release of VS Code doesn't yet support rendering MCP App UI resources.
68-
6966
## Initialize the project
7067

7168
Use the Azure Developer CLI to create an Azure Functions code project from a template.
@@ -166,19 +163,13 @@ The MCP Apps weather tool includes a frontend application that you must build be
166163

167164
## Verify by using GitHub Copilot
168165

169-
To verify your code, add the running project as an MCP server for GitHub Copilot in Visual Studio Code:
170-
171-
1. Press <kbd>F1</kbd>. In the command palette, search for and run **MCP: Add Server**.
172-
173-
1. Choose **HTTP (Server-Sent Events)** for the transport type.
166+
The project template includes a `.vscode/mcp.json` file that already defines a `local-mcp-function` server pointing to your local MCP endpoint. Use this configuration to verify your code with GitHub Copilot in Visual Studio Code:
174167

175-
1. Enter the URL of the MCP endpoint you copied in the previous step.
168+
1. Open the `.vscode/mcp.json` file and select the **Start** button above the `local-mcp-function` configuration.
176169

177-
1. Use the generated **Server ID** and select **Workspace** to save the MCP server connection to your Workspace settings.
170+
1. In the Copilot **Chat** window, make sure that the **Agent** mode is selected, select the **Configure tools** icon, and verify that `MCP Server:local-mcp-function` is enabled in the chat.
178171

179-
1. Open the command palette and run **MCP: List Servers** and verify that the server you added is listed and running.
180-
181-
1. In Copilot chat, select **Agent** mode and run this prompt:
172+
1. Run this prompt:
182173

183174
```copilot-prompt
184175
What's the weather in Seattle?
@@ -207,13 +198,13 @@ The `ToolMetadata` constant declares a `ui.resourceUri` that tells the MCP host
207198
You can view the complete project template in the [Azure Functions .NET MCP Server](https://github.com/Azure-Samples/remote-mcp-functions-dotnet) GitHub repository.
208199
::: zone-end
209200
::: zone pivot="programming-language-python"
210-
The function code for the MCP Apps weather tool is defined in the `src/function_app.py` file. The `metadata` parameter on `@app.mcp_tool()` adds UI metadata to the tool, and `@app.mcp_resource_trigger()` serves the HTML widget:
201+
The function code for the MCP Apps weather tool is defined in the `src/function_app.py` file. The `metadata` parameter on `@app.mcp_tool()` adds UI metadata to the tool:
211202

212203
:::code language="python" source="~/functions-scenarios-custom-mcp-python/src/function_app.py" range="109-130" :::
213204

214-
:::code language="python" source="~/functions-scenarios-custom-mcp-python/src/function_app.py" range="64-105" :::
205+
The `TOOL_METADATA` constant declares a `ui.resourceUri` that tells the MCP host to fetch the interactive UI from `ui://weather/index.html` after the tool runs. The `@app.mcp_resource_trigger()` method serves the HTML widget. The `get_weather_widget` function serves the bundled HTML file at that URI using `@app.mcp_resource_trigger()`:
215206

216-
The `TOOL_METADATA` constant declares a `ui.resourceUri` that tells the MCP host to fetch the interactive UI from `ui://weather/index.html` after the tool runs. The `get_weather_widget` function serves the bundled HTML file at that URI using `@app.mcp_resource_trigger()`.
207+
:::code language="python" source="~/functions-scenarios-custom-mcp-python/src/function_app.py" range="64-105" :::
217208

218209
You can view the complete project template in the [Azure Functions Python MCP Server](https://github.com/Azure-Samples/remote-mcp-functions-python) GitHub repository.
219210
::: zone-end

includes/functions-mcp-connect-remote.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ ms.date: 02/20/2026
66
ms.author: glenga
77
---
88

9-
Your MCP server is now running in Azure. When you access the tools, you need to include a system key in your request. This key provides a degree of access control for clients accessing your remote MCP server. After you get this key, you can connect GitHub Copilot to your remote server.
9+
Your MCP server is now running in Azure. The project template includes a `remote-mcp-function` entry in `.vscode/mcp.json` that's already configured to connect to your remote server. When you start this server, VS Code prompts you for the function app name and system key needed to access the remote MCP endpoint.
1010

11-
1. Run this script that uses `azd` and the Azure CLI to print out both the MCP server URL and the system key (`mcp_extension`) required to access the tools:
11+
1. Run this script that uses `azd` and the Azure CLI to print out both the function app name and the system key (`mcp_extension`) required to access the tools:
1212

1313
### [Linux/macOS](#tab/linux)
1414

1515
```bash
1616
eval $(azd env get-values --output dotenv)
1717
MCP_EXTENSION_KEY=$(az functionapp keys list --resource-group $AZURE_RESOURCE_GROUP \
1818
--name $AZURE_FUNCTION_NAME --query "systemKeys.mcp_extension" -o tsv)
19-
printf "MCP Server URL: %s\n" "https://$SERVICE_API_NAME.azurewebsites.net/runtime/webhooks/mcp"
19+
printf "Function app name: %s\n" "$SERVICE_API_NAME"
2020
printf "MCP Server key: %s\n" "$MCP_EXTENSION_KEY"
2121
```
2222

@@ -30,28 +30,12 @@ Your MCP server is now running in Azure. When you access the tools, you need to
3030
}
3131
$MCP_EXTENSION_KEY = az functionapp keys list --resource-group $AZURE_RESOURCE_GROUP `
3232
--name $AZURE_FUNCTION_NAME --query "systemKeys.mcp_extension" -o tsv
33-
Write-Host "MCP Server URL: https://$SERVICE_API_NAME.azurewebsites.net/runtime/webhooks/mcp"
33+
Write-Host "Function app name: $SERVICE_API_NAME"
3434
Write-Host "MCP Server key: $MCP_EXTENSION_KEY"
3535
```
3636
3737
---
3838
39-
1. In Visual Studio Code, press <kbd>F1</kbd> to open the command palette, search for and run the command `MCP: Open Workspace Folder MCP Configuraton`, which opens the `mcp.json` configuration file.
40-
41-
1. In the `mcp.json` configuration, find the named MCP server you added earlier, change the `url` value to your remote MCP server URL, and add a `headers.x-functions-key` element, which contains your copied MCP server access key, as in this example:
42-
43-
```json
44-
{
45-
"servers": {
46-
"remote-mcp-function": {
47-
"type": "http",
48-
"url": "https://contoso.azurewebsites.net/runtime/webhooks/mcp",
49-
"headers": {
50-
"x-functions-key": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u..."
51-
}
52-
}
53-
}
54-
}
55-
```
39+
1. In `.vscode/mcp.json`, select **Start** above the `remote-mcp-function` configuration.
5640
57-
1. Select the **Start** button above your server name in the open `mcp.json` to restart the remote MCP server, this time using your deployed app.
41+
1. When prompted, enter the function app name and system key values from the previous step.

includes/functions-mcp-deploy-azure.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ This project is configured to use `azd` to deploy this project to a new function
1010

1111
1. In Visual Studio Code, press <kbd>F1</kbd> to open the command palette. Search for and run the command `Azure Developer CLI (azd): Package, Provision and Deploy (up)`. Then, sign in by using your Azure account.
1212

13-
1. When prompted, provide these required deployment parameters:
13+
1. When prompted, select these required deployment parameters:
1414

1515
| Parameter | Description |
1616
| ---- | ---- |
17-
| _Azure subscription_ | Subscription in which your resources are created.|
18-
| _Azure location_ | Azure region in which to create the resource group that contains the new Azure resources. Only regions that currently support the Flex Consumption plan are shown.|
17+
| _Azure subscription_ | Subscription in which your resources are created. |
18+
| _Azure location_ | Azure region in which to create the resource group that contains the new Azure resources. Only regions that currently support the Flex Consumption plan are shown. |
19+
| _vnetEnabled_ | `False` to skip creating virtual network resources, which simplifies the deployment. |
1920

2021
After the command completes successfully, you see links to the resources you created.

includes/functions-mcp-run-locally.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@ ms.date: 02/20/2026
66
ms.author: glenga
77
---
88

9-
Visual Studio Code integrates with [Azure Functions Core tools](../articles/azure-functions/functions-run-local.md) to let you run this project on your local development computer by using the Azurite emulator.
9+
::: zone pivot="programming-language-csharp"
1010

11-
1. To start the function locally, press <kbd>F5</kbd> or the **Run and Debug** icon in the left-hand side Activity bar. The **Terminal** panel displays the output from Core Tools. Your app starts in the **Terminal** panel, and you can see the name of the functions that are running locally.
11+
In a terminal window, start the Functions host:
1212

13-
1. Make a note of the local MCP server endpoint (like `http://localhost:7071/runtime/webhooks/mcp`), which you use to configure GitHub Copilot in Visual Studio Code.
13+
```console
14+
func start
15+
```
16+
17+
::: zone-end
18+
::: zone pivot="programming-language-java,programming-language-python,programming-language-typescript"
19+
20+
Visual Studio Code integrates with [Azure Functions Core tools](../articles/azure-functions/functions-run-local.md) to let you run this project on your local development computer. To start your Functions app locally, press <kbd>F5</kbd> or select the **Run and Debug** icon in the left-hand side Activity bar.
21+
22+
::: zone-end
23+
24+
The **Terminal** panel displays the output from Core Tools. Your app starts in the **Terminal** panel, and you can see the names of the functions running locally.

0 commit comments

Comments
 (0)