GnistAI GnistAI
Log in

Getting Started with NOAA Weather Alerts

Active U.S. weather alerts — watches, warnings, and advisories by area.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Environment

Data source: NOAA / NWS

Overview

NOAA Weather Alerts wraps NOAA / NWS, handling authentication, pagination, and rate limits for you. This tutorial covers all 4 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-noaa-alerts": {
      "url": "https://context.gnist.ai/mcp/noaa-alerts/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (4)

get_active_alerts

Get all currently active NOAA weather alerts and warnings across the US. Returns real-time National Weather Service alerts including severe weather warnings, watches, advisories, and statements. Data covers all US states, territories, and marine zones. Args: state: Two-letter US state/territory code to filter by (e.g. "CA", "TX", "PR"). severity: Filter by severity level — "Extreme", "Severe", "Moderate", "Minor". event: Filter by event type (e.g. "Tornado Warning", "Winter Storm Watch"). urgency: Filter by urgency — "Immediate", "Expected", "Future", "Past". certainty: Filter by certainty — "Observed", "Likely", "Possible", "Unlikely". limit: Maximum results to return (1-500, default 50). Returns: Dict with 'count' and 'results' list of active alerts. Each alert includes event type, severity, headline, description, affected areas, and timing.

ParameterTypeRequiredDescription
stateanyoptionalTwo-letter US state/territory code to filter by (e.g. "CA", "TX", "PR").
severityanyoptionalFilter by severity level — "Extreme", "Severe", "Moderate", "Minor".
eventanyoptionalFilter by event type (e.g. "Tornado Warning", "Winter Storm Watch").
urgencyanyoptionalFilter by urgency — "Immediate", "Expected", "Future", "Past".
certaintyanyoptionalFilter by certainty — "Observed", "Likely", "Possible", "Unlikely".
limitintegeroptionalMaximum results to return (1-500, default 50). (default: 50)
curl -X POST "https://context.gnist.ai/mcp/noaa-alerts/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_active_alerts", "arguments": {"state": "CA"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-alerts/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'state': 'CA'}, 'name': 'get_active_alerts'}},
)
print(resp.json())

get_alerts_for_point

Get active weather alerts for a specific geographic point in the US. Returns all current NWS alerts that cover the given latitude/longitude, useful for location-specific weather safety checks. Args: latitude: Latitude of the point (-90 to 90). longitude: Longitude of the point (-180 to 180). limit: Maximum results to return (1-100, default 20). Returns: Dict with 'count' and 'results' list of alerts affecting the given point.

ParameterTypeRequiredDescription
latitudenumberrequiredLatitude of the point (-90 to 90).
longitudenumberrequiredLongitude of the point (-180 to 180).
limitintegeroptionalMaximum results to return (1-100, default 20). (default: 20)
curl -X POST "https://context.gnist.ai/mcp/noaa-alerts/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_alerts_for_point", "arguments": {"latitude": 59.91, "longitude": 10.75}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-alerts/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'latitude': 59.91, 'longitude': 10.75},
            'name': 'get_alerts_for_point'}},
)
print(resp.json())

get_alert

Get detailed information about a specific weather alert by its NWS alert ID. Args: alert_id: The NWS alert identifier (e.g. "urn:oid:2.49.0.1.840.0.abc123"). Returns: Dict with full alert details including headline, description, safety instructions, severity, affected areas, and timing. Returns an error if the alert is not found.

ParameterTypeRequiredDescription
alert_idstringrequiredThe NWS alert identifier (e.g. "urn:oid:2.49.0.1.840.0.abc123").
curl -X POST "https://context.gnist.ai/mcp/noaa-alerts/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_alert", "arguments": {"alert_id": "urn:oid:2.49.0.1.840.0.abc123"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-alerts/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'alert_id': 'urn:oid:2.49.0.1.840.0.abc123'},
            'name': 'get_alert'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/noaa-alerts/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-alerts/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.

FAQ

What data does NOAA Weather Alerts provide?

Active U.S. weather alerts — watches, warnings, and advisories by area. It exposes 4 tools: get_active_alerts, get_alerts_for_point, get_alert, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the NOAA Weather Alerts API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials