使用说明
- 跑
npm run build构建项目。 - 打开Claude桌面版,并在你的MCP服务器配置中添加以下内容:
{ "mcpServers": { "weather": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js"] } } } - 重启 Claude 桌面版以使更改生效。
通过npm构建项目并将天气服务集成到Claude Desktop的MCP服务器配置中。
npm run build 构建项目。{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js"]
}
}
}