MCP Server AccuWeather Hourly and Daily Forecasts
Integrate hourly and daily AccuWeather forecasts via an MCP server for seamless weather data and reliable location-based updates.
npx -y @TimLukaHorstmann/mcp-weatherOverview
This MCP (Model Context Protocol) server exposes AccuWeather hourly and daily forecasts as MCP-compatible tools. It bridges AccuWeather’s REST API and model-driven workflows so language models or other MCP-aware agents can request weather data by location and receive consistent, structured forecasts. The server handles API key management, location lookup, result formatting, and rate-limit smoothing so models and integrations get concise, reliable weather context.
For developers, the server is useful when you need location-based weather data inside a model-driven application, a chatbot, scheduling assistant, or automation pipeline. By providing hourly and daily forecasts as MCP tools, you can invoke precise, up-to-date weather conditions without embedding API keys in multiple places or writing custom parsing logic for forecast responses.
Features
- Exposes AccuWeather hourly and daily forecasts as MCP tools
- Location-based lookup: supports lat/lon or AccuWeather location keys
- Structured JSON output formatted for model consumption
- Simple configuration using environment variables or a .env file
- Docker-ready and runnable locally for development
- Example tool manifest for easy integration with MCP-capable models
- Rate-limit and error handling to surface consistent messages to clients
Installation / Configuration
Clone the repository, install dependencies, configure your AccuWeather API key, and start the server.
- Clone the repo
2a. Run locally (Node.js example)
# install
# set environment variables (or add them to a .env file)
# start the server
2b. Run with Docker
# build (if a Dockerfile is included)
# run with environment variables
- Example .env
ACCUWEATHER_API_KEY=your_accuweather_api_key
PORT=3000
DEFAULT_UNITS=metric # or imperial
DEFAULT_LANG=en-us
Configuration options (typical environment variables)
- ACCUWEATHER_API_KEY — required API key for AccuWeather
- PORT — server listen port (default 3000)
- DEFAULT_UNITS — metric or imperial
- DEFAULT_LANG — language code for forecasts (e.g., en-us)
- RATE_LIMIT_WINDOW / RATE_LIMIT_MAX — optional rate-limit settings
Available Tools / Resources
The server exposes MCP-style tools (HTTP endpoints) for forecasts. Typical endpoints and their purpose:
| Endpoint | Method | Description |
|---|---|---|
| /tools/accuweather/hourly | POST | Returns hourly forecast for the next N hours for a given location |
| /tools/accuweather/daily | POST | Returns daily forecast for the next N days for a given location |
| /locations/lookup | GET or POST | Resolve lat/lon to AccuWeather location key (optional) |
| /health | GET | Health check / readiness |
Request payloads are JSON. Example input schema:
Example curl calls:
# Hourly forecast by lat/lon
# Daily forecast by location key
Example MCP tool manifest (JSON) to register with an MCP-capable model:
Use Cases
- Chatbot weather queries: A conversational assistant can call the hourly tool to answer “What’s the weather like for