sabariganesan25/MCP-Server-Building
If you are the rightful owner of MCP-Server-Building 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 lightweight server built using Python and FastMCP, designed to provide weather alerts and forecasts through the National Weather Service API.
✨ MCP Weather Server
A lightweight MCP server built with Python and FastMCP, providing
weather alerts and forecasts via the National Weather Service API.
🛠️ 1. Project Setup
✔️ Step 1 — Install uv
powershell -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex"
✔️ Step 2 — Create and Set Up the Project
Copy code
uv init weather
cd weather
uv venv
.\.venv\Scripts\Activate.ps1
uv add "mcp[cli]" httpx
✔️ Step 3 — Add the MCP Server Code Create a file named weather.py (or main.py if you prefer) and paste your MCP weather server implementation.
✔️ Step 4 — Run the Server bash Copy code uv run weather.py If the server stays active without errors, it is running correctly ✅.
💬 2. Configure Claude for Desktop Open the Claude config file:
text Copy code %APPDATA%\Claude\claude_desktop_config.json Add (or merge) the following configuration:
json Copy code { "mcpServers": { "weather": { "command": "uv", "args": [ "--directory", "D:/Build-mcp/weather", "run", "weather.py" ] } } } 🔁 After saving, restart Claude Desktop so it picks up the new MCP server.
🔍 3. Testing the Server When everything is wired correctly, Claude should show these tools:
get_alerts
get_forecast
Example Queries You can ask Claude things like:
What are the active weather alerts in Texas?
Give the forecast for 38.5816, -121.4944
If Claude responds using the tools (you’ll see tool calls in the UI), your MCP server is working as expected 🎉.
📸 4. Screenshots
📌 5. Status ✅ MCP Weather Server Created
✅ Connected to Claude Desktop
✅ Tools Tested (get_alerts, get_forecast)
✅ Screenshots Added
📂 Tech Stack 🐍 Python
⚙️ FastMCP / MCP CLI
⛅ National Weather Service API
💻 Claude Desktop (MCP client)