Labsco
shubhechhadey logo

Weather Alerts

β˜… 1

from shubhechhadey

Provides real-time weather alerts for US states using the National Weather Service API.

πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

MCP Server Beginner example

Project Overview

It is a Python application that provides real-time weather alerts for US states using the National Weather Service (NWS) API. It leverages the mcp framework (with FastMCP) and is designed for modern async Python workflows. The project is fully managed with uv for dependency management and task running.


Features

  • Weather Alerts Tool: Fetches and formats active weather alerts for any US state.
  • Echo Resource: Simple echo endpoint for testing.
  • Async & Modern: Uses Python 3.12+ and async/await patterns.
  • MCP Inspector: Visual tool to inspect and test your MCP tools and resources.

Project Structure

Copy & paste β€” that's it
.
β”œβ”€β”€ main.py                # Simple entry point (prints a message)
β”œβ”€β”€ pyproject.toml         # Project metadata and dependencies
β”œβ”€β”€ uv.lock                # Locked dependencies for reproducible installs
β”œβ”€β”€ server/
β”‚   └── weather.py         # Main server logic and weather tool/resource
β”œβ”€β”€ .venv/                 # (optional) Virtual environment
β”œβ”€β”€ .python-version        # Python version pin (3.12)
β”œβ”€β”€ .gitignore             # Standard Python ignores
└── README.md              # Project documentation

Notes

  • All commands use uv