
MCP Weather Server

2025.03.23
0
Python天气服务位置服务
MCP Weather Server 是一个基于 Model Context Protocol (MCP) 的服务,提供美国天气信息,使用国家气象服务 API。该服务允许 Claude 和其他兼容 MCP 的 AI 助手访问实时天气数据。
View on GitHub
Overview
基本能力
产品定位
MCP Weather Server 是一个天气信息服务,专门为 AI 助手提供实时天气数据和警报。
核心功能
- 天气警报:获取美国各州的当前天气警报。
- 天气预报:使用经纬度获取美国任何地点的详细天气预报。
适用场景
- 查询特定地区的天气警报。
- 获取特定地点的天气预报。
工具列表
mcp-weather
:提供天气数据和警报的 MCP 服务工具。
常见问题解答
无明确常见问题解答部分。
使用教程
使用依赖
无特殊前置依赖,直接安装即可。
安装教程
用户安装
# 从 PyPI 安装
pip install mcp-weather
# 或使用 uv 安装
uv pip install mcp-weather
开发者安装
# 克隆仓库
git clone https://github.com/michael7736/mcp-weather.git
cd mcp-weather
# 创建虚拟环境
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 安装依赖
pip install -e ".[dev]"
调试方式
无明确调试步骤。
配置
Cline (VS Code 扩展)
在 cline_mcp_settings.json
中添加:
{
"mcpServers": {
"weather": {
"command": "mcp-weather",
"disabled": false,
"autoApprove": []
}
}
}
Claude Desktop App
在 claude_desktop_config.json
中添加:
{
"mcpServers": {
"weather": {
"command": "mcp-weather",
"disabled": false,
"autoApprove": []
}
}
}
使用示例
配置完成后,可以向 Claude 或其他兼容 MCP 的 AI 助手提问天气相关问题: - "What are the current weather alerts in CA?" - "What's the weather forecast for San Francisco?"