NWS Weather MCP Sample
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 Weather MCP SampleWhat's the forecast in San Francisco?"
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.
NWS Weather MCP Sample
Python MCP server that pulls forecasts and alerts from the National Weather Service API, plus a small demo CLI client. The same server works with Claude Desktop.
Layout
src/weather_mcp/ # MCP server + NWS helpers
src/weather_mcp_client/ # Demo stdio MCP client
config/ # Claude Desktop example configRelated MCP server: weather-mcp
Setup
cd C:\Work\Projects\McpWeatherSample
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .Demo CLI (no LLM)
Spawns the MCP server over stdio and lets you call tools directly:
weather-mcp-cli
# or: python -m weather_mcp_cli.clientExample session:
weather> tools
weather> forecast 40.7128 -74.0060
weather> alerts NY
weather> quitClaude Desktop
Install the package into a venv (see Setup).
Copy config/claude_desktop_config.example.json into
%APPDATA%\Claude\claude_desktop_config.json.Confirm the
commandpath points at your venv Python, e.g.C:\\Work\\Projects\\McpWeatherSample\\.venv\\Scripts\\python.exe.Restart Claude Desktop.
Confirm the
nws-weathertools appear (hammer / MCP tools UI).
Example prompts:
What's the forecast for 38.89, -77.03?
How is the weather in NYC?
Any weather alerts in CA?
Tools
Tool | Arguments | Description |
|
| NWS 7-day / 12-hour periods for a US point |
|
| Active alerts for a two-letter US state |
NWS requires a User-Agent on every request; the server sets one automatically. No API key is required.
Available Tools
2 toolsget_alertsA
Get active National Weather Service alerts for a US state.
Args: state: Two-letter US state code (e.g. CA, NY, TX).
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It's a read-only query tool, and the description does communicate this is a retrieval operation ('Get active... alerts'). However, it doesn't disclose what NWS data is included, whether alerts are current-hour only, response format, or any rate-limit considerations. Adequate but minimal behavioral disclosure.
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 two lines with a docstring-style format including an Args section. Every sentence earns its place: purpose statement plus parameter explanation with examples. No wasted words. The formatting is clean and front-loaded.
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?
For a single-parameter read tool with an output schema present, this description is reasonably complete. The state param is documented with examples, the purpose is clear, and output schema handles return values. Slight gap: no mention of what alert types/categories are returned or how to handle states without active alerts, but these are minor for a simple tool.
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 0% description coverage, so the description must compensate. It does explain the 'state' parameter as 'Two-letter US state code (e.g. CA, NY, TX)', which adds format and examples beyond the schema's bare 'State' title. However, 'state' is a simple self-explanatory single param, so the added value is modest.
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) + resource (active National Weather Service alerts) + scope (for a US state). It distinguishes from the sibling tool get_forecast since it specifies alerts rather than forecast data. Could improve by explicitly contrasting with get_forecast.
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?
The description implies usage via 'active' alerts for a US state, but doesn't explicitly state when to use this versus get_forecast. It also doesn't mention any prerequisites, limitations, or what 'active' means (excludes expired/historical alerts). Basic context present, but no alternatives or exclusions named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_forecastB
Get a National Weather Service forecast for a US latitude/longitude.
Args: latitude: Latitude in decimal degrees (e.g. 40.7128 for NYC). longitude: Longitude in decimal degrees (e.g. -74.0060 for NYC).
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | ||
| longitude | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not state return format, caching behavior, error conditions (e.g., non-US coordinates), whether it's a read-only operation, rate limits, or what the output structure looks like. For a tool with zero annotation coverage, this is a notable gap.
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?
Highly concise with zero wasted words. The description is two short lines plus two parameter examples. Every sentence earns its place, and it is appropriately front-loaded with the core purpose first.
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?
The tool has an output schema which reduces the need to explain return values, and only 2 parameters with good examples. However, for a tool with no annotations, the description still omits important behavioral context like error handling for invalid coordinates, whether lat/long are validated to US bounds, and any rate limit or API dependency caveats. Adequate for a simple tool but with real gaps.
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?
Schema description coverage is 0%, but the description does add modest value by giving example values for both parameters (40.7128 for NYC, -74.0060 for NYC), illustrating the decimal degrees format and expected range. However, it doesn't add constraints like valid ranges, coordinate systems (WGS84 assumption), or relationship between the two params beyond what's obvious from the schema.
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 states what the tool does with a specific verb+resource: 'Get a National Weather Service forecast for a US latitude/longitude.' This is clear and specific. However, it does not differentiate from the sibling tool get_alerts, though the tools are clearly distinct enough (forecast vs alerts) that context suggests the distinction is obvious.
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?
The description implies usage context (US lat/long coordinates for NWS forecasts) but provides no explicit guidance on when to use this versus get_alerts, nor any exclusions or prerequisites. The geographic scoping ('US') is useful but the tool name itself carries much of the usage implication.
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
v0.1.0- First observed
get_alerts - First observed
get_forecast
TDQS
The two tools are clearly distinct - one retrieves forecasts by coordinates while the other retrieves alerts by state. There is no overlap in purpose or inputs, so an agent cannot confuse them.
Both tools follow a consistent get_noun pattern (get_forecast, get_alerts), which is clean and predictable. Minor deviation is that one uses a noun naming forecasts while the other names alerts, but the get_ prefix unifies them.
Two tools feels very thin for the NWS weather domain, which normally includes observations, hourly forecasts, marine forecasts, radar, and point metadata. The count is at the low boundary of what's considered reasonable.
The surface is missing obvious operations like current conditions/observations, hourly forecasts, forecast office information, and marine/hydrological products. An agent needing current weather conditions would dead-end entirely with just forecast and alerts.
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
Get US weather forecasts, active alerts, and current observations.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
61US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Provide real-time and forecast weather information for locations in the United States using natura…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides weather alerts and forecasts for US locations using the National Weather Service API.80GPL 3.0
- AlicenseNot gradedqualityDmaintenanceProvides US weather alerts and forecasts via the National Weather Service API.80GPL 3.0
- FlicenseNot gradedqualityDmaintenanceProvides weather forecasts, current conditions, and alerts for US locations using the National Weather Service API.1-
- AlicenseNot gradedqualityDmaintenanceProvides weather alerts and forecasts for US locations using the National Weather Service API.GPL 3.0
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/tumuml28/McpWeatherSample'
If you have feedback or need assistance with the MCP directory API, please join our Discord server