home / mcp / weather mcp server

Weather MCP Server

Provides current weather and 3-day forecasts via MCP using Open-Meteo data.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kaisumi-weather-mcp": {
      "command": "python",
      "args": [
        "-m",
        "app.server"
      ],
      "env": {
        "MCP_API_KEY": "YOUR_API_KEY",
        "MCP_BASE_URL": "http://localhost:8000"
      }
    }
  }
}

This Weather MCP Server provides access to current weather and a 3-day forecast by querying the Open-Meteo data source through the MCP protocol. You can run the server locally, configure access via environment variables, and retrieve weather information for any city through an MCP client.

How to use

Start the MCP server with Python to expose weather data to your MCP client. You will authenticate via an API key and connect to the server’s base URL to retrieve weather information for any city.

Prerequisites: ensure Python 3.x is installed on your system. You will install the package, set environment variables, then run the server and client as shown below.

Typical usage flow - Configure your environment with the API key and base URL - Start the MCP server - Use your MCP client to request current weather and a 3-day forecast for a city - Interpret the returned data for display in your application

How to install

Prerequisites: Python 3.x, pip for installing Python packages.

pip install -e .

Create a .env file and set the required environment variables.

MCP_API_KEY=your_api_key_here
MCP_BASE_URL=http://localhost:8000

Start the MCP server using the Python module for the app server.

python -m app.server

Optionally, run the MCP client to verify everything is wired up.

python -m app.client

Available tools

get_weather

Fetches the current weather and a 3-day forecast for a specified city. Returns location details, current conditions, and an array of forecast entries with date, temperatures, precipitation, and sunrise/sunset information.