Skip to main content
Glama
Weather MCP Server

Weather MCP Server

Weather MCP Server

A Model Context Protocol (MCP) server built with FastMCP that provides US weather forecasts and active alerts using the National Weather Service (NWS) API.

Features (Tools Provided)

When connected to an AI assistant, it provides the following tools:

  • get_alerts(state: str): Fetches active weather alerts for a US state (e.g. "CA", "NY").

  • get_forecast(latitude: float, longitude: float): Fetches detailed weather forecasts for a specific geographic coordinate.

Related MCP server: MCP Weather Server

Project Structure

  • weather.py: The main FastMCP server containing the API calls and tool definitions.

  • .venv/: The Python virtual environment for isolated dependencies.

  • pyproject.toml / main.py: Other configuration and entry point scripts.

Installation & Setup

  1. Make sure you are using the virtual environment:

    source .venv/bin/activate
  2. Required packages are likely already installed, but if not:

    pip install "mcp[cli]" httpx

Testing Locally

You can test the MCP tools locally through a web interface using the MCP Inspector:

npx @modelcontextprotocol/inspector "/Users/name/mcp servers/.venv/bin/python" "/Users/name/mcp servers/weather.py"

Connecting to AI Clients (e.g., Claude Desktop)

To use this server with Claude Desktop, add the following to your claude_desktop_config.json file:

{
  "mcpServers": {
    "weather": {
      "command": "/Users/name/mcp servers/.venv/bin/python",
      "args": [
        "/Users/name/mcp servers/weather.py"
      ]
    }
  }
}

Restart Claude and it will now have access to live formatting and tracking for US weather!

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.3/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools serve entirely different purposes: one for alerts by state, another for forecast by coordinates. No overlap or confusion possible.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern (get_alerts, get_forecast), making it easy to predict naming.

    Tool Count3/5

    With only 2 tools, the server feels thin compared to typical weather API capabilities. It's borderline but not excessive given its narrow scope.

    Completeness2/5

    The server lacks common weather operations like current conditions, hourly forecast, or historical data. Significant gaps exist for a comprehensive weather service.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      This is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)
      -
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides tools to fetch weather alerts for US states and forecasts based on latitude/longitude coordinates using the US National Weather Service API.
      2
      102 npm
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides current weather forecasts for specific locations and active weather alerts for US states.
      2
      ISC