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.

评论

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