Remote MCP Python Functions Server

映画館窓口業務エージェントをつくってみるリポジトリ
  • bicep

0

GitHub Stars

bicep

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can run a remote MCP server on Azure Functions using Python, enabling secure, scalable tool execution that your MCP client can connect to over HTTPS. This setup lets you host the MCP server in the cloud while developing and testing locally, with built-in key-based security and optional guidance for API Management and VNET isolation.

How to use

Connect your MCP client to either the remote MCP server endpoint hosted on Azure Functions or the local Functions host during development. You will access the SSE endpoint at the function app URL and provide a system key to authorize calls. Use the remote endpoint when your MCP client is deployed in production or when you want cloud-based execution. Use the local endpoint while developing and testing on your workstation.

How to install

Prerequisites let you build and run the server locally and prepare for cloud deployment.

  • Python 3.11 or higher
  • Azure Functions Core Tools >= 4.0.7030
  • Azure Developer CLI (azd)
  • Visual Studio Code with the Azure Functions extension (optional for local debugging)

Prepare your environment by starting a local storage emulator so the server can save and retrieve snippets from blob storage.

docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 \
    mcr.microsoft.com/azure-storage/azurite

How to run locally

Navigate to the source folder, install dependencies, and start the Functions host to run the local MCP server.

cd src
pip install -r requirements.txt
func start

Deploy to Azure for Remote MCP

Provision the function app and deploy your code to Azure in one step. You can opt in to use a VNET for network isolation.

azd up

Connect to your remote MCP server from a client

Your client connects to the hosted SSE endpoint secured with a system key. Obtain the system key named mcp_extension from the portal or CLI. Use the URL form shown below.

https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse?code=<your-mcp-extension-system-key>

Notes on security and management

Security is enforced via a system key and HTTPS. You can layer additional security using API Management and built-in authentication for OAuth providers, including Entra. If you enable a VNET, ensure proper routing and access controls are in place.

Tools exposed by the Python MCP server

The server exposes tools to hello, getsnippet, and savesnippet. Each tool is available as an MCP endpoint you can trigger from your client.

Troubleshooting and tips

If you need to restart the local host, press Ctrl+C in the terminal where the Functions host is running, then start it again with the same commands. When deploying, redeploys overwrite the server code with the latest package. If you encounter access errors, verify that you are using the correct system key and the proper SSE URL.

Available tools

hello_mcp

A simple tool that returns a greeting message when triggered via the MCP tool interface.

get_snippet

Retrieve a snippet by name from Azure Blob Storage using a blob input binding.

save_snippet

Save a snippet to Azure Blob Storage using a blob output binding and context arguments.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational