OpenWeather-OneCall3-MCP
A Model Context Protocol (MCP) server that provides weather data using the OpenWeather One Call API 3.0. This server allows AI agents to access current weather, forecasts, and historical weather data for any location.
README
OpenWeather MCP Server
一个基于 Model Context Protocol (MCP) 的服务器,使用 OpenWeather One Call API 3.0 提供天气数据。该服务器允许 AI 智能体(如 Claude Desktop)获取任何地点的当前天气、天气预报和历史天气数据。
A Model Context Protocol (MCP) server that provides weather data using the OpenWeather One Call API 3.0. This server allows AI agents (like Claude Desktop) to access current weather, forecasts, and historical weather data for any location.
功能特性 | Features
- 当前天气与预报 | Current & Forecast: 获取详细的当前天气状况和每日/每小时天气预报。Get detailed current weather and daily/hourly forecasts.
- 时间机器 | Time Machine: 获取特定时间戳的历史天气数据。Retrieve historical weather data for specific timestamps.
- 地理编码 | Geocoding: 内置工具,支持按名称(如"伦敦"、"东京")搜索地点。Built-in tool to search for locations by name (e.g., "London", "Tokyo").
- 本地执行 | Local Execution: 通过 Stdio 本地运行,确保您的 API 密钥安全保存在本地机器上。Runs locally via Stdio, keeping your API keys secure on your machine.
先决条件 | Prerequisites
- Node.js: 版本 16 或更高。Version 16 or higher.
- OpenWeather API 密钥 | OpenWeather API Key: 需要一个具有 "One Call API 3.0" 订阅的密钥。在此获取。You need a key with "One Call API 3.0" subscription. Get one here.
安装 | Installation
选项 1: 从源码运行(推荐给开发者) | Option 1: Run from Source (Recommended for Developers)
-
克隆此仓库 | Clone this repository:
git clone https://github.com/your-username/openweather-mcp.git cd openweather-mcp -
安装依赖 | Install dependencies:
npm install -
构建项目 | Build the project:
npm run build
配置 | Configuration
零配置方法(发布到 NPM 后可用) | Zero-Config Method (Available after publishing to NPM)
发布到 NPM 后,用户可以使用 npx 运行服务器,无需手动下载代码或配置路径。
Once published to NPM, users can run the server without manually downloading code or configuring paths using npx.
{
"mcpServers": {
"openweather": {
"command": "npx",
"args": ["-y", "openweather-one-call-3.0-mcp"],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
开发配置 | Development Configuration
如果从源码本地运行:
If running locally from source:
{
"mcpServers": {
"openweather": {
"command": "node",
"args": ["C:/Absolute/Path/To/openweather-mcp/dist/index.js"],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
工具 | Tools
get_current_weather
获取指定地点的当前天气和预报。Fetch current weather and forecast for a location.
- 参数 | Args:
lat(数字,纬度 | number),lon(数字,经度 | number),exclude(数组,可选 | array, optional)
get_weather_history
获取特定时间的历史天气。Fetch historical weather for a specific time.
- 参数 | Args:
lat(数字,纬度 | number),lon(数字,经度 | number),dt(Unix 时间戳 | unix timestamp)
get_coordinates_from_location
搜索城市或行政区域以获取坐标。Search for a city or administrative area to get coordinates.
- 参数 | Args:
query(字符串,搜索查询 | string)
许可证 | License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。