openweathermap-sse-mcp-server

openweathermap-sse-mcp-server

0

The MCP Weather Server is a FastAPI-based application that provides weather information using the OpenWeatherMap API. It integrates seamlessly with Home Assistant via the Model Context Protocol, offering current weather, daily, and hourly forecasts. The server is configurable and supports both metric and imperial units.

MCP Weather Server

A FastAPI-based weather server that integrates with Home Assistant using the Model Context Protocol (MCP). This server utilizes OpenWeatherMap's One Call API 3.0 to deliver comprehensive weather details such as current conditions, daily forecasts, and hourly forecasts for any location.

Prerequisites

  • Python 3.7+
  • OpenWeatherMap API key

Setup

  1. Clone this repository
  2. Install dependencies
  3. Configure your OpenWeather API key.

Configuration

  • API Key: Environment variable or config.yaml
  • Server Settings: Specify the host and port in config.yaml
  • Units: Choose between metric and imperial
  • Location Overrides: Set default locations for ambiguous city names

Running the Server

Run the server and access endpoints such as:

  • Current Weather
  • Daily Forecast
  • Hourly Forecast

MCP Integration

Implements the Model Context Protocol (MCP) for integration with Home Assistant.

Location Resolution

Uses a flexible location resolution system for city names.