MCP Weather Server
Provides weather alerts and forecasts for US locations using the National Weather Service API.
README
MCP Weather Server
A Model Context Protocol (MCP) server that provides weather-related functionality for any MCP client. This server integrates with the National Weather Service (NWS) API to deliver real-time weather alerts and forecasts for US locations.

Features
š¤ļø Weather Alerts
- Get active weather alerts for any US state using two-letter state codes
- Displays event type, affected area, severity, status, and headlines
- Real-time data from the National Weather Service
š Weather Forecasts
- Get detailed weather forecasts for any US location using coordinates
- Includes temperature, wind conditions, and short forecast descriptions
- Supports multiple forecast periods (daily/hourly)
Prerequisites
- Node.js (version 14 or higher)
- pnpm (Package Manager) - automatically managed via Corepack
- Any MCP client (Claude Desktop, Ollama, etc.)
Installation
- Install dependencies:
pnpm install
- Build the project:
pnpm run build
Configuration
To integrate this server with an MCP client, you need to configure your client's MCP server settings. Here are examples for popular clients:
Claude Desktop
- Open your Claude Desktop configuration file:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- Add the following configuration to your MCP servers section:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/ABSOLUTE_PATH/mcp-server-weather/build/index.js"]
}
}
}
Other MCP Clients
For other MCP clients, add a server configuration with:
- Command:
node - Args:
["/ABSOLUTE_PATH/mcp-server-weather/build/index.js"]
Replace /ABSOLUTE_PATH with the actual absolute path to your project directory.
Usage
Once configured, you can use the weather server through any MCP client with these commands:
Get Weather Alerts
Get weather alerts for California
- Returns active weather alerts for the specified state
- Uses two-letter state codes (CA, NY, TX, etc.)
Get Weather Forecast
Get the weather forecast for coordinates 40.7128, -74.0060
- Returns detailed forecast for the specified coordinates
- Only works for US locations (NWS API limitation)
- Includes temperature, wind, and forecast descriptions
Development
The project is written in TypeScript and uses the following key dependencies:
@modelcontextprotocol/sdk: For MCP server implementationzod: For runtime type validation and schema definitiontypescript: For type safety and development
Project Structure
āāā src/
ā āāā index.ts # Main server entry point with all weather tools
āāā build/ # Compiled JavaScript output
āāā package.json # Project dependencies and scripts
āāā pnpm-lock.yaml # pnpm lock file for dependency management
Available Scripts
pnpm install- Install dependenciespnpm run build- Compile TypeScript to JavaScriptpnpm run clean- Remove build directory
API Integration
This server integrates with the National Weather Service (NWS) API:
- Base URL:
https://api.weather.gov - Data Format: GeoJSON
- Coverage: United States only
- Rate Limits: Standard NWS API limits apply
Supported Endpoints
/alerts?area={STATE}- Get weather alerts by state/points/{lat},{lon}- Get grid point data for coordinates/gridpoints/{office}/{gridX},{gridY}/forecast- Get forecast data
Monitoring and Debugging
Logs
MCP clients typically write logs to their respective directories:
Claude Desktop:
~/Library/Logs/Claude/mcp*.log
Other clients:
- Refer to your specific client's documentation for log locations
To monitor logs in real-time (Claude Desktop example):
# View recent logs and follow new entries
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
Error Handling
The server includes comprehensive error handling for:
- Network request failures
- Invalid coordinates or state codes
- NWS API service unavailability
- Data parsing errors
Limitations
- Geographic Coverage: Only supports US locations (NWS API limitation)
- Coordinate Precision: Uses 4 decimal places for coordinate precision
- Data Source: Relies on National Weather Service API availability
Resources
License
ISC License - See LICENSE file for details
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.