mcp-server-sse

HusseinKothari26/mcp-server-sse

3.1

If you are the rightful owner of mcp-server-sse and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This is a Python-based HTTP SSE MCP server for real-time weather updates.

MCP SSE Weather Server

This is a simple Python-based HTTP SSE (Server-Sent Events) MCP server to get weather details by city name or latitude/longitude.

Features

  • SSE endpoint for real-time weather updates
  • Query by city name or coordinates
  • Docker and Docker Compose support

Usage

1. Set up OpenWeatherMap API Key

Get a free API key from OpenWeatherMap and set it in your environment.

2. Build and Run with Docker Compose

docker-compose up --build

3. API Endpoints

  • GET /weather/sse?city=London
  • GET /weather/sse?lat=51.51&lon=-0.13

The endpoint streams weather data every 5 seconds as SSE.

4. Example curl

curl http://localhost:8000/weather/sse?city=London

5. Development (without Docker)

pip install -r requirements.txt
uvicorn main:app --reload

Replace your_openweather_api_key_here in docker-compose.yml with your actual API key.