The MCP Weather Server provides real-time weather forecasts using the AccuWeather API.
Fetch Hourly Forecast (up to 12 hours) via the
weather-get_hourly
toolAccess Daily Forecast (up to 15 days) via the
weather-get_daily
toolDisplay Weather Data in metric (°C) or imperial (°F) units
Provide Temperature, Conditions, Precipitation details
Integrate with LLMs like Claude for real-time weather queries
Supports REST Access via supergateway for HTTP/REST integration
Provides hourly weather forecasts using the AccuWeather API, allowing access to real-time weather data including temperature, conditions, and other weather details for any location.
MCP Weather Server
A Model Context Protocol (MCP) server that provides hourly and daily weather forecasts using the AccuWeather API.
Quick Start
You need an AccuWeather API key (free tier available).
Sign up here and create an app to get your key.
Export your API key as an environment variable:
Then run the MCP Weather server directly with:
Or, for HTTP/REST access via supergateway:
MCP Server Config Example
For integration with Claude Desktop or other MCP-compatible clients, add this to your config (e.g. claude_desktop_config.json
):
Overview
This MCP server allows large language models (like Claude) to access real-time weather data. When integrated with an LLM, it enables the model to:
Fetch accurate, up-to-date weather forecasts
Provide hourly weather data for the next 12 hours
Access daily weather forecasts for up to 15 days
Display data in both metric (°C) and imperial (°F) units
View temperature, conditions, precipitation information, and other weather details
Prerequisites
Node.js ≥18
An AccuWeather API key (set via
.env
or your shell)
Setup
Clone this repository:
git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weatherInstall dependencies:
npm installGet an AccuWeather API key:
Register at AccuWeather API
Create a new app and obtain an API key
Create a
ACCUWEATHER_API_KEY=your_api_key_hereBuild the project:
npm run build
Usage with Claude Desktop
Configure Claude Desktop to use this MCP server:
Open Claude Desktop
Go to Settings > Developer > Edit Config
Add the following to your
claude_desktop_config.json
:
{ "mcpServers": { "weather": { "command": "npx", "args": ["-y", "@timlukahorstmann/mcp-weather"], "env": { "ACCUWEATHER_API_KEY": "your_api_key_here" } } } }Restart Claude Desktop
In a new conversation, enable the MCP server by clicking the plug icon and selecting "weather"
Now you can ask Claude for weather forecasts, such as:
"What's the hourly weather forecast for New York City?"
"Give me the 5-day forecast for London."
"What will the weather be like in Tokyo this week in Fahrenheit?"
"Will it rain in San Francisco tomorrow?"
Available Tools
Hourly Weather Forecast
Tool name:
weather-get_hourly
Provides hourly forecasts for the next 12 hours
Parameters:
sessionId
(required): Unique identifier for the sessionlocation
(required): City or location nameunits
(optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)
Daily Weather Forecast
Tool name:
weather-get_daily
Provides daily forecasts for up to 15 days
Parameters:
sessionId
(required): Unique identifier for the sessionlocation
(required): City or location namedays
(optional): Number of forecast days (1, 5, 10, or 15; default is 5)units
(optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)
Development
Install dev dependencies:
npm install
Lint your code:
npm run lint
Build:
npm run build
Run tests:
npm test
Start in dev mode:
npm run dev
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Future Enhancements
We're always looking to improve the MCP Weather Server. Here are some features we're considering for future releases:
Extended Hourly Forecasts: Beyond 12 hours, e.g., 24 or 48 hours.
Weather Alerts: Integration with AccuWeather's severe weather alerts API.
Location Autocomplete: Improved location searching with autocomplete suggestions.
Historical Weather Data: Access to past weather conditions.
If you have ideas for other features, feel free to open an issue!
License
This project is licensed under the MIT License - see the LICENSE file for details.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
MCP Weather
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that provides real-time weather information and 5-day forecasts to AI assistants, supporting multiple languages and flexible units.Last updated -33
- AsecurityAlicenseAqualityA Model Context Protocol server that provides comprehensive weather data and forecasts through the OpenWeatherMap API, enabling AI assistants to access real-time weather information, forecasts, air quality data, and location services.Last updated -1132MIT License
- -securityFlicense-qualityA Model Context Protocol (MCP) server that enables AI assistants and LLMs to access real-time weather data and forecasts by connecting to the OpenWeatherMap API.Last updated -
- -securityFlicense-qualityA modular server based on Model Context Protocol (MCP) that provides weather queries, mathematical calculations, and search functionalities.Last updated -