weather-mcp
天气 API + UI + MCP 服务器
本项目包含:
UI:输入城市名称并获取当前天气
HTTP API:
GET /api/weather?city=...摘要 API:
GET /api/summary?city=...(可选 Claude;若不可用则回退至本地摘要)MCP 服务器:通过 stdio 提供
get_weather工具
天气数据使用 Open‑Meteo(免费,无需 API 密钥)。
运行 UI + API
npm install
npm run dev打开 http://localhost:5175。
可选:“Claude API”摘要
Claude 并非完全免费;你需要一个 API 密钥。本项目支持以下任一方式:
ANTHROPIC_API_KEY(直接使用 Anthropic API),或OPENROUTER_API_KEY(OpenRouter,通过OPENROUTER_MODEL使用 Anthropic Claude 模型)
如果未设置密钥,/api/summary 和 UI 中的“总结”按钮将回退至本地摘要。
运行 MCP 服务器 (stdio)
npm install
npm run mcp然后配置你的 MCP 客户端以启动:
命令:
npm参数:
["run","mcp"]工作目录:此文件夹
工具名称:
get_weather,输入参数为{ "city": "Pune" }
"# MCP_example"
This server cannot be deployed
Maintenance
Related MCP Connectors
Current temperature for a city via Open-Meteo. Query discarded after the call.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Weather forecast for any city, UV index, sunrise and sunset, pollen and air quality. Free, no key.
Weather MCP — wraps Open-Meteo API (free, no auth)
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides current weather information for any city worldwide using the free Open-Meteo API, enabling users to query temperature, wind speed, humidity, and weather conditions through natural language.3 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides weather information using Open-Meteo API without requiring an API key. Supports weather queries by city name or coordinates with customizable temperature units.-
- AlicenseNot gradedqualityDmaintenanceProvides current weather information for any city using the Open-Meteo API. Returns temperature, humidity, wind speed, and other weather data in JSON format.6 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides current weather information for any city using the OpenWeatherMap API.-