Open-Meteo 天气 MCP 服务

yangxiaoxingCool/open-meteo-mcp-weather-server
0 Stars 33 次浏览 更新于 2026-08-23

一个用于通过城市查询当前天气的MCP服务器。它使用Open-Meteo地理编码和预报API,并提供了一个MCP工具:`get_weather`。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "open-meteo-mcp-weather-server": {
      "args": [
        "-y",
        "open-meteo-mcp-weather-server"
      ],
      "command": "npx"
    }
  }
}

服务介绍

my-weather-server-0706

MCP server for querying current weather by city. It uses Open-Meteo geocoding and forecast APIs, and exposes one MCP tool: get_weather.

Tools

get_weather

Get current weather for a city.

Input:

{
  "city": "上海"
}

Output:

通过 my-weather-server-0706 返回:上海 当前天气是:阴天
定位:上海,上海市,中国
温度:...
体感温度:...
湿度:...
降水:...
云量:...
风速:...
风向:...
更新时间:...

Install

From GitHub:

npx -y github:yangvue/my-weather-server-0706

From npm, once published:

npx -y open-meteo-mcp-weather-server

From this repository:

npm install
npm start

MCP Configuration

Use this config to run from GitHub:

{
  "mcpServers": {
    "my-weather-server-0706": {
      "command": "npx",
      "args": ["-y", "github:yangvue/my-weather-server-0706"]
    }
  }
}

Use this config after the package is published to npm:

{
  "mcpServers": {
    "my-weather-server-0706": {
      "command": "npx",
      "args": ["-y", "open-meteo-mcp-weather-server"]
    }
  }
}

Use this config when running from a local checkout:

{
  "mcpServers": {
    "my-weather-server-0706": {
      "command": "node",
      "args": ["/absolute/path/to/my-mcp-server/index.js"]
    }
  }
}

Data Source

  • Geocoding: Open-Meteo Geocoding API
  • Weather: Open-Meteo Forecast API

No API key is required.

License

MIT

相关 MCP 服务