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 💡
@larryhudson/mcp-server-example-image-block
An example MCP server that returns a random image from the Lorem Picsum API
mcp-server-webcrawl
MCP server tailored to connecting web crawler data and archives
@descope-sample-apps/descope-mcp-server
Provides an interface to interact with Descope's Management APIs, enabling search and retrieval of project-related information.
simple-mcp-fileserver
A lightweight MCP server enabling AI agents to interact with local file systems through JSON-RPC interface
@ertiqah/linkedin-mcp-runner
This MCP server enables GPT-based assistants like Claude and ChatGPT to access a user's public LinkedIn data, allowing them to analyze past posts, understand writing tone, and assist with content creation, rewriting, and brainstorming.
@currents/mcp
A MCP server that allows you to provide test results context to your AI agents by connecting them to Currents, useful for asking AI to fix or optimize tests failing in CI.