Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Real-time US weather data via National Weather Service API. Forecasts, alerts, and observations.

README.md

<div align="center"> <h1>@cyanheads/nws-weather-mcp-server</h1> <p><b>Get US weather forecasts, active alerts, and current observations via the National Weather Service API. STDIO or Streamable HTTP.</b> <div>7 Tools • 1 Resource</div> </p> </div>

<div align="center">

![Version](./CHANGELOG.md) ![License](./LICENSE) ![Docker](https://github.com/users/cyanheads/packages/container/package/nws-weather-mcp-server) ![MCP SDK](https://modelcontextprotocol.io/) ![npm](https://www.npmjs.com/package/@cyanheads/nws-weather-mcp-server) ![TypeScript](https://www.typescriptlang.org/) ![Bun](https://bun.sh/)

</div>

<div align="center">

![Install in Claude Desktop](https://github.com/cyanheads/nws-weather-mcp-server/releases/latest/download/nws-weather-mcp-server.mcpb) ![Install in Cursor](https://cursor.com/en/install-mcp?name=nws-weather-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvbndzLXdlYXRoZXItbWNwLXNlcnZlciJdfQ==) ![Install in VS Code](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22nws-weather-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads/nws-weather-mcp-server%22%5D%7D)

![Framework](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)

</div>

<div align="center">

Public Hosted Server: https://nws.caseyjhand.com/mcp

</div>

---

Tools

Seven tools for real-time US weather data:

| Tool | Description | |:----------|:------------| | nws_get_forecast | 7-day or hourly forecast for coordinates. Resolves NWS grid internally. | | nws_search_alerts | Active weather alerts filtered by area, point, zone, event, severity, urgency, certainty, and status. | | nws_get_observations | Current conditions by coordinates (nearest station) or station ID. | | nws_find_stations | Nearby observation stations sorted by distance with bearing. | | nws_list_alert_types | All valid alert event type names for filter discovery. | | nws_get_office_discussion | Latest narrative product (AFD, HWO, ZFP, SPS) from a Weather Forecast Office. | | nws_get_zone_forecast | Text forecast periods for a public NWS forecast zone. |

nws_get_forecast

Get the weather forecast for a US location.

  • Default returns named 12-hour periods (14 total, ~7 days)
  • Hourly mode returns the next 48 one-hour periods with dewpoint and humidity — the upstream feed carries ~156, and the pre-cap total plus a truncation notice are surfaced in the enrichment block
  • Coordinates resolve to NWS grid internally via /points endpoint
  • Formatted timestamps use the resolved local time zone
  • Returns forecast zone and county zone codes for chaining into nws_search_alerts

---

nws_search_alerts

Search active weather alerts with flexible filtering.

  • Filter by area (state/territory/marine codes), point (lat,lon), zone, event type, severity, urgency, certainty, or status
  • area, point, and zone are mutually exclusive; specify at most one location filter
  • National search when no filters provided
  • Blank optional location filters are ignored so form-based clients can submit empty fields safely
  • Event matching is case-insensitive and partial, so "tornado" matches both watches and warnings
  • status defaults to live Actual alerts, but can be set to Exercise, System, Test, or Draft
  • Optional limit (1–25, default 25) caps the returned alerts; totalCount reports the full match count, with a truncation notice and guidance to narrow filters
  • Validates area, point, and zone locally before the API call — malformed points fail fast as invalid_point instead of leaking a raw upstream 400

---

nws_get_observations

Current measured conditions from a weather station.

  • Look up by coordinates (finds nearest station) or station ID directly
  • Blank or whitespace-only station_id values are ignored so clients can fall back to coordinates cleanly
  • Coordinate lookups choose the nearest station from the candidates returned by NWS
  • Dual-unit display: F/C, mph/km/h, inHg/hPa, mi/km
  • Observation timestamps use the station's local time zone when available
  • Warns when most measurements are unavailable from a station

---

nws_find_stations

Discover nearby observation stations.

  • Sorted by haversine distance from query point
  • Returns distance (km) and compass bearing
  • Includes zone codes, elevation, time zone
  • Useful for finding station IDs for nws_get_observations

---

nws_list_alert_types

List all valid NWS alert event type names.

  • Returns the full set of event types the NWS API recognizes (e.g., "Tornado Warning", "Heat Advisory")
  • Use to discover valid values for the event filter in nws_search_alerts

---

nws_get_office_discussion

Get the latest narrative product from a Weather Forecast Office (WFO).

  • office: 3-letter WFO code (e.g., SEW for Seattle) — returned as the office field by nws_get_forecast
  • product_type: AFD (Area Forecast Discussion, default), HWO (Hazardous Weather Outlook), ZFP (Zone Forecast Product), SPS (Special Weather Statement)
  • Two-hop fetch: lists products by office/type (newest first), then retrieves full product text
  • Returns productText plus issuanceTime, issuingOffice, productName, productCode, wmoCollectiveId
  • Unknown office returns a clear error with recovery instructions (the NWS API returns HTTP 200 with an empty list, not a 404)

---

nws_get_zone_forecast

Get the text forecast for a public NWS forecast zone.

  • zone_id: forecast zone code (e.g., WAZ315) — returned by nws_get_forecast (forecastZone), nws_find_stations (forecastZone column), and nws_search_alerts (affectedZones)
  • Returns named periods (e.g., "Today", "Tonight", "Monday") with narrative text from local forecasters
  • Completes the alert-to-forecast chain: look up alert zones, then retrieve zone forecasts
  • County zone codes (XXC###) are not supported — use the forecast zone code

Resources

| URI Pattern | Description | |:------------|:------------| | nws://alert-types | Static list of all valid NWS alert event type names. |

Features

Built on @cyanheads/mcp-ts-core:

  • Declarative tool definitions — single file per tool, framework handles registration and validation
  • Unified error handling across all tools
  • Pluggable auth (none, jwt, oauth)
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase

NWS-specific:

  • Zero-auth access to the NWS API — no API keys required
  • Automatic coordinate-to-grid resolution with caching (1h TTL)
  • Request timeouts plus retry/backoff for transient NWS API failures
  • Dual-unit display for observations (F/C, mph/km/h, inHg/hPa, mi/km)
  • Continental US, Alaska, Hawaii, and US territories coverage

Getting started

Public Hosted Instance

A public instance is available at https://nws.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

{
  "mcpServers": {
    "nws-weather-mcp-server": {
      "type": "streamable-http",
      "url": "https://nws.caseyjhand.com/mcp"
    }
  }
}

Self-Hosted / Local

Add the following to your MCP client configuration file.

{
  "mcpServers": {
    "nws-weather-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/nws-weather-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "nws-weather-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/nws-weather-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "nws-weather-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/nws-weather-mcp-server:latest"]
    }
  }
}

For Streamable HTTP, set the transport and start the server:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/nws-weather-mcp-server.git
  1. Navigate into the directory:
cd nws-weather-mcp-server
  1. Install dependencies:
bun install

Configuration

| Variable | Description | Default | |:---------|:------------|:--------| | NWS_USER_AGENT | User-Agent for NWS API requests. The API requires this header. | (nws-weather-mcp-server, ...) | | MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio | | MCP_HTTP_PORT | Port for HTTP server. | 3010 | | MCP_HTTP_HOST | Hostname for HTTP server. | 127.0.0.1 | | MCP_LOG_LEVEL | Log level: debug, info, notice, warning, error. | info |

See .env.example for the full list including auth, storage, and OpenTelemetry options.

Running the server

Local development

  • Build and run the production version:
  # One-time build
  bun run rebuild

  # Run the built server
  bun run start:http
  # or
  bun run start:stdio
  • Run checks and tests:
  bun run devcheck     # Lints, formats, type-checks
  bun run test         # Runs test suite

Project structure

| Directory | Purpose | |:----------|:--------| | src/mcp-server/tools/definitions/ | Tool definitions (.tool.ts). | | src/mcp-server/resources/definitions/ | Resource definitions (.resource.ts). | | src/services/nws/ | NWS API client and response types. | | src/config/ | Environment variable parsing and validation with Zod. |

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for domain-specific logging, ctx.state for storage
  • Add new tools/resources to the barrel exports and the createApp() arrays in src/index.ts

Contributing

Issues and pull requests are welcome. Run checks before submitting:

bun run devcheck
bun run test

License

Apache-2.0 — see LICENSE for details.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Maps & Location servers.