Skip to content

Commit 2e07f60

Browse files
Merge pull request #312378 from ggailey777/lily-mcp-apps-fixup
[Functions][MCP] Apply Lily's fixes required for C# project updates
2 parents 90664f5 + 7853fc2 commit 2e07f60

1 file changed

Lines changed: 62 additions & 16 deletions

File tree

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

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ zone_pivot_groups: programming-languages-set-functions
1313

1414
# Quickstart: Build an MCP Apps using Azure Functions
1515

16-
In this quickstart, you create a Model Context Protocol (MCP) server from a template project by using the Azure Developer CLI (`azd`). This MCP server uses the Azure Functions MCP extension to create [MCP Apps](https://blog.modelcontextprotocol.io/posts/2026-01-26-mcp-apps/), which are tools that return rich, interactive user interfaces. You can also use the MCP server extension to [create text-based tools](./scenario-custom-remote-mcp-server.md).
16+
In this quickstart, you create a [Model Context Protocol (MCP) App](https://modelcontextprotocol.io/extensions/apps/overview) from a template project built using the Azure Functions MCP extension. MCP Apps are MCP servers with tools that return results in rich, interactive user interfaces instead of text. You deploy the app using the Azure Developer CLI (`azd`). You can also use the Azure Functions MCP extension to create MCP servers that have [text-based tools](./scenario-custom-remote-mcp-server.md).
1717

1818
After running the project locally and verifying your code by using GitHub Copilot, you deploy it to a new serverless function app in Azure Functions that follows current best practices for secure and scalable deployments.
1919

@@ -38,7 +38,7 @@ This article supports version 2 of the Python programming model for Azure Functi
3838
## Prerequisites
3939
::: zone-end
4040
::: zone pivot="programming-language-csharp"
41-
+ [.NET 10 SDK](https://dotnet.microsoft.com/download)
41+
+ [.NET 10 SDK](https://dotnet.microsoft.com/download)
4242
::: zone-end
4343
<!-- replace when supported
4444
::: zone pivot="programming-language-javascript,programming-language-typescript" -->
@@ -48,14 +48,25 @@ This article supports version 2 of the Python programming model for Azure Functi
4848
::: zone pivot="programming-language-python"
4949
+ [Python 3.11](https://www.python.org/)
5050
::: zone-end
51-
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
51+
::: zone pivot="programming-language-csharp"
52+
+ [Node.js](https://nodejs.org/) (required to build the MCP Apps UI)
53+
54+
+ [Visual Studio Code](https://code.visualstudio.com/) with this extension:
55+
56+
+ [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.
57+
58+
+ [Azure Developer CLI](/azure/developer/azure-developer-cli/install-azd) version 1.23.x or a later version
59+
::: zone-end
60+
::: zone pivot="programming-language-python,programming-language-typescript"
5261
+ [Node.js](https://nodejs.org/) (required to build the MCP Apps UI)
5362

5463
+ [Visual Studio Code](https://code.visualstudio.com/) with these extensions:
5564

5665
+ [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.
57-
+ [Azure Developer CLI extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azure-dev).
5866

67+
+ [Azure Developer CLI extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azure-dev).
68+
::: zone-end
69+
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
5970
+ [Azurite storage emulator](../storage/common/storage-install-azurite.md#install-azurite)
6071

6172
+ [Azure CLI](/cli/azure/install-azure-cli). You can also run Azure CLI commands in [Azure Cloud Shell](../cloud-shell/overview.md).
@@ -67,18 +78,21 @@ This article supports version 2 of the Python programming model for Azure Functi
6778
Use the Azure Developer CLI to create an Azure Functions code project from a template.
6879

6980
1. In Visual Studio Code, open a folder or workspace where you want to create your project.
70-
81+
::: zone-end
82+
::: zone pivot="programming-language-python,programming-language-typescript"
7183
1. Press <kbd>F1</kbd> to open the command palette. Search for and run `Azure Developer CLI (azd): init`.
7284

7385
1. When prompted, select **Select a template**.
7486

7587
::: zone-end
7688
::: zone pivot="programming-language-csharp"
77-
4. Search for and select **Remote MCP Functions with .NET**.
89+
2. Run the following command in the Terminal:
7890

79-
5. When prompted, enter `mcpweather-dotnet` as the environment name.
91+
```console
92+
azd init --template remote-mcp-functions-dotnet -e mcpweather-dotnet
93+
```
8094

81-
The command pulls the project files from the [template repository](https://github.com/Azure-Samples/remote-mcp-functions-dotnet) and initializes the project in the current folder. In `azd`, the environment maintains a unique deployment context for your app, and you can define more than one. It's also used in the name of the resource group you create in Azure.
95+
This command pulls the project files from the [template repository](https://github.com/Azure-Samples/remote-mcp-functions-dotnet) and initializes the project in the current folder. The -e flag sets a name for the current environment. In `azd`, the environment maintains a unique deployment context for your app, and you can define more than one. It's also used in names of the resources you create in Azure.
8296
::: zone-end
8397
::: zone pivot="programming-language-typescript"
8498
4. Search for and select **Remote MCP Functions with TypeScript**.
@@ -90,7 +104,7 @@ Use the Azure Developer CLI to create an Azure Functions code project from a tem
90104
::: zone pivot="programming-language-python"
91105
4. Search for and select **Remote MCP Functions with Python**.
92106

93-
1. When prompted, enter `mcpweather-python` as the environment name.
107+
5. When prompted, enter `mcpweather-python` as the environment name.
94108

95109
The command pulls the project files from the [template repository](https://github.com/Azure-Samples/remote-mcp-functions-python) and initializes the project in the current folder. In `azd`, the environment maintains a unique deployment context for your app, and you can define more than one. It's also used in the names of the resources you create in Azure.
96110
::: zone-end
@@ -154,15 +168,13 @@ The MCP Apps weather tool includes a frontend application that you must build be
154168
cd ../..
155169
```
156170

157-
::: zone-end
171+
::: zone-end
158172
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
159173
## Run your MCP server locally
160-
::: zone-end
161-
174+
::: zone-end
162175
::: zone pivot="programming-language-csharp"
163-
When Visual Studio Code asks you to pick a default project because there are two apps in the .NET template, select **src/McpWeatherApp**.
164-
::: zone-end
165-
176+
When prompted, select **src/McpWeatherApp**. You see this prompt because there are two projects in the solution, and the other project isn't used by this article.
177+
::: zone-end
166178
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
167179
[!INCLUDE [run-locally](../../includes/functions-mcp-run-locally.md)]
168180

@@ -234,8 +246,42 @@ You can view the complete project template in the [Azure Functions TypeScript MC
234246
After verifying the MCP Apps tools locally, you can publish the project to Azure.
235247

236248
## Deploy to Azure
237-
249+
::: zone-end
250+
::: zone pivot="programming-language-python,programming-language-typescript"
238251
[!INCLUDE [deploy-azure](../../includes/functions-mcp-deploy-azure.md)]
252+
::: zone-end
253+
254+
::: zone pivot="programming-language-csharp"
255+
This project is configured to use `azd` to deploy this project to a new function app in a Flex Consumption plan in Azure. The project includes a set of Bicep files that `azd` uses to create a secure deployment to a Flex Consumption plan that follows best practices.
256+
257+
1. In the Terminal, run this `azd env set` command:
258+
259+
```console
260+
azd env set DEPLOY_SERVICE weather
261+
```
262+
263+
This command sets the `DEPLOY_SERVICE` variable to provision `weather` app related resources
264+
265+
266+
1. Run the `azd provision` command and supply the required parameters to provision resources:
267+
268+
```console
269+
azd provision
270+
```
271+
272+
| Parameter | Description |
273+
| ---- | ---- |
274+
| _Azure subscription_ | Subscription in which your resources are created. |
275+
| _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. |
276+
| _vnetEnabled_ | `False` to skip creating virtual network resources, which simplifies the deployment. |
277+
When prompted, pick your subscription, an Azure region for the resources, and choose `false` to skip creating virtual network resources to simplify the deployment.
278+
279+
1. Run the `azd deploy` command to deploy the `weather` app to Azure:
280+
281+
```console
282+
azd deploy --service weather
283+
```
284+
::: zone-end
239285

240286
## Connect to your remote MCP server
241287

0 commit comments

Comments
 (0)