天气数据服务器

一个利用api.weather.gov API收集天气警报和预报的MCP服务器,用于Claude桌面应用程序。

  • by jona-nakai
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 jona-nakai/weather-mcp-server

使用说明

气象MCP服务器

MCP服务器利用https://api.weather.govapi通过Claude Desktop应用程序收集天气警报和预报。

教程链接

运行项目

  1. 克隆服务器存储库
git clone <repository-url>
cd weather-mcp-server
  1. 安装依赖项
npm install @modelcontextprotocol/sdk zod@3
npm install -D @types/node typescript
  1. 构建MCP服务器
npm run build
  1. 将MCP服务器添加到claude_desktop_config.json文件中
{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js"]
    }
  }
}
  1. 运行MCP服务器
node /ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js
  1. 重新启动克劳德桌面。向克劳德提问,如“萨克拉门托的天气怎么样?”或“德克萨斯州的活跃天气警报是什么?”,以测试MCP服务器。