home / mcp / weather mcp server

Weather MCP Server

MCP server that provides hourly weather forecasts using the AccuWeather API

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "adhikasp-mcp-weather": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/adhikasp/mcp-weather.git",
        "mcp-weather"
      ],
      "env": {
        "ACCUWEATHER_API_KEY": "your_api_key_here"
      }
    }
  }
}

This MCP Weather Server provides hourly weather forecasts using AccuWeather data. You can run it within your MCP environment to fetch current conditions and a 12-hour hourly forecast for a specified location, then expose that data to your MCP clients for dashboards, automations, or alerts.

How to use

You will run this server as an MCP endpoint that your clients can query for current weather and the next 12 hours of hourly data. The server exposes an API with fields such as location, current_conditions, and hourly_forecast. To use it, start the MCP Weather Server in your MCP runtime and then request the weather data for your target location through your MCP client. Each request returns the location, country, current conditions, and a 12-hour hourly forecast with temperature, description, and precipitation details.

Important notes for practical usage:

  • Provide your AccuWeather API key via the ACCUWEATHER_API_KEY environment variable.
  • Choose the location you want forecasts for; the example data shows Jakarta, Indonesia, but you can request other locations supported by AccuWeather.
  • The API returns both current conditions and a 12-hour hourly forecast, including temperature in Celsius, weather descriptions, and precipitation information.

How to install

Follow these steps to set up the MCP Weather Server on your system from scratch.

  • Install the MCP runtime tools used to manage MCP servers (uv and uvx).
  • Create a runtime environment and install dependencies as shown in the setup flow.
  • Configure your AccuWeather API key in a local environment file before starting the server.

Step-by-step commands you should run in your terminal or command prompt.

# Step 1: Install runtime tools
uv venv
uv sync

# Step 2: Create environment file with your API key
# Use your preferred editor to create a .env file with this content:
ACCUWEATHER_API_KEY=your_api_key_here

Additional notes

Configuration and runtime details are provided directly in the deployment snippet. You will start the server using the MCP configuration shown below, which runs the uvx tool with the weather package from its Git source and forwards your API key through the environment.

{
  "mcpServers": {
    "weather": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/adhikasp/mcp-weather.git", "mcp-weather"],
      "env": {
        "ACCUWEATHER_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available tools

hourly_forecast

Provides a 12-hour hourly forecast with relative times, temperature in Celsius, weather description, and precipitation details.

current_conditions

Returns current weather conditions including temperature, humidity, and precipitation status.