MCP.so
ログイン

🌩️ MCP Weather Alerts Tool using FastMCP + Claude Desktop

@nahilahmed

🌩️ MCP Weather Alerts Tool using FastMCP + Claude Desktop について

A Python MCP (Model Context Protocol) server that fetches real-time weather alerts by U.S. state using api.weather.gov, built with FastMCP and integrated into Claude Desktop.

基本情報

カテゴリ

メディアとデザイン

ランタイム

python

トランスポート

stdio

公開者

nahilahmed

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-weather-alert-tool": {
      "command": "uv",
      "args": [
        "init",
        "mcpcrashcourse",
        "#",
        "start",
        "new",
        "project"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Weather Alerts Tool using FastMCP + Claude Desktop?

This project implements a custom MCP (Model Context Protocol) server using the FastMCP Python SDK, integrating with Claude Desktop to enable an AI assistant to retrieve real-time weather alerts for any U.S. state via the api.weather.gov API.

How to use MCP Weather Alerts Tool using FastMCP + Claude Desktop?

Install dependencies using uv add "mcp[cli]" httpx and place the weather.py tool in a server/ folder. Launch interactively with uv run mcp dev server/weather.py and test via MCP Inspector at http://localhost:6757. For Claude Desktop, add a weather entry to claude_desktop_config.json pointing to uv run mcp run <path>/server/weather.py, restart the app, and ask for alerts by state (e.g., “What are the weather alerts for Texas?”).

Key features of MCP Weather Alerts Tool using FastMCP + Claude Desktop

  • Implements a custom MCP server with FastMCP Python SDK
  • Uses httpx to call real-time weather alerts from api.weather.gov
  • Returns structured information: event, severity, description, and instructions
  • Integrates directly with Claude Desktop as an MCP tool
  • Testable interactively via MCP Inspector

Use cases of MCP Weather Alerts Tool using FastMCP + Claude Desktop

  • Ask Claude Desktop to retrieve active weather alerts for any U.S. state
  • Integrate live alert data into AI-powered workflows or assistants
  • Prototype and debug MCP tools using the built-in MCP Inspector UI

FAQ from MCP Weather Alerts Tool using FastMCP + Claude Desktop

What runtime and dependencies are required?

Python 3.x with uv package manager, plus mcp[cli] and httpx. The project uses uv.lock for dependency locking.

How can I test the tool without Claude Desktop?

Run uv run mcp dev server/weather.py to launch the MCP Inspector at http://localhost:6757, where you can call get_alerts with a state code.

Where does the weather alert data come from?

All data is fetched live from the official api.weather.gov endpoint /alerts/active, which is free and does not require an API key.

How do I integrate this tool with Claude Desktop?

Add a server entry to claude_desktop_config.json with the uv run mcp run command pointing to your weather.py file. Restart Claude Desktop, then ask a weather-related question.

What are the core MCP primitives used?

The server implements a Tool (get_alerts), which is analogous to a POST endpoint. MCP also defines Resources (static data) and Prompts (reusable LLM templates), but this project focuses on a single tool.

コメント

「メディアとデザイン」の他のコンテンツ