
weather mcp server
A Model Context Protocol (MCP) server that provides weather information and alerts using the National Weather Service (NWS) API
Repository Info
About This Server
A Model Context Protocol (MCP) server that provides weather information and alerts using the National Weather Service (NWS) API
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Weather MCP Server
A Model Context Protocol (MCP) server that provides weather information and alerts using the National Weather Service (NWS) API.
Features
- Get weather alerts for any US state
- Get detailed weather forecasts for any location using latitude and longitude
- Easy-to-use MCP interface
- Docker support for easy deployment
Prerequisites
- Python 3.13 or higher
- Docker and Docker Compose (for containerized deployment)
Installation
Local Development
- Clone the repository
- Install dependencies using
uv:pip install uv uv venv uv pip install . uv run src/main.py
Docker Deployment
Simply use Docker Compose to build and run the server:
docker compose up -d
The server endpoint will be available at http://localhost:8001/sse.
Available Tools
get_alerts(state: str)
Get active weather alerts for a US state.
Parameters:
state: Two-letter US state code (e.g., "CA" for California, "NY" for New York)
get_forecast(latitude: float, longitude: float)
Get detailed weather forecast for a specific location.
Parameters:
latitude: Latitude of the locationlongitude: Longitude of the location
Development
The project uses Docker volumes for development, allowing code changes to be reflected without rebuilding the container. The source code is mounted at /app/src in the container.
Technical Details
- Built with Python's MCP framework
- Uses httpx for async HTTP requests
- Implements proper error handling and request timeouts
- Uses uv for dependency management
- Containerized with Docker for easy deployment
Environment Variables
PYTHONUNBUFFERED=1: Ensures Python output is sent directly to the terminal without buffering
Port
The server runs on port 8000 inside the container and is mapped to port 8001 on the host machine.
Quick Start
Clone the repository
git clone https://github.com/sirrupesh/weather-mcp-serverInstall dependencies
cd weather-mcp-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.