Weather MCP Server

by isdaniel
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides weather information through the Open-Meteo API, allowing users to get current weather conditions for specified cities.

天气 MCP 服务器

使用 Open-Meteo API 提供天气信息的模型上下文协议 (MCP) 服务器。

特征

  • 获取指定城市的当前天气信息。

安装

该服务器设计为通过将其配置添加到cline_mcp_settings.json文件来手动安装。

  1. 将以下条目添加到cline_mcp_settings.json文件中的mcpServers对象:
{ "mcpServers": { "weather": { "command": "python", "args": [ "mcp_weather_server.py" ], "disabled": false, "autoApprove": [] } } }
  1. 保存cline_mcp_settings.json文件。

配置

此服务器不需要 API 密钥。它使用免费且开源的 Open-Meteo API。

用法

该服务器提供一个工具: get_weather

get_weather

检索给定城市的当前天气信息。

参数:

  • city (字符串,必需):城市名称。

例子:

要获取台北的天气,您可以使用如下工具:

<use_mcp_tool> <server_name>weather</server_name> <tool_name>get_weather</tool_name> <arguments> { "city": "Taipei" } </arguments> </use_mcp_tool>

Pip 安装和使用

可以使用 pip 安装此包:

pip install mcp_weather_server

安装后,您可以使用mcp_weather_server命令行工具:

mcp_weather_server --city "Your City"

"Your City"替换为您要获取天气信息的城市。

-
security - not tested
A
license - permissive license
-
quality - not tested

模型上下文协议服务器使用 Open-Meteo API 检索指定城市的当前天气信息,无需 API 密钥。

  1. Features
    1. Installation
      1. Configuration
        1. Usage
          1. get_weather
        2. Pip Installation and Usage
          ID: d2mbytzdsh