天气API服务器

一个基于openweathermap.org API的天气数据查询服务器,用于本地运行和测试天气数据获取功能。

  • by anjan-arun
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 anjan-arun/demo-mcp-server

使用说明

演示MCP服务器

先决条件

  1. uv 应安装包管理器
  2. 拿到 API Key 用于访问 openweathermap.org 天气API

如何在本地运营?

  1. 首先,克隆此存储库并将cd放入其中。
    $ git clone https://github.com/anjan-arun/demo-mcp-server.git && cd demo-mcp-server
    
  2. 同步依赖关系
    $ uv sync
    
  3. 更新API Key in变量- api_key 属于的 get_weather 在main-wather.py中
  4. 运行ACM MCP服务器:
    $ uv run main-weather.py
    
  5. 使用Postman或Claude测试MCP服务器
    http://0.0.0.0:8086/mcp