Skip to main content
Glama
Lil-Code30

nws-mcp-server

by Lil-Code30

National Weather Service MCP Server

This project is an MCP (Model Context Protocol) server that provides weather data using the National Weather Service (NWS) API.

This is not an official NWS product. It is a custom implementation designed to integrate with MCP clients like Claude or OpenAI.

Features

  • Get weather alerts for a US state

  • Get weather forecast for a specific location (latitude/longitude)

Related MCP server: Weather MCP Server

Requirements

  • Node.js (v18+ recommended)

  • npm

Installation

  1. Clone the repository:

git clone https://github.com/Lil-Code30/nws-mcp-server.git
cd nws-mcp-server
  1. Install dependencies:

npm install

Build

Compile the TypeScript code:

npm run build

Usage

Run the MCP server:

npm start

The server runs via stdio and exposes two tools:

1. get_alerts

  • Description: Get weather alerts for a US state.

  • Input:

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

  • How it works:

    • Uses the NWS Alerts endpoint: /alerts?area={STATE}

    • Example: https://api.weather.gov/alerts?area=CA

    • Returns active alerts or a message if none are found.

2. get-forecast

  • Description: Get weather forecast for a location.

  • Input:

    • latitude: Latitude of the location (US only)

    • longitude: Longitude of the location (US only)

  • How it works:

    • Uses the NWS Points endpoint: /points/{lat},{lon}

    • Example: https://api.weather.gov/points/37.7749,-122.4194

    • Retrieves the forecast URL from the points response, then fetches forecast data from that URL.

    • Returns a formatted forecast for the location.

NWS API Reference

Notes

  • Only US locations are supported by the NWS API.

  • The server is designed for integration with MCP clients.

Integrating with Claude or Other MCP Clients

You can connect this MCP server to any MCP-compatible client (like Claude, OpenAI, or custom apps) using the Model Context Protocol. The server communicates via stdio, so you can run it locally and connect via a tool or agent interface.

Available Tools

2 tools
get_alertsA

Get weather alerts for a state

ParametersJSON Schema
NameRequiredDescriptionDefault
stateYesTwo-letter state code (e.g CA, NY)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; the description does not disclose any behavioral traits such as authentication requirements, rate limits, or output characteristics. The minimal statement fails to inform an agent about side effects or limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence of six words. It is front-loaded and contains no fluff, earning its place efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (one parameter, no annotations, no output schema), the description covers the basic purpose but lacks context on behavior or output structure. Adequate but minimal.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage for the 'state' parameter with a clear description and example. The description does not add additional meaning beyond the schema, so baseline score applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'weather alerts' with scope 'for a state'. It effectively distinguishes from the sibling tool 'get-forecast' which implies forecasts vs alerts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus the sibling 'get-forecast'. The description implies the purpose but does not outline conditions or alternatives beyond the tool's name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-forecastGet Weather ForecastC

Get weather forcast for a location

ParametersJSON Schema
NameRequiredDescriptionDefault
latitudeYesLatitude of the location
longitudeYesLongitude of the location

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the full burden of behavioral disclosure. It fails to mention data sources, units, time range, update frequency, or any limitations. The description is too vague to inform the agent about operational nuances.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (one sentence), but it contains a typo and lacks substantive detail. While it is concise, it sacrifices clarity and completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (2 parameters, no output schema) and absence of annotations, the description is inadequate. It does not specify forecast parameters like temperature units or time period, leaving the agent uncertain about the tool's output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with clear descriptions for latitude and longitude. The description adds no extra semantic value beyond the schema, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get weather forcast for a location' clearly indicates the verb (get) and resource (forecast), distinguishing it from the sibling tool 'get_alerts' which likely handles weather alerts. However, the description lacks specificity on forecast type (e.g., temperature, hourly/daily) and contains a typo ('forcast').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling 'get_alerts'. There are no explicit use cases, prerequisites, or exclusions, leaving the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.2-0
    • First observedget_alerts
    • First observedget-forecast

TDQS

B3/5.0
Disambiguation5/5

The two tools serve clearly distinct purposes: one for weather alerts and one for forecasts. There is no overlap in functionality.

Naming Consistency3/5

Both tools follow a verb_noun pattern, but one uses underscores (get_alerts) while the other uses a hyphen (get-forecast). This inconsistency could confuse an agent expecting uniform naming.

Tool Count2/5

With only two tools, the server feels too thin for a comprehensive weather service. While it covers alerts and forecasts, it lacks other common NWS operations like current conditions.

Completeness2/5

The tool set provides only alerts and forecasts, missing significant NWS operations such as current observations, radar, or marine forecasts. This creates notable dead ends for agents.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    An MCP server that provides weather information and alerts for US locations using the National Weather Service API, enabling retrieval of weather forecasts and active weather alerts.
    2
    -
  • F
    license
    B
    quality
    D
    maintenance
    An MCP server providing US National Weather Service data with tools to fetch weather alerts by state and forecasts by coordinates.
    2
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lil-Code30/nws-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server