nws-mcp-server
Provides weather alerts and forecasts from the National Weather Service, enabling OpenAI to query weather data for US locations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nws-mcp-serverGet weather alerts for Florida"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Clone the repository:
git clone https://github.com/Lil-Code30/nws-mcp-server.git
cd nws-mcp-serverInstall dependencies:
npm installBuild
Compile the TypeScript code:
npm run buildUsage
Run the MCP server:
npm startThe 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=CAReturns 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.4194Retrieves the forecast URL from the points response, then fetches forecast data from that URL.
Returns a formatted forecast for the location.
NWS API Reference
Full documentation: National Weather Service API
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 toolsget_alertsA
Get weather alerts for a state
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | Two-letter state code (e.g CA, NY) |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | Latitude of the location | |
| longitude | Yes | Longitude of the location |
TDQS
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.
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.
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.
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.
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.
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.
2 tool updates
v1.0.2-0- First observed
get_alerts - First observed
get-forecast
TDQS
The two tools serve clearly distinct purposes: one for weather alerts and one for forecasts. There is no overlap in functionality.
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.
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.
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
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
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
1An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides weather information like forecasts and alerts for US locations using the National Weather Service API.5-
- FlicenseBqualityDmaintenanceAn 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-
- FlicenseBqualityDmaintenanceAn MCP server providing US National Weather Service data with tools to fetch weather alerts by state and forecasts by coordinates.2-
- FlicenseBqualityDmaintenanceAn MCP server that provides real-time weather alerts for US states using the National Weather Service (NWS) API. It also includes utility features for message echoing and generating customizable greeting prompts.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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