MCP.so
ログイン
W

Weather MCP Server

@X-shuffle

基本情報

カテゴリ

メディアとデザイン

トランスポート

stdio

作者

X-shuffle

投稿者

覆颠

Weather MCP Server について

个基于Go语言开发的天气查询MCP(Model Context Protocol)服务器,提供实时和未来天气信息查询功能。

Weather MCP Server の設定

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

{
  "mcpServers": {
    "weather-mcp-server": {
      "command": "go",
      "args": [
        "run",
        "cmd/server/main.go"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "your_openweather_api_key_here"
      },
      "cwd": "/path/to/weather-mcp-server"
    }
  }
}

Weather MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

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

概要

What is Weather?

Weather is a Go-based MCP (Model Context Protocol) server that provides real-time weather information. It integrates with the OpenWeatherMap API and is intended for developers who want to add weather queries to their MCP-enabled applications.

How to use Weather?

To use Weather, obtain an OpenWeatherMap API key, set it as the environment variable OPENWEATHER_API_KEY, and then configure your MCP client (e.g., Claude Desktop, Cursor) by editing its mcp_settings.json file with the command and environment settings shown in the README. The server exposes a single tool get_weather that accepts a location (city name or coordinates) and an optional hours parameter for forecasts.

Key features of Weather

  • Real-time weather queries by city name or coordinates
  • Supports Chinese and English city names and district names
  • Optional hourly forecast (1–12 hours, 3-hour intervals)
  • Easy integration via standard MCP protocol
  • Built with Go, following domain-driven design principles

Use cases of Weather

  • A chatbot that answers “What is the weather in Beijing?”
  • A developer tool that provides weather context for automation
  • A multi-language assistant supporting Chinese location queries
  • An application needing current conditions and short-term forecasts

よくある質問

1

What API key is required?

Weather requires an OpenWeatherMap API key, set via the `OPENWEATHER_API_KEY` environment variable. You can obtain a free key from openweathermap.org.

2

How do I configure this server in my MCP client?

Edit your client’s MCP settings file (e.g., `claude_desktop_config.json` for Claude Desktop) to add the server’s command, working directory, and environment variable with your API key. The README provides examples for development (go run) and production (binary) modes.

3

What location formats are supported?

You can use Chinese city names (e.g., 北京), English names (Beijing), Chinese district names (北京海淀), or coordinates in the format `latitude,longitude` (e.g., 39.9042,116.4074).

4

What does the hours parameter do?

If omitted or set to 0, it returns current real-time weather. If set to a value between 1 and 12, it returns future hourly forecasts for that many hours, but note that OpenWeatherMap forecast data is provided in 3‑hour intervals.

5

Where does the weather data come from?

All weather data is fetched from the OpenWeatherMap API. The server does not store any weather data; it is queried in real time.

コメント

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