A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/TimLukaHorstmann/mcp-weather below:

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

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

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"
      }
    }
  }
}

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:

  1. Clone this repository:

    git clone https://github.com/TimLukaHorstmann/mcp-weather.git
    cd mcp-weather
  2. Install dependencies:

  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:

Usage with Claude Desktop
  1. Configure Claude Desktop to use this MCP server:

    {
      "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:

Contributions are welcome! Please feel free to submit a Pull Request.

We're always looking to improve the MCP Weather Server. Here are some features we're considering for future releases:

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

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4