by mschneider82
mcp-openweather is an MCP server that provides current and forecast weather information using the free OpenWeatherMap API.
mcp-openweather is a simple MCP (Mycroft Core Protocol) service written in Go that integrates with the free OpenWeatherMap API. It allows users to retrieve current weather conditions and a 5-day weather forecast for a specified location.
To use mcp-openweather, you need Go 1.20+ and an OpenWeatherMap API key. After cloning the repository and building the executable, you must set the OWM_API_KEY
environment variable with your API key. The service can then be run as an MCP server. For integration with Claude Desktop, you can use Smithery for automatic installation. To query the weather, you send an MCP request with the tool
set to "weather" and params
including the city
(required), and optional units
(c, f, or k) and lang
(e.g., en, de, fr).
OWM_API_KEY
environment variable is set.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.
Discover more MCP servers with similar functionality and use cases
by nanbingxyz
A cross‑platform desktop AI assistant that connects to major LLM providers, supports a local knowledge base, and enables tool integration via Model Context Protocol servers.
by loopwork
iMCP is a macOS application that provides a Model Context Protocol (MCP) server, enabling AI clients like Claude Desktop to securely access and utilize your personal data from Apple services such as Messages, Contacts, and Reminders. Its main purpose is to bridge your digital life with AI, allowing for AI-powered personal assistance and contextual interactions without collecting or storing your data.
by sunsetcoder
Flightradar24 MCP Server is a Claude Desktop Model Context Protocol (MCP) server that enables real-time flight tracking using Flightradar24 data, designed for aviation enthusiasts and travel planners.
by KyrieTangSheng
An MCP Server for the National Park Service (NPS) API, providing real-time information about U.S. National Parks, including park details, alerts, and activities.
by isdaniel
Provides current and forecast weather data for specified cities via the Open-Meteo API and returns the current datetime for a given timezone.
by mfukushim
A virtual traveler library for MCP that integrates various APIs to simulate virtual travel experiences.
by aqara
An MCP server for controlling Aqara smart home devices using natural language.
by NitayRabi
Fitbit MCP (Model Context Protocol) enables AI assistants to access and analyze your Fitbit health and fitness data. It acts as an MCP server, connecting to the Fitbit API to provide a wide range of health metrics.
by netdata
Real-time, per‑second infrastructure monitoring platform that provides instant insights, auto‑discovery, edge‑based machine‑learning anomaly detection, and lightweight visualizations without requiring complex configuration.