by mschneider82
Provides current weather and a 5‑day forecast using the free OpenWeatherMap API, with configurable units and multi‑language support.
Delivers real‑time weather conditions and a five‑day forecast for any city by querying the OpenWeatherMap free API. The service is exposed as an MCP server, enabling seamless integration with Claude and other MCP‑compatible tools.
OWM_API_KEY
with your key.go build -o mcp-weather
{
"mcpServers": {
"mcp-openweather": {
"command": "/path/to/mcp-weather",
"env": { "OWM_API_KEY": "YOUR_API_KEY" }
}
}
}
{
"tool": "weather",
"params": { "city": "Berlin", "units": "c", "lang": "en" }
}
What if the API key is missing?
The server exits with FATAL: OWM_API_KEY environment variable not set
.
How are invalid city names handled?
Returns an error like current weather error: failed to fetch current weather: city not found
.
What happens on network timeouts?
Errors such as failed to fetch forecast: context deadline exceeded
are returned.
Can I change the default language?
Yes, pass the lang
parameter (e.g., de
, fr
, es
).
Is there a Docker image? Not provided; the binary can be built and run directly.
A simple MCP service that provides current weather and 5-day forecast using the free OpenWeatherMap API.
Get OpenWeatherMap API key from https://openweathermap.org/api
Clone repository:
git clone https://github.com/mschneider82/mcp-openweather.git
cd mcp-openweather
Build:
go build -o mcp-weather
To install MCP Weather Service for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mschneider82/mcp-openweather --client claude
Set required environment variable:
export OWM_API_KEY="your_api_key_here"
"mcpServers": {
"mcp-openweather": {
"command": "/home/YOURUSER/git/mcp-openweather/mcp-openweather",
"env": {
"OWM_API_KEY": "PUT_API_KEY_HERE"
}
}
}
{
"tool": "weather",
"params": {
"city": "Berlin", // Required
"units": "c", // Optional (c|f|k)
"lang": "en" // Optional (en|de|fr|...)
}
}
Current weather for München:
Conditions: Klarer Himmel
Now: 17.78 metric
High: 18.66 metric
Low: 17.36 metric
Pressure: 1017
Humidity: 40
FeelsLike: 16.66
Wind Speed: 1.79
Wind Degree: 61
Sunrise: 1747107429 Unixtime
Sunset: 1747161784 Unixtime
Weather Forecast for München:
Date & Time: 2025-05-13 12:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 17.78
High: 18.93
Low: 17.78
Date & Time: 2025-05-13 15:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 18.33
High: 19.44
Low: 18.33
Date & Time: 2025-05-13 18:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 16.32
High: 16.32
Low: 15.59
Date & Time: 2025-05-13 21:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 9.18
High: 9.18
Low: 9.18
...
Missing API key: FATAL: OWM_API_KEY environment variable not set
Invalid city: current weather error: failed to fetch current weather: city not found
Network issues: failed to fetch forecast: context deadline exceeded
Contributions welcome! Please follow these steps:
Fork the repository
Create a feature branch
Commit changes
Push to the branch
Create a Pull Request
MIT License - see LICENSE for details
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "mcp-weather": { "command": "/home/YOURUSER/git/mcp-openweather/mcp-weather", "args": [], "env": { "OWM_API_KEY": "<YOUR_API_KEY>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by mattt
Enables AI assistants to retrieve and manage personal macOS data such as calendar events, contacts, messages, reminders, location, maps, and weather through a local MCP server, allowing personalized AI interactions without sending data off‑device.
by nspady
Provides Google Calendar integration for AI assistants, enabling event listing, creation, updating, deletion, free/busy queries, recurring event handling, and smart scheduling via natural language.
by baidu-maps
Offers a comprehensive suite of geospatial APIs and tools for developers and AI agents, enabling geocoding, reverse geocoding, POI search, route planning, weather, traffic, IP location, and real‑time traffic queries via standardized MCP interfaces.
by Omar-V2
Interact with the macOS Calendar through natural‑language commands, enabling creation, querying, and updating of events in a conversational way.
by GongRzhe
Enables LLMs to perform travel-related tasks such as location search, place details lookup, route calculation, and timezone retrieval using Google Maps services.
by zcaceres
Integrates with Google Tasks to list, read, search, create, update, and delete tasks via MCP tools.
by v-3
Interact with Google Calendar to list, create, update, delete events and find free time slots via Claude.
by r-huijts
Provides real-time Dutch railway travel information—including departures, arrivals, journey planning, pricing, and station facilities—through an MCP server that Claude can query.
by TimLukaHorstmann
Provides hourly and daily weather forecasts via the AccuWeather API for Model Context Protocol (MCP) integration with language models.