MCP.so
ログイン

MCP Weather Server

@SarveshChandak

MCP Weather Server について

概要はまだありません

基本情報

カテゴリ

メディアとデザイン

ランタイム

python

トランスポート

stdio

公開者

SarveshChandak

設定

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

{
  "mcpServers": {
    "MCP-Server-Weather-Alerts": {
      "command": "python",
      "args": [
        "weather.py"
      ]
    }
  }
}

ツール

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

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

概要

What is MCP Weather Server?

MCP Weather Server is a weather server built on the Model Context Protocol (MCP) framework. It provides tools to retrieve weather alerts and forecasts for specific locations in the United States using the National Weather Service (NWS) API. It is intended for developers integrating real-time weather data into LLM-powered applications.

How to use MCP Weather Server?

After cloning the repository and installing dependencies with pip install -r requirements.txt, start the server by running python weather.py or, if server and client are on the same machine, uv run weather.py. The server exposes two tools—get_alerts (requires a two-letter US state code) and get_forecast (requires latitude and longitude)—that can be automatically invoked by an LLM through an MCP client.

Key features of MCP Weather Server

  • Fetches active weather alerts for a given US state.
  • Retrieves detailed weather forecasts for a specific latitude/longitude.
  • Built on the MCP framework for seamless LLM integration.
  • Uses the National Weather Service (NWS) public API data.

Use cases of MCP Weather Server

  • Enable an LLM assistant to answer “Are there any weather alerts in California?”
  • Provide a detailed weather forecast for a user-specified location.
  • Power a conversational weather bot for the United States with minimal setup.

FAQ from MCP Weather Server

What API does the server use?

It uses the National Weather Service (NWS) API for both alerts and forecasts.

How do I run the server locally?

Run python weather.py from the weather directory. If the client is on the same machine, you can also use uv run weather.py with the stdio transport.

What arguments does the get_forecast tool require?

It requires latitude and longitude (both numeric, e.g., 34.0522 and -118.2437 for Los Angeles).

Are there any geographic restrictions?

Data is only available for locations within the United States because the server relies on the National Weather Service API.

コメント

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