MCP Weather

Integrations

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

MCP Weather Server

A Model Context Protocol (MCP) server that provides hourly 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_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"

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 any location
  • Access temperature, conditions, and other weather details

Prerequisites

  • Node.js ≥18
  • An AccuWeather API key (set via .env or your shell)

Setup

  1. Clone this repository:
    git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weather
  2. Install dependencies:
    npm install
  3. Get an AccuWeather API key:
  4. Create a .env file with your API key:
    ACCUWEATHER_API_KEY=your_api_key_here
  5. Build the project:
    npm run build

Usage with Claude Desktop

  1. 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" } } } }
  2. Restart Claude Desktop
  3. In a new conversation, enable the MCP server by clicking the plug icon and selecting "weather"
  4. Now you can ask Claude for weather forecasts, such as:
    • "What's the weather forecast for New York City?"
    • "Will it rain in London tomorrow?"
    • "How hot will it be in Tokyo this afternoon?"

Development

  • Install dev dependencies: npm install
  • Lint your code: npm run lint
  • Build: npm run build
  • Run tests: npm test
  • Start 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:

  • Daily Forecasts: Option to retrieve a summary for the next few days.
  • Extended Hourly Forecasts: Beyond 12 hours, e.g., 24 or 48 hours.
  • More Configuration Options: e.g., preferred units (Celsius/Fahrenheit) via input.

If you have ideas for other features, feel free to open an issue!

License

This project is licensed under the MIT License - see the LICENSE file for details.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

MCP Weather

  1. Quick Start
    1. MCP Server Config Example
      1. Overview
        1. Prerequisites
          1. Setup
            1. Usage with Claude Desktop
              1. Development
                1. Contributing
                  1. Future Enhancements
                    1. License

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        An MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.
                        Last updated -
                        Python
                        • Linux
                        • Apple
                      • A
                        security
                        F
                        license
                        A
                        quality
                        MCP server that provides Korean weather information using grid coordinates and the Korea Meteorological Administration API, allowing users to query current weather conditions and forecasts for specific locations in Korea.
                        Last updated -
                        2
                        3
                        Python
                        • Apple
                        • Linux
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A Model Control Protocol (MCP) based service that allows users to query weather forecasts by coordinates and receive weather alerts for U.S. states.
                        Last updated -
                        1
                        Python
                        • Linux
                        • Apple

                      View all related MCP servers

                      ID: xs8vlunfl8