Skip to main content
Glama
Weather MCP Server

Weather MCP Server

Weather MCP Server

An MCP server that exposes US weather data from the National Weather Service as tools for Cursor (or any MCP client).

Tools

Tool

Arguments

Description

get_alerts

state (e.g. CA, NY)

Active weather alerts for a US state

get_forecast

latitude, longitude

Next five forecast periods for a US location

NWS coverage is US-only. Use a two-letter state code for alerts and US coordinates for forecasts.

Related MCP server: Weather MCP Server

Requirements

  • uv

  • Python 3.14+ (this project pins >=3.14)

Setup

git clone <your-repo-url>
cd weather
uv sync

Run

The server speaks MCP over stdio:

uv run weather.py

Use with Cursor

  1. Copy .cursor/mcp.json.example to .cursor/mcp.json.

  2. Replace the uv path and --directory path with absolute paths on your machine.

  3. Open Cursor Settings → MCP, enable the weather server, and reload the window if it does not connect.

Example prompts after it is connected:

  • Get weather alerts for CA

  • What’s the forecast for 37.7749, -122.4194?

On Windows, uv is often not on Cursor’s PATH, so use the full path from where.exe uv. Keep --directory as an absolute project path.

Project layout

weather.py          # MCP server (tools + NWS client)
src/weather/        # Package entrypoint used by `uv run weather`
pyproject.toml      # Dependencies (`mcp[cli]`)
.cursor/            # Cursor MCP config (local `mcp.json` is gitignored)

Available Tools

2 tools
get_alertsA

Get weather alerts for a US state.

Args: state: Two-letter US state code (e.g. CA, NY)

Inputs: state (required). Returns: result

get_forecastC

Get weather forecast for a location.

Args: latitude: Latitude of the location longitude: Longitude of the location

Inputs: latitude (required), longitude (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 2 tools

    Disambiguation5/5

    get_alerts and get_forecast have clearly distinct purposes: one returns alerts for a US state, the other returns a forecast for coordinates. There is no ambiguity between the two.

    Naming Consistency5/5

    Both tools follow the same get_ noun pattern, making the naming predictable and consistent. The singular/plural difference (forecast vs. alerts) is semantically appropriate.

    Tool Count3/5

    With only two tools, the server feels thin for a weather domain, but it is still within a borderline range. Each tool provides a distinct core weather function, so the count is not unreasonable.

    Completeness2/5

    The weather domain typically includes current conditions, forecasts, and alerts. This server lacks current weather data and only handles forecasts and alerts, which is a significant gap for general weather use.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers