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-nodemcpai-integration
Share:
15
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 remotely on Azure Functions.
Deploy Node.js MCP servers to the cloud.
Azure-Samples

Maintainer

LicenseMIT
Languagebicep
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-sdk-functions-hosting-node

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

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

Build the TypeScript source

Compile the TypeScript code to JavaScript before running locally.

npm run build
3

Start 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 start
4

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

Register 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.App
6

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

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

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

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