Skip to content
Back to search

remote-mcp-functions-dotnet

This is a quickstart template to easily build and deploy a custom remote MCP server to the cloud using Azure functions. You can clone/restore/run on your local machine with debugging, and `azd up` to have it in the cloud in a couple minutes. The MCP server is secured by design using

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/azure-samples--remote-mcp-functions-dotnet/badge.svg)](/listings/azure-samples--remote-mcp-functions-dotnet)

HTML

<a href="/listings/azure-samples--remote-mcp-functions-dotnet"><img src="/api/listings/azure-samples--remote-mcp-functions-dotnet/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

This repo has a collection of samples to help you easily build and deploy a custom remote MCP server to the cloud using Azure functions. You can clone/restore/run on your local machine with debugging, and `azd up` to have a server in the cloud in a couple minutes.

All sample MCP servers are configured with [built-in authentication](https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization) using Microsoft Entra as the identity provider.

You can also use [API Management](https://learn.microsoft.com/azure/api-management/secure-mcp-servers) to secure the server, as well as network isolation using VNET.

If you're looking for samples in more languages check out the [Node.js/TypeScript](https://github.com/Azure-Samples/remote-mcp-functions-typescript) and [Python](https://github.com/Azure-Samples/remote-mcp-functions-python) samples.

Prerequisites

Required for all development approaches

+ [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) + [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local?pivots=programming-language-csharp#install-the-azure-functions-core-tools) >= `4.5.0` + [Azure Developer CLI](https://aka.ms/azd) **1.23.x or above** (for deployment) + [Docker](https://www.docker.com/) (for the Azurite storage emulator)

For Visual Studio development

+ [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) + Make sure to select the **Azure development** workload during installation

For Visual Studio Code development

+ [Visual Studio Code](https://code.visualstudio.com/) + [Azure Functions extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions)

> **Choose one**: You can use either Visual Studio OR Visual Studio Code. Both provide full debugging support, but the setup steps differ slightly.

Below is the architecture diagram for the Remote MCP Server using Azure Functions:

Samples in this repo

Each project README has instructions for running locally, connecting to the MCP server, deploying to the cloud, and more.

| Project | Description | Getting Started | |---------|-------------|-----------------| | **FunctionsMcpTool** | MCP Tools — snippet CRUD, QR code generation, badges, website preview, auth (OBO) | [README](src/FunctionsMcpTool/README.md) | | **FunctionsMcpApp** | MCP Apps — fluent API for tools that return interactive UI | [README](src/FunctionsMcpApp/README.md) | | **FunctionsMcpResources** | MCP Resources — snippet resource template, server info resource | [README](src/FunctionsMcpResources/README.md) | | **FunctionsMcpPrompts** | MCP Prompts — code review checklist, summarize content, generate docs | [README](src/FunctionsMcpPrompts/README.md) | | **McpWeatherApp** | Weather App — MCP App demo with interactive UI | [README](src/McpWeatherApp/README.md) |

Next Steps

+ Learn more about the [Azure Functions MCP extension](https://learn.microsoft.com/azure/azure-functions/functions-bindings-mcp?pivots=programming-language-typescript) + Learn more about [built-in MCP auth](https://learn.microsoft.com/azure/azure-functions/functions-mcp-tutorial?tabs=mcp-extension&pivots=programming-language-python#remote-mcp-server-authorization) + Follow our blog posts on [Azure SDK Blog](https://devblogs.microsoft.com/azure-sdk) and [Tech Community](https://techcommunity.microsoft.com/category/azure/blog/appsonazureblog) for updates.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 73 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <!--
  2. ---
  3. name: Remote MCP with Azure Functions (.NET/C#)
  4. description: Run a remote MCP server on Azure functions.
  5. page_type: sample
  6. languages:
  7. - csharp
  8. - bicep
  9. - azdeveloper
  10. products:
  11. - azure-functions
  12. - azure
  13. urlFragment: remote-mcp-functions-dotnet
  14. ---
  15. -->
  16. # Getting Started with Remote MCP Servers using Azure Functions (.NET/C#)
  17. This repo has a collection of samples to help you easily build and deploy a custom remote MCP server to the cloud using Azure functions. You can clone/restore/run on your local machine with debugging, and `azd up` to have a server in the cloud in a couple minutes.
  18. All sample MCP servers are configured with [built-in authentication](https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization) using Microsoft Entra as the identity provider.
  19. You can also use [API Management](https://learn.microsoft.com/azure/api-management/secure-mcp-servers) to secure the server, as well as network isolation using VNET.
  20. [![Watch the video](./images/video-overview.png)](https://www.youtube.com/watch?v=XwnEtZxaokg)
  21. If you're looking for samples in more languages check out the [Node.js/TypeScript](https://github.com/Azure-Samples/remote-mcp-functions-typescript) and [Python](https://github.com/Azure-Samples/remote-mcp-functions-python) samples.
  22. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure-Samples/remote-mcp-functions-dotnet)
  23. ## Prerequisites
  24. ### Required for all development approaches
  25. + [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
  26. + [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local?pivots=programming-language-csharp#install-the-azure-functions-core-tools) >= `4.5.0`
  27. + [Azure Developer CLI](https://aka.ms/azd) **1.23.x or above** (for deployment)
  28. + [Docker](https://www.docker.com/) (for the Azurite storage emulator)
  29. ### For Visual Studio development
  30. + [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
  31. + Make sure to select the **Azure development** workload during installation
  32. ### For Visual Studio Code development
  33. + [Visual Studio Code](https://code.visualstudio.com/)
  34. + [Azure Functions extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions)
  35. > **Choose one**: You can use either Visual Studio OR Visual Studio Code. Both provide full debugging support, but the setup steps differ slightly.
  36. Below is the architecture diagram for the Remote MCP Server using Azure Functions:
  37. ![Architecture Diagram](images/architecture-diagram.png)
  38. ## Samples in this repo
  39. Each project README has instructions for running locally, connecting to the MCP server, deploying to the cloud, and more.
  40. | Project | Description | Getting Started |
  41. |---------|-------------|-----------------|
  42. | **FunctionsMcpTool** | MCP Tools — snippet CRUD, QR code generation, badges, website preview, auth (OBO) | [README](src/FunctionsMcpTool/README.md) |
  43. | **FunctionsMcpApp** | MCP Apps — fluent API for tools that return interactive UI | [README](src/FunctionsMcpApp/README.md) |
  44. | **FunctionsMcpResources** | MCP Resources — snippet resource template, server info resource | [README](src/FunctionsMcpResources/README.md) |
  45. | **FunctionsMcpPrompts** | MCP Prompts — code review checklist, summarize content, generate docs | [README](src/FunctionsMcpPrompts/README.md) |
  46. | **McpWeatherApp** | Weather App — MCP App demo with interactive UI | [README](src/McpWeatherApp/README.md) |
  47. ## Next Steps
  48. + Learn more about the [Azure Functions MCP extension](https://learn.microsoft.com/azure/azure-functions/functions-bindings-mcp?pivots=programming-language-typescript)
  49. + Learn more about [built-in MCP auth](https://learn.microsoft.com/azure/azure-functions/functions-mcp-tutorial?tabs=mcp-extension&pivots=programming-language-python#remote-mcp-server-authorization)
  50. + Follow our blog posts on [Azure SDK Blog](https://devblogs.microsoft.com/azure-sdk) and [Tech Community](https://techcommunity.microsoft.com/category/azure/blog/appsonazureblog) for updates.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.