AQICN MCP 空气质量数据服务
一个通过 AQICN.org 获取空气质量数据的 MCP 服务器。
快速入门
- 安装:
- 使用 Smithery 自动安装:
npx -y @smithery/cli install @mattmarcin/aqicn-mcp --client claude
- 或手动安装依赖:
uv pip install -e .
- 使用 Smithery 自动安装:
- 配置环境变量:
- 创建
.env
文件,添加AQICN_API_KEY=your_api_key_here
- 或直接设置环境变量:
export AQICN_API_KEY=your_api_key_here
- 创建
- 启动服务:
- 开发模式:
mcp dev aqicn_server.py
- 直接运行:
python aqicn_server.py
- 开发模式:
- 使用工具:
- 查询城市空气质量:
city_aqi(city="beijing")
- 查询坐标空气质量:
geo_aqi(latitude=35.6762, longitude=139.6503)
- 搜索监测站:
search_station(keyword="london")
- 查询城市空气质量: