Skip to main content
Glama
le-yo

MCP Weather Server

by le-yo

MCP 天气服务器

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

什么是 MCP?

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

Related MCP server: Weather MCP Server

特征

  • 获取任何地点的当前天气信息

  • 与 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

执照

麻省理工学院

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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