Weather Alerts MCP Server
Provides real-time weather alerts for US states using the National Weather Service API, enabling users to fetch and view active weather warnings through natural language queries.
README
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
.
├── 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
Prerequisites
- Python 3.12+
- uv (install with
pip install uvif not already installed)
Setup & Installation
-
Clone the repository:
git clone <your-repo-url> cd mcpproject -
Install dependencies using uv:
uv pip install -r uv.lockOr, if you want to install from
pyproject.toml:uv pip install
Running the Project
1. Run the Main Script
To run the basic entry point:
uv run python main.py
2. Develop & Test the Weather Tool
To start the MCP development server for the weather tool:
uv run mcp dev server/weather.py
This will also open MCP Inspector in your browser—a visual tool to explore and test your MCP tools and resources interactively.
3. Install the Weather Tool
To install the weather tool for use as an MCP tool:
uv run mcp install server/weather.py
Usage Example
With the dev server running, you can use the MCP Inspector or an MCP-compatible client to call the get_alerts tool:
- Tool name:
get_alerts - Argument: Two-letter US state code (e.g.,
CA,NY)
Example (from CLI):
mcp call get_alerts --state=CA
Using with Claude Desktop
You can also use the weather alerts tool in Claude Desktop, as shown below:

Weather alerts for California displayed in Claude Desktop using the get_alerts tool.
Claude Desktop Configuration
To call this MCP server from Claude Desktop, you need to update your claude_desktop_config.json file to include the server
For example:
{
{
"mcpServers": {
"weather": {
"command": "C:\\Users\\shubhechhadey\\.local\\bin\\uv.EXE",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\shubhechhadey\\projects\\mcpproject\\server\\weather.py"
]
}
}
}
}
Attached is the screenshot: 
Notes
- All commands use
uv
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.