KTsaneff/WeatherMcpServer
If you are the rightful owner of WeatherMcpServer 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 Weather MCP Server is a lightweight .NET 8 application designed to integrate with Claude Desktop, providing real-time weather data from the NOAA Weather API.
🌦️ Weather MCP Server
A lightweight Model Context Protocol (MCP) server built with .NET 8 for use with Claude Desktop.
This server exposes tools that allow Claude to query real-time weather data from the official NOAA Weather API.
🧠 Overview
The Weather MCP Server demonstrates how to integrate a local .NET MCP service with Claude Desktop.
Once connected, Claude can use the get_forecast and get_alerts tools to retrieve live weather conditions and alerts directly through your custom MCP interface.
🚀 Features
- ✅ Full MCP compatibility for Claude Desktop
- 🌎 Real-time data from the U.S. National Weather Service (NOAA)
- 🧰 Two available tools:
get_forecast— returns a weather forecast for specific latitude and longitudeget_alerts— returns active weather alerts for a U.S. state
- 🧩 Built using the minimal .NET 8 hosting model
- ⚙️ Easy integration with Claude’s MCP configuration
🏗️ Project Structure
WeatherMcpServer/ │ ├── Models/ # (Optional models for data) ├── Tools/ │ └── WeatherTools.cs # Contains get_forecast and get_alerts methods ├── Program.cs # Application entry point └── WeatherMcpServer.csproj
🧩 MCP Tools
🔹 get_forecast
Retrieves the current and upcoming weather forecast for a given location.
Example request:
{
"latitude": 38.5816,
"longitude": -121.4944
}
**Example response:**
Tonight
Temperature: 58°F
Wind: 5 mph NW
Forecast: Clear skies expected overnight.
### 🔹 `get_alerts`
Fetches all active weather alerts for a specific U.S. state.
**Example request:**
{
"state": "CA"
}
**Example response:**
Event: Heat Advisory
Area: Los Angeles County
Severity: Moderate
Description: Temperatures up to 102°F expected.
Instructions: Stay hydrated and avoid outdoor activities.
🧰 Setup Instructions
✅ Requirements
.NET 8 SDK
Claude Desktop (latest version)
▶️ Run the Server
Open PowerShell or a terminal and run:
dotnet run --project "D:\REPOS\Weather-MCP\WeatherMcpServer\WeatherMcpServer.csproj" --no-build
If successful, you’ll see:
Weather MCP Server is running (waiting for MCP requests...)...
⚙️ Configure Claude Desktop
Open the Claude Desktop configuration file:
C:\Users\<YourName>\AppData\Roaming\Claude\claude_desktop_config.json
Add the following MCP server entry:
{
"mcpServers": {
"weather": {
"command": "dotnet",
"args": [
"run",
"--project",
"D:\\REPOS\\Weather-MCP\\WeatherMcpServer\\WeatherMcpServer.csproj",
"--no-build"
]
}
}
}
Save the file and restart Claude Desktop.
Click the slider icon ⚙️ in Claude’s chat bar. You should see:
get_forecast
get_alerts
🧠 How It Works
The project runs as a local MCP-compliant .NET app.
Communication with Claude happens through STDIO.
Tools are defined using [McpServerTool] attributes.
Each method sends and receives structured JSON messages to/from Claude.
📦 Example of Integration Flow
Claude sends:
{
"tool": "weather:get_forecast",
"arguments": { "latitude": 38.5816, "longitude": -121.4944 }
}
The server queries the NOAA API
and returns a human-readable forecast response.
🧾 License
This project is licensed under the MIT License.
You are free to use, modify, and distribute it for educational or commercial purposes.
💬 Author
Krassy Tsaneff
🎓 Built as an experimental project for learning the Model Context Protocol (MCP)
🌐 GitHub Profile
📍 Sofia, Bulgaria
🏷️ Technologies Used
.NET 8
C#
Model Context Protocol (MCP)
Claude Desktop
NOAA Weather API
⭐ If you found this useful, consider starring the repo!