mcp-weather
A Model Context Protocol (MCP) server that provides hourly and daily weather forecasts using the AccuWeather API.
claude mcp add --transport stdio timlukahorstmann-mcp-weather npx -y @timlukahorstmann/mcp-weather \ --env ACCUWEATHER_API_KEY="your_api_key_here"
How to use
The MCP Weather server exposes weather data to MCP-compatible clients (including Claude-like LLM integrations) by providing hourly forecasts for the next 12 hours and daily forecasts for up to 15 days. It uses the AccuWeather API to fetch real-time weather information and supports unit options (metric and imperial). To use it, run the server via npx with your API key set as an environment variable, or route requests through a gateway like Supergateway. Once running, you can call the available tools: weather-get_hourly for hourly forecasts (location and optional units), and weather-get_daily for multi-day forecasts (location, days, and optional units). These tools return structured weather data that can be consumed by your LLM to answer user queries such as city-specific weather or upcoming precipitation.
To enable access from an MCP client, you typically configure an MCP server entry with the command and arguments shown below, and provide your ACCUWEATHER_API_KEY via env. When integrated with Claude Desktop or similar tooling, you can reference the same MCP server in your client config and pass the API key through environment variables.
How to install
Prerequisites:
- Node.js v18 or later
- npm (comes with Node.js)
- An AccuWeather API key (free tier available)
Setup steps:
-
Clone the repository (or create a new MCP server entry): git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weather
-
Install dependencies: npm install
-
Obtain an AccuWeather API key:
- Sign up at https://developer.accuweather.com/ and create a new app to get your key
-
Create a .env file (optional if you pass via CLI) with your API key: ACCUWEATHER_API_KEY=your_api_key_here
-
Build the project (if the project requires a build step): npm run build
-
Run the server directly with npx (as shown in the Quick Start): npx -y @timlukahorstmann/mcp-weather
Additional notes
Tips and common considerations:
- Ensure your ACCUWEATHER_API_KEY is kept secure and not exposed in public configurations.
- If using a gateway like Supergateway, you can pass the env variable through the gateway configuration.
- The MCP server exposes two tools: weather-get_hourly (next 12 hours) and weather-get_daily (up to 15 days). You can adjust the location and units (metric or imperial) per tool usage.
- Node.js ≥18 is required; ensure your environment matches the prerequisite before installing.
- When integrating with Claude Desktop or other MCP clients, add the server entry with command npx and the appropriate env var in the config JSON, then reload the client configuration.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud