FastMCP weather alerts server

FastMCP weather alerts server

mcp-weather-alert-tool•bynahilahmed

A custom MCP server built with FastMCP that exposes a get_alerts tool to retrieve active U.S. weather alerts via api.weather.gov.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Exposes a get_alerts tool that fetches active weather alerts for a given U.S. state from api.weather.gov.
  • •Returns structured alert details including event, severity, description and instructions.
  • •Uses httpx for asynchronous HTTP requests to the weather API.

BEST FOR

  • •Asking an AI assistant about current weather alerts for a particular U.S. state.
  • •Testing and debugging the weather alerts tool interactively with MCP Inspector.

ABOUT MCP-WEATHER-ALERT-TOOL

FastMCP weather alerts server is cataloged as an MCP server attributed to nahilahmed. A custom MCP server built with FastMCP that exposes a get_alerts tool to retrieve active U.S. weather alerts via api.weather.gov. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for FastMCP weather alerts server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What weather alert fields does the tool return?

It returns each alert's event, severity, description and instruction.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 2c3b1b4e655e · 采集于 2026-11-13 13:19:54 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

🌩️ MCP Weather Alerts Tool using FastMCP + Claude Desktop

This project demonstrates how to build an MCP (Model Context Protocol) tool using the official FastMCP Python SDK. It integrates with Claude Desktop to enable an AI assistant to retrieve weather alerts by U.S. state via the api.weather.gov API.


🚀 What This Project Does

  • ✅ Implements a custom MCP server with FastMCP
  • 🌐 Uses httpx to call real-time weather alerts from api.weather.gov
  • 📦 Returns structured information: event, severity, description, and instructions
  • 🧠 Integrates with Claude Desktop
  • 🌈 Can be tested interactively via MCP Inspector

🧱 Tech Stack

Tool/LibraryPurpose
mcp[cli]MCP server toolkit with CLI tools
httpxAsync HTTP client
uvModern Python package/dependency manager
Claude DesktopAI interface for LLM + MCP
MCP InspectorUI to debug MCP endpoints

📁 Project Structure

mcpcrashcourse/
├── server/
│   └── weather.py         # MCP server logic (get_alerts)
├── pyproject.toml         # Project metadata + dependencies
├── uv.lock                # Locked versions (auto-generated by uv)
└── README.md              # You're reading it!

🧠 Tool Logic: get_alerts

@mcp.tool()
async def get_alerts(state: str) -> list[dict]:
    # Fetch weather alerts for a given U.S. state (e.g., 'CA')
    url = "https://api.weather.gov/alerts/active"
    params = {"area": state.upper()}
    async with httpx.AsyncClient() as client:
        response = await client.get(url, params=params)
        data = response.json()

    return [
        {
            "event": alert.get("event"),
            "severity": alert.get("severity"),
            "description": alert.get("description"),
            "instruction": alert.get("instruction"),
        }
        for alert in data.get("features", [])
        if alert.get("properties")
    ]

🛠️ Installation & Setup

1. Create & Configure Project

pipx install uv               # install uv if you haven't
uv init mcpcrashcourse        # start new project
cd mcpcrashcourse
uv add "mcp[cli]" httpx       # add dependencies

2. Add Your Tool

Place your weather.py in the server/ folder, containing the logic for get_alerts.


🧪 Run & Inspect

Launch with MCP Inspector

uv run mcp dev server/weather.py

Then open http://localhost:6757 to:

  • View your get_alerts tool
  • Try calling it with input like "TX"

🤖 Claude Desktop Integration

  1. Update your claude_desktop_config.json:
{
  "mcpServers": {
    "weather": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "<your-project-directory>/server/weather.py"
      ]
    }
  }
}
  1. Restart Claude Desktop
  2. Prompt:

    "What are the weather alerts for Texas?"

Claude will call your MCP tool and display structured output.


💡 What is MCP?

The Model Context Protocol standardizes how apps send context (data, tools, prompts) to LLMs. It separates the "context provider" from the LLM layer.

Three core primitives:

TypeUse CaseAnalogy
ToolsExecute functionsPOST endpoint
ResourcesProvide static dataGET endpoint
PromptsReusable interactionsLLM templates

📎 Credits


📄 License

This project is open-sourced under the MIT License.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for FastMCP weather alerts server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-weather-alert-tool)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research