Skip to main content
Glama
Weather MCP Server

Weather MCP Server

by yusuf-bolat

Weather MCP Server

A Model Context Protocol (MCP) server that provides real-time US weather alerts and forecasts by integrating with the National Weather Service API. It connects directly to Claude Desktop, enabling Claude to fetch live weather data through natural language requests.

Demo

Weather Alerts Weather Forecast Hourly Forecast 1 Hourly Forecast 2

Related MCP server: Weather MCP Server

Tools

  • get_alerts — Get active weather alerts for a US state (e.g. TX, CA)

  • get_forecast — Get weather forecast for a location by latitude and longitude

  • get_hourly_forecast — Get hour-by-hour forecast for the next 12 hours by latitude and longitude

Setup

  1. Install uv

  2. Clone the repo and run uv sync

  3. Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "uv",
      "args": ["--directory", "/path/to/weather", "run", "weather.py"]
    }
  }
}

Slack Chatbot Setup

Use this if you want Claude + weather tools inside Slack.

  1. In your Slack app, ensure these are enabled:

  • Bot scopes: app_mentions:read, chat:write, channels:history, im:history

  • Events: app_mention, message.im

  • Socket Mode ON with an app-level token (connections:write)

  1. Create env file from template:

cp .env.example .env
  1. Fill .env with your real values:

  • SLACK_BOT_TOKEN (xoxb...)

  • SLACK_APP_TOKEN (xapp...)

  • SLACK_SIGNING_SECRET

  • ANTHROPIC_API_KEY

  1. Install dependencies and run:

uv sync
uv run slack_bot.py
  1. In Slack:

  • Mention the bot in a channel: @MCP-NWS weather alerts for TX

  • Or DM the bot: forecast for 37.7749, -122.4194

Available Tools

3 tools
get_alertsB

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

get_hourly_forecastB

Get hourly 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.4/5.0

    Scored across 3 tools

    Disambiguation4/5

    get_alerts is clearly distinct, while get_forecast and get_hourly_forecast overlap in inputs but differ in time granularity. The descriptions make the distinction clear enough for an agent.

    Naming Consistency5/5

    All tools follow the consistent verb_noun pattern 'get_<resource>' with clear resource names (alerts, forecast, hourly_forecast). No naming irregularities.

    Tool Count4/5

    Three tools is slightly thin for a weather domain, but each serves a core need (alerts, daily forecast, hourly forecast). The set is well-scoped and not bloated.

    Completeness4/5

    Covers alerts and forecast types, but lacks current conditions or historical data. The main forecast lifecycle is covered, with minor gaps an agent could work around.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers