Weather MCP
天气 MCP
使用模型上下文协议 (MCP) 的天气预报应用程序
概述
该应用程序是一个 MCP 服务器,使用 Open-Meteo API 来检索和显示天气预报数据。可以通过 MCP 协议从 LLM 应用程序访问天气信息。
Related MCP server: Weather MCP Server
功能
显示当前天气信息
查看3天天气预报
获取基于位置的天气信息
通过 MCP 协议访问
设置
安装依赖项:
pip install -e .设置环境变量:创建
.env文件,设置所需的环境变量。
MCP_API_KEY=your_api_key_here
MCP_BASE_URL=http://localhost:8000启动 MCP 服务器:
python -m app.server运行客户端:
python -m app.clientMCP 工具
获取天气
获取特定城市的当前天气信息和 3 天预报。
参数:
city:要获取天气信息的城市名称(例如东京、纽约)
响应示例:
{
"location": {
"name": "東京",
"country": "日本",
"latitude": 35.6895,
"longitude": 139.6917,
"timezone": "Asia/Tokyo"
},
"current": {
"temperature": 22.5,
"feels_like": 23.1,
"humidity": 65,
"wind_speed": 3.2,
"wind_direction": 180,
"precipitation": 0,
"condition": "晴れ",
"weather_code": 1
},
"forecast": [
{
"date": "2023-04-10",
"max_temp": 24.5,
"min_temp": 15.2,
"precipitation": 0,
"condition": "晴れ",
"sunrise": "05:30",
"sunset": "18:15"
},
...
]
}执照
麻省理工学院
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Open-Meteo tabanlı anahtarsız hava durumu tahmin MCP sunucusu.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.8362 PyPI60Apache 2.0
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides weather information and forecasts based on user location or address input.65 npm8MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather data and forecasts for any city.19 npmISC
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.1-