天气查询API

一个基于FastAPI和OpenWeatherMap API的天气查询服务,提供实时天气数据,适合学习和原型开发。

  • by AumOzaa
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 aumozaa/mcp-server-weatheranalysis

使用说明

🌤️ 天气伙伴-MCP项目

一个天生的天气检查API建立 快速 API 和那个 OpenWeatherMap API.
只需键入您的城市,点击端点,即可以干净的JSON格式获取当前天气信息!


🚀 特性

  • ⚡ 使用FastAPI构建的Superfast API
  • 🌍 来自OpenWeatherMap的实时天气数据
  • 🧠 逻辑简单,非常适合学习或原型制作
  • 🔐 API密钥使用环境变量安全存储
  • 🌐 通过查询参数接受任何城市名称

🧩 技术栈


🛠️ 安装说明

1.克隆此存储库

git clone https://github.com/your-username/weather-buddy.git
cd weather-buddy

python -m venv mcp-env
mcp-env\Scripts\activate      # On Windows
# OR
source mcp-env/bin/activate  # On Mac/Linux


pip install fastapi uvicorn requests


get your api key ; https://home.openweathermap.org/api_keys

uvicorn weather_mcp:app --reload