Azure-MCP-Server

Azure-MCP-Server

0

This project is a FastAPI-based MCP server that provides weather-related services through a secure SSE interface, specifically designed for Azure Container Apps. It is intended for developers working with MCP-compatible clients to facilitate communication of weather alerts and forecasts.

Overview

This project is a FastAPI-based Model Context Protocol (MCP) server implemented for Azure Container Apps. It provides weather-related tools such as alerts and forecasts through a secure API-key-protected Server-Sent Events (SSE) interface. The server is intended for MCP-compatible clients, like Visual Studio Code or custom scripts.

Features

  • SSE transport with authentication via API key.
  • Weather tools available as alerts and forecasts.

Setup Instructions

  • Clone the repository and navigate to the project folder.
  • Install prerequisites: Python 3.11+ and uv.
  • Set up the virtual environment and dependencies.
  • Configure the API key and run the server using uv.

Client Usage

  • A sample Python client model_request_client.py is available for command-line interaction. Users can input their API key and choose between retrieving alerts or forecasts.

API Endpoints

  • Main SSE endpoint /sse (GET) for communication, using x-api-key header.
  • /messages (SSE) for internal message streaming.

Troubleshooting

  • Verify virtual environment activation and dependency installation for missing module errors.
  • Ensure server operation and correct API key if the client hangs.

Contributing

Pull requests are welcome, with prior discussion for significant changes.

License

MIT License.