remote-mcp-functions-dotnet

MCP.Pizza Chef: Azure-Samples

remote-mcp-functions-dotnet is a quickstart template for building and deploying a secure remote MCP server using Azure Functions and .NET/C#. It enables local development with debugging and easy cloud deployment via Azure Developer CLI. The server supports security features like keys, HTTPS, OAuth integration, API Management, and network isolation with VNET, making it ideal for scalable, secure MCP server hosting in the cloud.

Use This MCP server To

Deploy custom MCP servers quickly on Azure cloud Run and debug MCP servers locally with .NET support Secure MCP server hosting with HTTPS and key-based auth Integrate OAuth and API Management for advanced security Isolate MCP server network using Azure VNET Use as a backend for MCP clients requiring remote data Scale MCP server deployments with Azure Functions serverless Customize MCP server logic using .NET and Azure tooling

README

Getting Started with Remote MCP Servers using Azure Functions (.NET/C#)

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 using Microsoft Entra as the identity provider.

You can also use API Management to secure the server, as well as network isolation using VNET.

Watch the video

If you're looking for samples in more languages check out the Node.js/TypeScript and Python samples.

Open in GitHub Codespaces

Prerequisites

Required for all development approaches

For Visual Studio development

  • Visual Studio 2022
  • Make sure to select the Azure development workload during installation

For Visual Studio Code development

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:

Architecture Diagram

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
FunctionsMcpApp MCP Apps — fluent API for tools that return interactive UI README
FunctionsMcpResources MCP Resources — snippet resource template, server info resource README
FunctionsMcpPrompts MCP Prompts — code review checklist, summarize content, generate docs README
McpWeatherApp Weather App — MCP App demo with interactive UI README

Next Steps

remote-mcp-functions-dotnet FAQ

How do I deploy the remote MCP server to Azure?
Use the Azure Developer CLI command `azd up` to deploy the server quickly to Azure Functions.
Can I run and debug the MCP server locally?
Yes, you can clone the repo and run the server locally with full debugging support using .NET tools.
What security features does this MCP server support?
It supports HTTPS, key-based authentication, OAuth via EasyAuth, API Management, and network isolation with Azure VNET.
Is this MCP server scalable?
Yes, it leverages Azure Functions serverless architecture, allowing automatic scaling based on demand.
Can I customize the MCP server logic?
Absolutely, the server is built with .NET/C# allowing full customization of MCP endpoints and logic.
What prerequisites are needed to use this template?
You need an Azure subscription, .NET SDK, and Azure Developer CLI installed.
Does this server support integration with other LLM providers?
Yes, it can be integrated with various LLM providers like OpenAI, Anthropic Claude, and Google Gemini through custom logic.
How is network isolation achieved?
By deploying the server within an Azure Virtual Network (VNET) to restrict access and enhance security.