MCP Functions Hosting

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-pythonmcpai-integration
Share:
53
Stars
0
Downloads
0
Weekly
0/5

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

Host MCP servers built with Anthropic SDKs on Azure Functions.
Azure-Samples

Maintainer

LicenseMIT
Languagebicep
Versionv1.0.0
UpdatedMay 5, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-sdk-functions-hosting-python

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 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
1

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 .
2

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 start
3

Connect 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.

4

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.App
5

Configure 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-388ff96faa56
6

Deploy 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 up
7

Connect 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.

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-python": { "command": "npx", "args": ["-y", "mcp-sdk-functions-hosting-python"] } } }

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

Read the full setup guide →

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.

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