MCP Weather
The MCP Weather Server provides real-time weather forecasts using the AccuWeather API.
Fetch Hourly Forecast (up to 12 hours) via the
weather-get_hourlytoolAccess Daily Forecast (up to 15 days) via the
weather-get_dailytoolDisplay 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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Weather what's the 5-day forecast for London in Celsius?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
export ACCUWEATHER_API_KEY=your_api_key_hereThen run the MCP Weather server directly with:
npx -y @timlukahorstmann/mcp-weatherOr, for HTTP/REST access via supergateway:
npx -y supergateway --stdio "npx -y @timlukahorstmann/mcp-weather" \
--port 4004 \
--baseUrl http://127.0.0.1:4004 \
--ssePath /messages \
--messagePath /message \
--cors "*" \
--env ACCUWEATHER_API_KEY="$ACCUWEATHER_API_KEY"Related MCP server: Weather MCP Server
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):
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@timlukahorstmann/mcp-weather"],
"env": {
"ACCUWEATHER_API_KEY": "your_api_key_here"
}
}
}
}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
Available Tools
Hourly Weather Forecast
Tool name:
weather-get_hourlyProvides hourly forecasts for the next 12 hours
Parameters:
location(required): City or location nameunits(optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)
Daily Weather Forecast
Tool name:
weather-get_dailyProvides daily forecasts for up to 15 days
Parameters:
location(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)
Prerequisites
Node.js ≥18
An AccuWeather API key (set via
.envor 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
.envfile with your API key: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?"
Development
Install dev dependencies:
npm installLint your code:
npm run lintBuild:
npm run buildRun tests:
npm testStart 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!
Changelog
0.4.0
Removed
sessionIdrequirement from all tools as it was not used for anything internallyThis simplifies integrations and reduces confusion for LLM usage
0.3.0 and earlier
Initial releases with basic functionality
License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
2 toolsweather-get_dailyA
Get daily weather forecast for up to 15 days
Inputs: location (required), days, units.
weather-get_hourlyA
Get hourly weather forecast for the next 12 hours
Inputs: location (required), units.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one provides daily forecasts for up to 15 days, while the other provides hourly forecasts for the next 12 hours. There is no overlap in functionality, and an agent can easily differentiate between them based on the time granularity and forecast duration.
Both tools follow a consistent naming pattern with a prefix 'weather-' followed by a verb_noun structure (get_daily, get_hourly). This pattern is predictable and enhances readability, making it easy for agents to understand the tool's purpose at a glance.
With only 2 tools, the server feels under-scoped for a weather domain. While the tools cover forecast retrieval, there are obvious gaps such as current weather conditions, historical data, or location-based searches, making the set too thin for comprehensive weather-related tasks.
The tool surface is severely incomplete for a weather server. It lacks essential operations like getting current weather, searching locations, or accessing historical data, which are core to weather applications. Agents will face dead ends when trying to perform basic weather queries beyond forecasts.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.1-
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides weather information and forecasts based on user location or address input.611 npm8MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather data and forecasts for any city.113 npmISC
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.-