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.1.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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: esrp_oss_mcp_test-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 68ee414bd02609572702b11a5d1fd8116d3717a1728118eb336cebeb7ed1b51a
MD5 c42599a8340704956cfe7fcd41a57309
BLAKE2b-256 6f22349c57dff0e86b9f82548ae6d1ac7b35178fe6e9c1dd86149c9bdbb22a7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esrp_oss_mcp_test-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0626d4f3618d24e3b920221c23da0e912be6c828226980724d5804c0b695f83b
MD5 d765ce6567b290bb874ce6e0d38b35bc
BLAKE2b-256 a0fa3a034890340b106dc175b84997cd1f9d481caa931c7a56161f91e8984b48

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