MCP Azure Functions

v1.0.0Cloud Servicesstable

Repo contains samples and instructions for remote hosting of MCP servers built with the official Anthropic MCP SDKs on Azure Functions.

mcp-sdk-functions-hosting-dotnetmcpai-integration
Share:
12
Stars
0
Downloads
0
Weekly
0/5

What is MCP Azure Functions?

MCP Azure Functions is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to repo contains samples and instructions for remote hosting of mcp servers built with the official anthropic mcp sdks on azure functions.

Repo contains samples and instructions for remote hosting of MCP servers built with the official Anthropic MCP SDKs on Azure Functions.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Repo contains samples and instructions for remote hosting of

Use Cases

Host MCP servers on Azure Functions using .NET.
Deploy serverless MCP integrations in Microsoft cloud.
Azure-Samples

Maintainer

LicenseMIT
Languagebicep
Versionv1.0.0
UpdatedApr 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-sdk-functions-hosting-dotnet

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Azure Functions

MCP Azure Functions is a sample repository showing how to host MCP servers built with the official Anthropic .NET MCP SDK on Azure Functions as custom handlers, enabling serverless, remotely accessible MCP endpoints. It provides a weather-tool sample server that can be run locally with Azure Functions Core Tools and deployed to Azure in minutes using the Azure Developer CLI (azd up). The approach lets teams reuse existing MCP server code with no changes while gaining Functions' bursty auto-scale, serverless pricing, and built-in authentication via Microsoft Entra.

Prerequisites

  • Azure subscription (free tier available) with permission to create Microsoft Entra app registrations
  • Azure Developer CLI (azd) v1.17.2 or later
  • Azure Functions Core Tools v4.5.0 or later
  • .NET 8 SDK installed
  • Visual Studio Code with the Azure Functions extension
1

Clone the sample repository

Clone the Azure Samples repository which contains the weather MCP server, host.json, local.settings.json, and the infra directory for Bicep-based provisioning.

git clone https://github.com/Azure-Samples/mcp-sdk-functions-hosting-dotnet.git
cd mcp-sdk-functions-hosting-dotnet
2

Register the Microsoft.App resource provider

Before deploying, register the required Azure resource provider. Wait a few seconds and verify with the show command.

az provider register --namespace 'Microsoft.App'
az provider show -n Microsoft.App
3

Test the server locally

Start the Functions host locally using func start, then open .vscode/mcp.json in VS Code and click Start above local-mcp-server. Switch GitHub Copilot to Agent mode and ask a weather question to confirm the tools are working.

func start
4

Configure a pre-authorized client and deploy

Set the VS Code client as a pre-authorized application and run azd up to provision and deploy all Azure resources. Select your subscription and region when prompted.

azd env set PRE_AUTHORIZED_CLIENT_IDS aebc6443-996d-45c2-90f0-388ff96faa56
azd up
5

Connect VS Code to the remote server

In .vscode/mcp.json, stop the local server and start remote-mcp-server. When prompted, paste the Function App domain from the azd up output. Authenticate with your Microsoft account.

6

Configure an MCP client to use the remote endpoint

Point any MCP client at the deployed Azure Function URL. Authentication is handled via Microsoft Entra On-Behalf-Of flow, so clients must support OAuth/token flows.

{
  "mcpServers": {
    "azure-functions-mcp": {
      "type": "http",
      "url": "https://<your-function-app>.azurewebsites.net/"
    }
  }
}

MCP Azure Functions Examples

Client configuration (remote HTTP endpoint)

MCP client config pointing to the deployed Azure Functions endpoint over streamable-http.

{
  "mcpServers": {
    "azure-functions-mcp": {
      "type": "http",
      "url": "https://<your-function-app>.azurewebsites.net/"
    }
  }
}

Prompts to try

Example prompts that exercise the weather tools and user-info (OBO) tool on the deployed server.

- "Return the weather in NYC using #remote-mcp-server"
- "What is the current weather in Seattle?"
- "Use #remote-mcp-server to provide info about the logged-in user"
- "Give me a 5-day weather forecast for Chicago"

Troubleshooting MCP Azure Functions

azd up fails with an error about missing service management reference

If using a Microsoft tenant, set your Service Tree ID: azd env set SERVICE_MANAGEMENT_REFERENCE <your-service-tree-id> and re-run azd up.

Remote server connection fails in VS Code after deployment

Click the gear icon next to the server in mcp.json and set the log level to 'Traces' to see detailed error output. Verify the Function App domain was pasted correctly and that you authenticated with the same Microsoft account used for the Azure subscription.

MCP server must be stateless error

Azure Functions custom handler hosting only supports stateless MCP servers using streamable-http transport. Convert any in-memory state to external storage (e.g., Azure Table Storage) before deploying.

Frequently Asked Questions about MCP Azure Functions

What is MCP Azure Functions?

MCP Azure Functions is a Model Context Protocol (MCP) server that repo contains samples and instructions for remote hosting of mcp servers built with the official anthropic mcp sdks on azure functions. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Azure Functions?

Follow the installation instructions on the MCP Azure Functions GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP Azure Functions?

MCP Azure Functions works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Azure Functions free to use?

Yes, MCP Azure Functions is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-sdk-functions-hosting-dotnet": { "command": "npx", "args": ["-y", "mcp-sdk-functions-hosting-dotnet"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Azure Functions?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides