Get the FREE Ultimate OpenClaw Setup Guide →

mcp-weather

A Model Context Protocol (MCP) server that provides hourly and daily weather forecasts using the AccuWeather API.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository (or create a new MCP server entry): git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weather

  2. Install dependencies: npm install

  3. Obtain an AccuWeather API key:

  4. Create a .env file (optional if you pass via CLI) with your API key: ACCUWEATHER_API_KEY=your_api_key_here

  5. Build the project (if the project requires a build step): npm run build

  6. 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

Sponsor this space

Reach thousands of developers