天气查询工具 Weather MCP Tool

天气查询工具 Weather MCP Tool

一个极简的天气查询工具,支持自然语言查询全球天气,并与 Cursor 编辑器完美集成。

快速开始

  1. 获取 API Key

  2. 一键安装(推荐) 使用 Smithery 工具快速安装: npx -y @smithery/cli@latest install @MrCare/mcp_tool --client cursor --config "{"openweathermapApiKey":"your_api_key_here","port":8000}"

  3. 手动安装

    • 克隆仓库并安装依赖: git clone https://github.com/MrCare/mcp_tool.git && cd mcp_tool && pip install -e .
    • 配置 API Key: cp env.example .env 修改 .env 文件,填入你的 API Key。
    • 启用工具:编辑 ~/.cursor/mcp.json 文件,添加以下内容: { "weather_fastmcp": { "command": "python", "args": ["-m", "weather_server.server"] } }
    • 重启 Cursor。
  4. 使用示例 在 Cursor 中输入: Show me the weather in Tokyo What's the forecast for London? How's the weather in New York? Will it rain tomorrow in Paris?