NWS Weather MCP Sample
Click on "Deploy 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 Sample What'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).
Inputs: state (required). Returns: result
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).
Inputs: latitude (required), longitude (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
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
Related MCP Connectors
Get US weather forecasts, active and recent alerts, and current observations.
Official NWS forecasts and alerts, as one MCP tool through Apify
US NWS weather alerts and 5-day forecasts for AI agents. $0.01 per call.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Related MCP Servers
- AlicenseBqualityCmaintenanceProvides weather alerts and forecasts for US locations using the National Weather Service API.2ISC
- AlicenseNot gradedqualityDmaintenanceProvides US weather alerts and forecasts via the National Weather Service API.ISC
- 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