Skip to main content
Glama

MCP Weather Server

by le-yo

MCP 天气服务器

一个简单的模型上下文协议 (MCP) 服务器,可提供任何位置的天气信息。

什么是 MCP?

模型上下文协议 (MCP) 是 AI 应用程序和代理与数据源和工具连接的标准化方式。它允许像 Claude 这样的 AI 模型通过标准化接口与您的本地系统、外部服务和自定义工具进行交互。

特征

  • 获取任何地点的当前天气信息
  • 与 Claude Desktop 和其他 MCP 客户端兼容
  • 使用免费的 wttr.in 天气 API(无需 API 密钥)

安装

# Clone the repository git clone <your-repo-url> cd mcp-weather-server # Install dependencies npm install

用法

运行服务器

node index.js

连接到 Claude Desktop

  1. 打开 Claude 桌面
  2. 前往“设置”>“MCP 服务器”
  3. 添加新服务器
  4. 选择“自定义”并输入服务器可执行文件的路径
  5. 将命令设置为: node /Users/le-yo/CascadeProjects/mcp-weather-server/index.js
  6. 保存并重新启动 Claude Desktop

克劳德的示例提示

连接后,您可以要求 Claude 使用天气工具:

  • “纽约现在的天气怎么样?”
  • “告诉我现在伦敦的气温。”
  • “东京下雨了吗?”

工作原理

该服务器实现了模型上下文协议 (MCP),提供了一个从 wttr.in API 获取天气数据的工具。当 Claude 或其他 MCP 客户端连接到该服务器时,他们可以使用get_weather工具检索任意位置的当前天气状况。

扩展服务器

您可以通过以下方式扩展此服务器:

  1. 添加更多与天气相关的工具(预报、历史数据等)
  2. 实现其他 MCP 功能,例如资源或提示
  3. 使用具有更多功能的不同天气 API

执照

麻省理工学院

-
security - not tested
-
license - not tested
-
quality - not tested

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.

一个实现模型上下文协议的简单服务器,允许像 Claude 这样的 AI 模型使用 wttr.in API 获取任何位置的实时天气信息。

  1. 什么是 MCP?
    1. 特征
      1. 安装
        1. 用法
          1. 运行服务器
          2. 连接到 Claude Desktop
          3. 克劳德的示例提示
        2. 工作原理
          1. 扩展服务器
            1. 执照

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.
                Last updated -
                4
                Python
                Apache 2.0
                • Linux
                • Apple
              • -
                security
                -
                license
                -
                quality
                Provides a Model Context Protocol server that enables large language models to query and retrieve real-time weather forecasts for cities and regions across China.
                Last updated -
                Python
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that provides AI agents with tools to retrieve weather alerts and detailed forecasts for US locations using the National Weather Service API.
                Last updated -
                2
                75
                TypeScript
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that provides comprehensive weather data querying capabilities based on the Caiyun Weather API, supporting real-time weather, forecasts, and alerts with multi-language support.
                Last updated -
                7
                2
                TypeScript

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/le-yo/weather-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server