by TimLukaHorstmann
Provides hourly and daily weather forecasts via the AccuWeather API for Model Context Protocol (MCP) integration with language models.
MCP Weather Server enables large language models to retrieve real‑time weather data, offering both hourly (next 12 hours) and daily (up to 15 days) forecasts for any city.
ACCUWEATHER_API_KEY
in your environment or a .env
file.npx -y @timlukahorstmann/mcp-weather
or expose it through a supergateway HTTP/REST wrapper if you need standard REST endpoints.npx
command in the client’s mcpServers
configuration.weather-get_hourly
).weather-get_daily
).npx
– no global install required.Q: Is an API key mandatory? A: Yes. The server forwards requests to AccuWeather, which requires a valid API key.
Q: Which Node.js versions are supported? A: Node ≥ 18.
Q: Can I customize the number of forecast days?
A: Yes, the days
parameter accepts 1, 5, 10 or 15 (default 5).
Q: Do I need to install the package globally?
A: No. The recommended approach is the provided npx
command.
Q: How do I expose the server over HTTP?
A: Use supergateway
as shown in the Quick Start section.
A Model Context Protocol (MCP) server that provides hourly and daily weather forecasts using the AccuWeather API.
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_here
Then run the MCP Weather server directly with:
npx -y @timlukahorstmann/mcp-weather
Or, 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"
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"
}
}
}
}
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:
weather-get_hourly
location
(required): City or location nameunits
(optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)weather-get_daily
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).env
or your shell)Clone this repository:
git clone https://github.com/TimLukaHorstmann/mcp-weather.git
cd mcp-weather
Install dependencies:
npm install
Get an AccuWeather API key:
Create a .env
file with your API key:
ACCUWEATHER_API_KEY=your_api_key_here
Build the project:
npm run build
Configure Claude Desktop to use this MCP server:
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:
npm install
npm run lint
npm run build
npm test
npm run dev
Contributions are welcome! Please feel free to submit a Pull Request.
We're always looking to improve the MCP Weather Server. Here are some features we're considering for future releases:
If you have ideas for other features, feel free to open an issue!
sessionId
requirement from all tools as it was not used for anything internallyThis project is licensed under the MIT License - see the LICENSE file for details.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "weather": { "command": "npx", "args": [ "-y", "@timlukahorstmann/mcp-weather" ], "env": { "ACCUWEATHER_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 isdaniel
Provides current weather, historical weather ranges, and timezone‑aware current datetime for specified cities using the free Open‑Meteo API.