Skip to main content

[TEST] ESRP MCP Server - Azure Functions Python implementation for discovering and validating Microsoft certified OSS packages

Project description

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

This is a quickstart template to easily build and deploy a custom remote MCP server to the cloud using Azure Functions with Python. You can clone/restore/run on your local machine with debugging, and azd up to have it in the cloud in a couple of minutes. The MCP server is secured by design using keys and HTTPS, and allows more options for OAuth using EasyAuth and/or API Management as well as network isolation using VNET.

Prerequisites

Prepare your local environment

An Azure Storage Emulator is needed for this particular sample because Azure Functions requires a storage account for certain operations.

  1. Start Azurite (if using Docker):

    docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite
    
  2. Create a Python virtual environment:

    python -m venv .venv
    
  3. Activate the virtual environment:

    On Windows:

    .\.venv\Scripts\Activate.ps1
    

    On macOS/Linux:

    source .venv/bin/activate
    
  4. Install dependencies:

    pip install -r requirements.txt
    

Run and Debug Locally

  1. Open the project in VS Code
  2. Make sure Azurite is running
  3. Press F5 to start debugging, or run:
    func start
    

Deploy to Azure

  1. Login to Azure (if not already logged in):

    azd auth login
    
  2. Provision and deploy:

    azd up
    

This will:

  • Create the required Azure resources (Resource Group, Storage Account, Function App)
  • Deploy your Python MCP server to Azure Functions

MCP Tools Available

This MCP server exposes the following tools:

Tool Name Description
microsoftCertifiedNodeJsPackages Get a list of Microsoft certified Node.js packages
microsoftCertifiedPythonPackages Get a list of Microsoft certified Python packages
microsoftCertifiedJavaPackages Get a list of Microsoft certified Java packages
validateMicrosoftPackageIntegrity Validate the integrity of a Microsoft certified package
validateImageSKUUpdate Validate whether an image SKU update is recommended

mcp-name: com.microsoft.esrp/esrp-oss-mcp-test

Project Structure

esrp-mcp-server-python/
├── function_app.py        # Main Azure Functions app with MCP tools
├── host.json              # Azure Functions host configuration
├── local.settings.json    # Local settings (not committed to git)
├── azure.yaml             # Azure Developer CLI configuration
├── requirements.txt       # Python dependencies
├── server.json            # MCP server manifest
├── data/                  # Data files
│   ├── publishedPackages.json   # List of certified packages
│   └── packageHashes.json       # Package hash information
└── README.md              # This file

Configuration

Environment Variables

Variable Description
FUNCTIONS_WORKER_RUNTIME Set to python
AzureWebJobsStorage Connection string for Azure Storage

Connecting MCP Clients

After deployment, you can connect MCP clients to your remote MCP server using the function URL provided by Azure Functions. The URL format will be:

https://<your-function-app>.azurewebsites.net/runtime/webhooks/mcp/sse

Make sure to include the function key for authentication.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esrp_oss_mcp_test-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

esrp_oss_mcp_test-0.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file esrp_oss_mcp_test-0.0.2.tar.gz.

File metadata

  • Download URL: esrp_oss_mcp_test-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for esrp_oss_mcp_test-0.0.2.tar.gz
Algorithm Hash digest
SHA256 57f3fa089c22faa2abefce98302e2c75a8ecf1d07b2ab7782709987bbd886eb9
MD5 76442140a43b64e4623e0ab6d5ddaa70
BLAKE2b-256 b7ba8f4d54b4591d05318202f67541ea8032c7885ba011b899003f6f3fba037f

See more details on using hashes here.

File details

Details for the file esrp_oss_mcp_test-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for esrp_oss_mcp_test-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 263e88af70998ed47275032b1c1ddbf1ac5150b92a41efbf240c8878e84af9ca
MD5 63fe98ee64fa1884061eceb86a0c77c5
BLAKE2b-256 9c57526d65418be4fd7d23640bc81b0d14c74172417b938ef3a14b63242e6ff7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page