MCP Claude Weather
A CLI tool and MCP server for real-time weather alerts, forecasts, and warnings from the US National Weather Service, powered by MCP Claude. Instantly check local weather, severe alerts, and detailed forecasts from your terminal or connect as a tool to Claude for Desktop.
Features
- Get active weather alerts for any US state
- Retrieve detailed weather forecasts for any US location (latitude/longitude)
- Designed for integration with Claude for Desktop via the Model Context Protocol (MCP)
- Fast, reliable, and easy to use
Prerequisites
- Node.js v18+ and npm or pnpm
- Claude for Desktop (for integration)
- macOS, Linux, or Windows
Installation
Clone the repository and install dependencies:
git clone https://github.com/AlexShan2008/mcp-claude-weather.git
cd mcp-claude-weather
pnpm install
Build the project:
pnpm run build
Usage
As a Standalone CLI
You can run the MCP Claude Weather server directly from the command line:
node build/index.js
This will start the server and listen for MCP tool calls via standard input/output.
Integrating with Claude for Desktop
To use this server as a tool in Claude for Desktop:
-
Build the project (if you haven't already):
pnpm run build -
Configure Claude for Desktop:
Open (or create) the configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.jsonAdd the following entry (replace
/ABSOLUTE/PATH/TO/mcp-claude-weatherwith your actual path):{ "mcpServers": { "weather": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/mcp-claude-weather/build/index.js"] } } } -
Restart Claude for Desktop. The weather tools will now be available via the MCP integration.
For more details, see the official MCP Quickstart guide.
Available Tools
1. get-alerts
Get active weather alerts for a US state.
Parameters:
state(string): Two-letter US state code (e.g.,CA,NY)
Example:
{
"tool": "get-alerts",
"params": { "state": "CA" }
}
2. get-forecast
Get a weather forecast for a specific location.
Parameters:
latitude(number): Latitude of the locationlongitude(number): Longitude of the location
Example:
{
"tool": "get-forecast",
"params": { "latitude": 38.58, "longitude": -121.49 }
}
How It Works
- The server uses the National Weather Service API to fetch real-time weather data.
- All requests are made with a custom user agent for compliance.
- Results are formatted for easy reading and integration with Claude for Desktop.
Troubleshooting
- Ensure you are using valid US state codes and coordinates.
- Only US locations are supported by the NWS API.
- For integration issues with Claude for Desktop, check the logs at
~/Library/Logs/Claude/.
Contributing
Pull requests and issues are welcome! Please see the Model Context Protocol documentation for more on building MCP tools.
References:
Recommend MCP Servers 💡
shinichi-takayanagi/myweight-mcp-server
Connects to Health Planet API to provide weight data for MCP clients via SSE.
shrimp-task-manager
An MCP server for intelligent task management for AI-powered development, enabling agents to break down complex projects, maintain context, and accelerate workflows.
vet
Protect against malicious open source packages 🤖
@pab1it0/prometheus-mcp-server
A Model Context Protocol (MCP) server that enables AI agents and LLMs to query and analyze Prometheus metrics through standardized interfaces.
optimade-mcp-server
An MCP tool for querying Optimade-compatible material databases with configurable filter presets and provider endpoints.
dbt-docs-mcp
MCP (model context protocol) server for interacting with dbt Docs