Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-weather

MCP.Pizza Chef: adhikasp

The mcp-weather server is an MCP server that provides detailed hourly weather forecasts by integrating with the AccuWeather API. It enables real-time access to weather data such as temperature, conditions, and forecasts for specified locations. Setup involves installing dependencies and configuring an AccuWeather API key. This server is ideal for applications needing accurate, up-to-date weather information within the MCP ecosystem, supporting seamless interaction with LLMs for weather-related queries and automation.

Use This MCP server To

Provide hourly weather updates for any location Integrate weather data into AI-driven applications Enable real-time weather queries in chatbots Support location-based weather forecasting in workflows Automate weather condition alerts and notifications

README

MCP Weather Server

A simple MCP server that provides hourly weather forecasts using the AccuWeather API.

Setup

  1. Install dependencies using uv:
uv venv
uv sync
  1. Create a .env file with your AccuWeather API key:
ACCUWEATHER_API_KEY=your_api_key_here

You can get an API key by registering at AccuWeather API.

Running the Server

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

API Usage

Get Hourly Weather Forecast

Response:

{
    "location": "Jakarta",
    "location_key": "208971",
    "country": "Indonesia",
    "current_conditions": {
        "temperature": {
            "value": 32.2,
            "unit": "C"
        },
        "weather_text": "Partly sunny",
        "relative_humidity": 75,
        "precipitation": false,
        "observation_time": "2024-01-01T12:00:00+07:00"
    },
    "hourly_forecast": [
        {
            "relative_time": "+1 hour",
            "temperature": {
                "value": 32.2,
                "unit": "C"
            },
            "weather_text": "Partly sunny",
            "precipitation_probability": 40,
            "precipitation_type": "Rain",
            "precipitation_intensity": "Light"
        }
    ]
}

The API provides:

  • Current weather conditions including temperature, weather description, humidity, and precipitation status
  • 12-hour forecast with hourly data including:
    • Relative time from current time
    • Temperature in Celsius
    • Weather description
    • Precipitation probability, type, and intensity

mcp-weather FAQ

How do I set up the mcp-weather server?
Install dependencies using 'uv venv' and 'uv sync', then create a .env file with your AccuWeather API key.
Where do I get the AccuWeather API key?
Register at the AccuWeather developer portal (https://developer.accuweather.com/) to obtain an API key.
How do I run the mcp-weather server?
Use the provided JSON configuration with 'uvx' command, specifying the repository and your API key in the environment variables.
What kind of weather data does mcp-weather provide?
It offers hourly forecasts including temperature, weather conditions, and location-specific details.
Can mcp-weather be used with different LLM providers?
Yes, it is compatible with models like OpenAI, Claude, and Gemini through the MCP protocol.
Is the weather data updated in real-time?
Yes, the server fetches hourly updates from the AccuWeather API to provide current weather information.
What programming environment is required?
The server uses Python with dependencies managed via 'uv' tooling for virtual environments and synchronization.