Weather Server (MCP)

by Kavinduprabasara

268 downloads Not rated yet
GitHub

About

# Weather Server (MCP) A minimal async Python server that provides weather alerts and forecasts for US locations using the National Weather Service (NWS) API, built with FastMCP. ## Features - **Get weather alerts** for any US state (by two-letter code) - **Get weather forecasts** for any latitude/longitude in the US…

Explore

- Get weather alerts for any US state (by two-letter code)
- Get weather forecasts for any latitude/longitude in the US
- Simple, async, and easy to extend

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Weather Server (MCP)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.13+
- httpx
- mcp (and FastMCP)
- uv (for running the server, optional)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "weather server (mcp)": {
            "mcp-server-one": {
                "command": "uv",
                "args": [
                    "run",
                    "--with",
                    "mcp[cli]",
                    "mcp",
                    "run",
                    "server.py"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-one": {
        "command": "uv",
        "args": [
            "run",
            "--with",
            "mcp[cli]",
            "mcp",
            "run",
            "server.py"
        ]
    }
}

A minimal async Python server that provides weather alerts and forecasts for US locations using the National Weather Service (NWS) API, built with FastMCP.

Features

- Get weather alerts for any US state (by two-letter code)
- Get weather forecasts for any latitude/longitude in the US
- Simple, async, and easy to extend

Requirements

- Python 3.13+
- httpx
- mcp (and FastMCP)
- uv (for running the server, optional)

Installation

1. Clone this repository:

    git clone <your-repo-url>
cd mcp-server-one

2. Install dependencies:

    pip install -e .

Usage

You can run the server using the provided configuration (see mcp.json):

uv run --with mcp[cli] mcp run server.py

Or, directly with Python:

python server.py

API Tools

Get Weather Alerts

- Function: get_alerts(state: str)
- Description: Returns active weather alerts for a US state (e.g., CA, NY).

Get Weather Forecast

- Function: get_forecast(latitude: float, longitude: float)
- Description: Returns the weather forecast for the given coordinates.

Project Structure

server.py         # Main server code
pyproject.toml    # Project metadata and dependencies
mcp.json          # (Optional) MCP/uv run configuration
README.md         # This file
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.