MCP Azure Functions
Repo contains samples and instructions for remote hosting of MCP servers built with the official Anthropic MCP SDKs on Azure Functions.
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
Maintainer
Works with
Installation
Manual Installation
npx mcp-sdk-functions-hosting-dotnetConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-dotnetRegister 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.AppTest 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 startConfigure 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 upConnect 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.
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.
MCP Azure Functions Alternatives — Similar Cloud Services Servers
Looking for alternatives to MCP Azure Functions? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
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.
Set Up MCP Azure Functions in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.