Weather MCP Server
Weather MCP Server
一个基于 Model Context Protocol (MCP) 标准的服务器,使用 Open-Meteo API 根据城市名称提供实时天气预报。
功能
地理编码:自动将城市名称转换为地理坐标(纬度和经度)
实时天气:获取当前温度、风速和天气代码
MCP 集成:完全兼容 Claude Desktop 等 MCP 客户端
无需 API 密钥:使用免费、开源的 Open-Meteo API——无需注册!
Related MCP server: weather_mcp_server
环境要求
Node.js >= 18.x
npm 或 yarn
安装
克隆仓库:
git clone https://github.com/Yaseen-md/weather-mcp-server.git
cd weather-mcp-server安装依赖:
npm install构建服务器:
npm run build开发
无需构建即可直接运行服务器:
npm run dev与 Claude Desktop 集成
要将此天气服务器与 Claude Desktop 一起使用,您需要配置 claude_desktop_config.json 文件。
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"C:/path/to/your/weather-mcp-server/build/index.js"
]
}
}
}(请确保将路径替换为构建后的 index.js 文件的实际绝对路径。)
可用工具
get_weather
获取指定城市的当前天气。
输入参数:
city(字符串):城市名称(例如:"Delhi"、"Tokyo"、"London"、"San Francisco")
返回: 摄氏温度、风速和天气代码。
许可证
本项目基于 MIT 许可证 授权。
Available Tools
1 toolget_weatherA
Get current weather for a given city
Inputs: city (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between tools. The tool's purpose is clear and distinct by default.
The tool name follows a consistent verb_noun pattern (get_weather). With a single tool, there are no naming inconsistencies to evaluate.
One tool feels thin for a weather server, which typically offers multiple data types like forecasts and alerts. However, it is borderline given the narrow 'current weather' scope.
The server only covers current conditions, missing obvious weather domain features such as forecasts, historical data, or alerts. This significantly limits its usefulness for common weather queries.
Maintenance
Related MCP Connectors
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Free, keyless real-time weather and 7-day forecasts for any city worldwide.
Weather forecast for any city, UV index, sunrise and sunset, pollen and air quality. Free, no key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents like GitHub Copilot to retrieve real-time weather data for any city using the Open-Meteo API, no API key required.10ISC
- FlicenseNot gradedqualityDmaintenanceProvides real-time and historical weather data for any city worldwide, including forecasts, air quality, and marine conditions, using the free Open-Meteo API.-
- FlicenseAqualityCmaintenanceEnables querying current weather, 7-day forecast, UV index, and air quality for any city using the free Open-Meteo API, without requiring an API key.3-
- AlicenseNot gradedqualityDmaintenanceProvides live weather data (current conditions, forecasts) and city geocoding through Open-Meteo API, enabling AI assistants to answer weather queries without an API key.MIT