Back to Home
ShaySarussiElshten icon

weather-mcp-server

Verified Safe

by ShaySarussiElshten

Overview

Provides current weather conditions and 5-day forecasts for any city using the OpenWeatherMap API via a Model Context Protocol (MCP) server.

Installation

Run Command
python src/server.py

Environment Variables

  • OPENWEATHER_API_KEY

Security Notes

The server correctly retrieves the API key from environment variables, preventing hardcoding in the main application logic. It uses `httpx` for secure asynchronous HTTP requests. Input parameters are handled as API request parameters, minimizing injection risks. Error handling is present. A minor note is that the `test_server.py` script hardcodes an API key, which is acceptable for a local test but would be a risk if included in a public configuration or production deployment.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens300
Stars0
Forks0
Last Update2025-11-23

Tags

WeatherForecastAPIMCPPython