Skip to main content

Add your description here

Project description

Azure Container Apps remote MCP server example

This MCP server uses SSE transport and is authenticated with an API key.

Running locally

Prerequisites:

  • Python 3.11 or later
  • uv

Run the server locally:

uv venv
uv sync

# linux/macOS
export API_KEYS=<AN_API_KEY>
# windows
set API_KEYS=<AN_API_KEY>

uv run fastapi dev main.py

VS Code MCP configuration (mcp.json):

{
    "inputs": [
        {
            "type": "promptString",
            "id": "weather-api-key",
            "description": "Weather API Key",
            "password": true
        }
    ],
    "servers": {
        "weather-sse": {
            "type": "sse",
            "url": "http://localhost:8000/sse",
            "headers": {
                "x-api-key": "${input:weather-api-key}"
            }
        }
    }
}

Deploy to Azure Container Apps

az containerapp up -g <RESOURCE_GROUP_NAME> -n weather-mcp --environment mcp -l westus --env-vars API_KEYS=<AN_API_KEY> --source .

If the deployment is successful, the Azure CLI returns the URL of the app. You can use this URL to connect to the server from Visual Studio Code.

If the deployment fails, try again after updating the CLI and the Azure Container Apps extension:

az upgrade
az extension add -n containerapp --upgrade

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

mseep_20240407_test_mcp-0.1.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

mseep_20240407_test_mcp-0.1.1-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file mseep_20240407_test_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: mseep_20240407_test_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_20240407_test_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 68e089603d268a1c6f2c091ded94cb70dbc3f40f8def39a3c7abba1c93f5d073
MD5 305d5a321a990e0bffc9ddc320ccf8b5
BLAKE2b-256 0bb3c38cf765198080c9c297aa682be0bdacd52457c5ea7dee3c045395aed838

See more details on using hashes here.

File details

Details for the file mseep_20240407_test_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_20240407_test_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdbf688bddb43c0f690986e87159817028517efa03157bae9fc9a562bcb4f97a
MD5 ff2e9bf050ef1d8448a7f032466c555f
BLAKE2b-256 334d8df0941b28131a5ac0ea9a9cdc3b255249fc5bd4f14f795dd8859de17397

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