使用说明
MCP天气包装
此项目实现了一个模型上下文协议(MCP)服务器,该服务器封装了一个 现有的Weather API(Assignment 2),并将其端点公开为可用的工具 在ChatGPT桌面应用程序中。
工具
get_weather(city, units)- 电话:
GET /api/weather?city=...&units=...
- 电话:
health()- 电话:
GET /health
- 电话:
本地跑
pip install -r requirements.txt
export API_BASE=https://java-api-consumer.onrender.com
python server.py