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-nodeConfiguration
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 from Azure Samples that demonstrates how to host MCP servers built with the official Anthropic MCP Node.js SDK on Azure Functions, enabling remote cloud-hosted MCP server deployment with Microsoft Entra ID authentication. It provides both a local development workflow using Azure Functions Core Tools and a one-command cloud deployment via Azure Developer CLI (azd), complete with a weather tool example and a Microsoft Graph API On-Behalf-Of flow demo. Teams use it as a reference architecture for productionizing MCP servers in Azure with enterprise authentication baked in.
Prerequisites
- Azure subscription (free tier works for evaluation)
- Azure Developer CLI (azd) v1.17.2 or newer
- Azure Functions Core Tools v4.5.0 or newer
- Node.js 22 or newer
- Visual Studio Code with the Azure Functions extension (recommended)
Clone the repository
Download the sample to your local machine.
git clone https://github.com/Azure-Samples/mcp-sdk-functions-hosting-node.git
cd mcp-sdk-functions-hosting-node
npm installBuild the TypeScript source
Compile the TypeScript code to JavaScript before running locally.
npm run buildStart the local development server
Use Azure Functions Core Tools to start the server locally. The MCP server will be available for local testing via VS Code's .vscode/mcp.json configuration.
func startConfigure VS Code as an authorized MCP client
Set the pre-authorized client ID for VS Code so it can authenticate against your deployed Azure Function. This step uses the azd environment configuration.
azd env set PRE_AUTHORIZED_CLIENT_IDS aebc6443-996d-45c2-90f0-388ff96faa56Register the Azure resource provider
Before deploying to Azure, register the Microsoft.App resource provider in your subscription. This only needs to be done once per subscription.
az provider register --namespace 'Microsoft.App'
# Check status:
az provider show -n Microsoft.AppDeploy to Azure
Use azd up to provision all Azure resources (Azure Functions, Entra ID app registration, etc.) and deploy the MCP server in a single command. Follow the prompts to select your subscription and region.
azd upConnect VS Code to the remote MCP server
After deployment, update the .vscode/mcp.json file with the remote Azure Functions URL from the azd output. Open Copilot in Agent mode in VS Code and authenticate with your Microsoft account when prompted.
MCP Azure Functions Examples
Client configuration (local development)
VS Code MCP configuration for connecting to the locally running Azure Functions MCP server via func start.
{
"servers": {
"local-mcp-server": {
"type": "http",
"url": "http://localhost:7071/api/mcp"
}
}
}Prompts to try
Example prompts to test the weather tool and the Microsoft Graph OBO flow in VS Code Copilot Agent mode.
- "Return the weather in NYC using #local-mcp-server."
- "What is the current weather in Tokyo?"
- "Who is the currently authenticated Microsoft user?"
- "Show me the weather in London and Paris."Troubleshooting MCP Azure Functions
azd up fails with 'Microsoft.App provider not registered'
Run az provider register --namespace 'Microsoft.App' and wait for the status to show 'Registered' via az provider show -n Microsoft.App. Registration can take several minutes — do not retry azd up until the provider status is Registered.
VS Code Copilot cannot connect to the local server
Ensure the .vscode/mcp.json file is in the project root (not a subdirectory) and that func start is running. Also confirm the port in host.json matches the port in your mcp.json URL — the default Azure Functions port is 7071.
Authentication fails when connecting to the remote Azure Function
Make sure PRE_AUTHORIZED_CLIENT_IDS is set to the correct VS Code client ID (aebc6443-996d-45c2-90f0-388ff96faa56) before deploying. If you already deployed without it, set the env variable and re-run azd up to update the deployment.
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.