You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Quickstart: Build an MCP Apps using Azure Functions
15
15
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).
17
17
18
18
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.
19
19
@@ -38,7 +38,7 @@ This article supports version 2 of the Python programming model for Azure Functi
::: 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
48
48
::: zone pivot="programming-language-python"
49
49
+[Python 3.11](https://www.python.org/)
50
50
::: 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"
52
61
+[Node.js](https://nodejs.org/) (required to build the MCP Apps UI)
53
62
54
63
+[Visual Studio Code](https://code.visualstudio.com/) with these extensions:
55
64
56
65
+[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.
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.
82
96
::: zone-end
83
97
::: zone pivot="programming-language-typescript"
84
98
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
90
104
::: zone pivot="programming-language-python"
91
105
4. Search for and select **Remote MCP Functions with Python**.
92
106
93
-
1. When prompted, enter `mcpweather-python` as the environment name.
107
+
5. When prompted, enter `mcpweather-python` as the environment name.
94
108
95
109
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.
96
110
::: zone-end
@@ -154,15 +168,13 @@ The MCP Apps weather tool includes a frontend application that you must build be
154
168
cd ../..
155
169
```
156
170
157
-
::: zone-end
171
+
::: zone-end
158
172
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
159
173
## Run your MCP server locally
160
-
::: zone-end
161
-
174
+
::: zone-end
162
175
::: 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
166
178
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript"
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:
0 commit comments