Labsco
TimLukaHorstmann logo

Weather

โ˜… 33

from TimLukaHorstmann

Accurate weather forecasts via the AccuWeather API (free tier available).

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

MCP Weather Server

npm version license node version issues weekly downloads Trust Score

<p align="center"> <img src="logo.png" alt="MCP Weather Server Logo" width="250"/> <a href="https://glama.ai/mcp/servers/@TimLukaHorstmann/mcp-weather"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@TimLukaHorstmann/mcp-weather/badge" alt="Weather MCP server" /> </a> </p>

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


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):

Copy & paste โ€” that's it
{
  "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 the next 12 hours
  • Access daily weather forecasts for up to 15 days
  • Display data in both metric (ยฐC) and imperial (ยฐF) units
  • View temperature, conditions, precipitation information, and other weather details

Available Tools

Hourly Weather Forecast

  • Tool name: weather-get_hourly
  • Provides hourly forecasts for the next 12 hours
  • Parameters:
    • location (required): City or location name
    • units (optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)

Daily Weather Forecast

  • Tool name: weather-get_daily
  • Provides daily forecasts for up to 15 days
  • Parameters:
    • location (required): City or location name
    • days (optional): Number of forecast days (1, 5, 10, or 15; default is 5)
    • units (optional): "metric" (Celsius, default) or "imperial" (Fahrenheit)

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:

  • Extended Hourly Forecasts: Beyond 12 hours, e.g., 24 or 48 hours.
  • Weather Alerts: Integration with AccuWeather's severe weather alerts API.
  • Location Autocomplete: Improved location searching with autocomplete suggestions.
  • Historical Weather Data: Access to past weather conditions.

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

Changelog

0.4.0

  • Removed sessionId requirement from all tools as it was not used for anything internally
  • This simplifies integrations and reduces confusion for LLM usage

0.3.0 and earlier

  • Initial releases with basic functionality

License

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