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.

评论

媒体与设计 分类下的更多 MCP 服务器