tomatitito/weather
3.2
If you are the rightful owner of weather and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A simple MCP server that provides weather information tools for Large Language Models.
Tools
2
Resources
0
Prompts
0
MCP Weather Server
A simple MCP (Model Context Protocol) server that provides weather information tools for Large Language Models.
Overview
This server implements the MCP protocol to provide weather data from the National Weather Service API. It exposes two tools:
get_alerts
: Get weather alerts for a US stateget_forecast
: Get weather forecast for a location based on latitude and longitude
Installation
- Set up a Python virtual environment:
cd weather
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install "mcp[cli]" httpx
Usage
Run the server with:
python weather.py
Integrating with Claude for Desktop
To use this server with Claude for Desktop:
-
Make sure Claude for Desktop is installed
-
Edit Claude's configuration file:
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%AppData%\Claude\claude_desktop_config.json
- macOS/Linux:
-
Add this server to the configuration:
{
"mcpServers": {
"weather": {
"command": "python",
"args": [
"/ABSOLUTE/PATH/TO/weather/weather.py"
]
}
}
}
- Restart Claude for Desktop
Example Queries
Once integrated, you can ask Claude questions like:
- "What's the weather in San Francisco?"
- "Are there any weather alerts in California?"