MCP Functions Hosting
Repo contains samples and instructions for remote hosting of MCP servers built with the official Anthropic MCP SDKs on Azure Functions.
What is MCP Functions Hosting?
MCP Functions Hosting 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-pythonConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Functions Hosting
MCP SDK Functions Hosting Python is a reference sample and deployment scaffold for hosting Python MCP servers built with Anthropic's official MCP SDK on Azure Functions as custom handlers. It lets you take any stateless MCP server using streamable-HTTP transport and deploy it to serverless Azure infrastructure with bursty autoscaling, serverless pricing, and built-in security — without changing your server code. The repo includes a working weather sample server, local testing setup via Azure Functions Core Tools, and one-command cloud deployment using the Azure Developer CLI.
Prerequisites
- Azure subscription with permission to create Microsoft Entra app registrations
- Azure Developer CLI (azd) v1.17.2 or higher
- Azure Functions Core Tools v4.5.0 or higher
- Visual Studio Code with the Azure Functions extension
- uv package manager for Python dependency management
Clone the sample repository
Clone the Azure Samples repository and open it in Visual Studio Code.
git clone https://github.com/Azure-Samples/mcp-sdk-functions-hosting-python.git
cd mcp-sdk-functions-hosting-python
code .Test the server locally
Start the Function App locally using uv. The uv runner will create the virtual environment, install dependencies, and start the Functions host.
uv run func startConnect in VS Code using mcp.json
Open the .vscode/mcp.json file in VS Code, click the Start button above 'local-mcp-server', then open GitHub Copilot in Agent mode and select the local-mcp-server tool.
Register the Microsoft.App resource provider
Before deploying to Azure, register the required resource provider in your subscription.
az provider register --namespace 'Microsoft.App'
az provider show -n Microsoft.AppConfigure the pre-authorized client for VS Code
Set the VS Code client application ID as a pre-authorized client so it can authenticate to the deployed Function App.
azd env set PRE_AUTHORIZED_CLIENT_IDS aebc6443-996d-45c2-90f0-388ff96faa56Deploy to Azure with azd up
Run azd up to provision all Azure resources (Function App, storage, networking, Application Insights) and deploy the MCP server. Select your subscription and region when prompted.
azd upConnect to the remote server in VS Code
In .vscode/mcp.json, stop the local server and start the 'remote-mcp-server'. Enter your Function App domain when prompted, then authenticate with your Microsoft account.
MCP Functions Hosting Examples
Client configuration
Example VS Code mcp.json configuration for the locally running MCP server on Azure Functions.
{
"servers": {
"local-mcp-server": {
"type": "http",
"url": "http://localhost:7071/runtime/webhooks/mcp/sse"
},
"remote-mcp-server": {
"type": "http",
"url": "https://${FUNCTION_APP_DOMAIN}/runtime/webhooks/mcp/sse"
}
}
}Prompts to try
After connecting to the local or remote MCP server in VS Code Copilot agent mode, try these prompts.
- "Return the weather in NYC using #local-mcp-server"
- "Return the weather in Seattle using #remote-mcp-server"
- "Use #remote-mcp-server to provide info about the logged-in user"
- "What tools are available on the connected MCP server?"Troubleshooting MCP Functions Hosting
404 error appears when the Function App starts locally
This is expected behavior. The Azure Functions host pings the root path (/) to check if the app is running, but the MCP server does not implement a root route. The 404 is harmless and the MCP tools will still work correctly.
azd up fails with an error about missing service management reference
If you are using a Microsoft corporate tenant, you must set a Service Tree ID: run 'azd env set SERVICE_MANAGEMENT_REFERENCE <your-service-tree-id>' before running 'azd up'.
VS Code fails to connect to the remote server after deployment
Ensure you clicked Allow on the Microsoft authentication prompt in VS Code and completed the login flow. Check the MCP server output log in VS Code (More... > Show Output) for connection errors, and increase log level to Traces for detailed diagnostics.
Frequently Asked Questions about MCP Functions Hosting
What is MCP Functions Hosting?
MCP Functions Hosting 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 Functions Hosting?
Follow the installation instructions on the MCP Functions Hosting GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Functions Hosting?
MCP Functions Hosting works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Functions Hosting free to use?
Yes, MCP Functions Hosting is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
MCP Functions Hosting Alternatives — Similar Cloud Services Servers
Looking for alternatives to MCP Functions Hosting? 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 Functions Hosting 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 Functions Hosting?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.