SelahattinNazli/MCP_Server_Project
If you are the rightful owner of MCP_Server_Project and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The MCP Weather Server is a Model Context Protocol server that provides real-time weather forecasts and alerts using data from the US National Weather Service API.
MCP Weather Server
A Model Context Protocol (MCP) server that provides real-time weather forecasts and alerts from the US National Weather Service API.
Features
Available Tools:
get_alerts(state)- Get active weather alerts for any US stateget_forecast(latitude, longitude)- Get detailed 5-day weather forecast for specific coordinates
Installation
Prerequisites
Install UV package manager:
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Setup
- Clone the repository:
git clone https://github.com/yourusername/mcp-weather-server
cd mcp-weather-server
- Install dependencies:
uv sync
Or manually:
uv add mcp httpx
Usage
Running Locally
Test the server:
uv run weather.py
The server will run in stdio mode and wait for MCP client connections.
Connecting to Claude Desktop
-
Open Claude Desktop config file:
macOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
code $env:AppData\Claude\claude_desktop_config.json
- Add the weather server:
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/mcp-weather-server",
"run",
"weather.py"
]
}
}
}
Important: Replace /ABSOLUTE/PATH/TO/mcp-weather-server with your actual path.
-
Restart Claude Desktop
You should now see the weather tools (🔌 icon) in Claude Desktop.
Connecting to Cursor IDE
- Open Cursor Settings → MCP
- Add the following configuration:
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/mcp-weather-server",
"run",
"weather.py"
]
}
}
}
- Restart Cursor
Example Queries
Try asking Claude or Cursor:
- "What are the weather alerts in California?"
- "Get me the forecast for New York City (latitude 40.7128, longitude -74.0060)"
- "Are there any severe weather warnings in Texas?"
Requirements
- Python 3.12+
- httpx
- mcp
License
MIT
Contributing
Pull requests are welcome! For major changes, please open an issue first.