Get the FREE Ultimate OpenClaw Setup Guide →

remote -functions-python

Getting Started with Remote MCP Servers using Azure Functions (Python)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio azure-samples-remote-mcp-functions-python python -m remote_mcp_functions_python \
  --env MCP_EXTENSION_KEY="System key for MCP extension" \
  --env AZURE_FUNCTIONS_APP_NAME="Name of the Azure Functions app"

How to use

This MCP server implements a remote MCP endpoint hosted on Azure Functions using Python. It allows clients to connect to a remotely hosted MCP server for tool-oriented prompts and actions, with optional security via built-in auth or API Management. You can debug locally using the Functions runtime and then deploy to Azure to expose the MCP endpoint at a URL like https://<function-app>.azurewebsites.net/runtime/webhooks/mcp. Use MCP Inspector to verify and test your server, and you can integrate with Copilot-style tooling in VS Code for interactive tool invocation. The server supports saving and retrieving snippet data via blob storage during local testing, and you can configure OAuth and network isolation for production deployments through Azure services.

How to install

Prerequisites:

  • Python 3.11 or higher
  • Azure Functions Core Tools >= 4.0.7030
  • Azure Developer CLI (azd)
  • Docker (for local Azurite storage) if testing blob storage locally
  • Optional: Visual Studio Code with Azure Functions extension

Installation steps:

  1. Clone the repository and navigate to the project root.
  2. Create and activate a Python virtual environment (recommended):
    • python -m venv .venv
    • source .venv/bin/activate # macOS/Linux
    • ..venv\Scripts\activate # Windows
  3. Install Python dependencies:
    • pip install -r requirements.txt
  4. Run the Functions host locally to test:
    • cd src
    • func start
  5. For local blob storage testing, start Azurite (optional):
    • docker run -p 10000:10000 -p 10001:10001 -p 10002:10002
      mcr.microsoft.com/azure-storage/azurite
  6. When ready to deploy, use Azure Developer CLI (azd) to provision resources and deploy:
    • azd env new <resource-group-name>
    • azd up
  7. After deployment, obtain the remote MCP endpoint URL and the system key (mcp_extension) as described in the README for connecting clients.

Additional notes

  • The MCP endpoint is secured by default; use the system key (mcp_extension) when connecting with MCP Inspector or clients.
  • If you enable API Management or App Service authentication, ensure that your client requests carry the proper credentials or tokens as configured.
  • For local testing of blob-based snippet storage, ensure Azurite is running and accessible at the configured endpoints.
  • When deploying to Azure, you can opt into a VNet for network isolation by setting VNET_ENABLED before azd up.
  • For Copilot integration in VS Code, you may need to set the x-functions-key header with your MCP extension key when invoking the hosted endpoint.

Related MCP Servers

Sponsor this space

Reach thousands of developers