这是一个MCP服务器实现,它公开了WeatherXM PRO API作为MCP工具,允许客户端通过MCP协议访问气象站数据、观测结果和预报。
将仓库克隆到您的本地机器。
git clone https://github.com/WeatherXM/weatherxm-pro-mcp.git
在克隆仓库后,您需要安装依赖项并构建项目,然后才能运行MCP服务器。
npm install
npm run build
这是适用于Claude Desktop、Cursor、Windsurf Editor、VSCode以及RooCode和Cline等插件的MCP客户端的通用配置。
{
"mcpServers": {
"weatherxm-pro": {
"command": "npx",
"args": [
"-y",
"mcp路径"
],
"env": {
"WEATHERXMPRO_API_KEY": "你的API密钥"
}
}
}
}
将"mcp路径"替换为实际的MCP服务器路径或包名,并将"你的API密钥"替换为您的WeatherXM PRO API密钥。
注意:如果您已经在客户端使用其他MCP服务器,可以将其添加到现有的
mcpServers对象中。
按照以下步骤使用WeatherXM PRO MCP服务器与Claude Desktop MCP客户端:
编辑位于以下位置的MCP设置文件:
~/Library/Application Support/Claude/claude_desktop_config.json
在mcpServers对象下添加WeatherXM PRO MCP服务器配置。
重启Claude Desktop以应用更改。
您现在可以在Claude Desktop中使用该服务器来查询WeatherXM PRO MCP服务器。
按照以下步骤使用WeatherXM PRO MCP服务器与Cursor:
按照以下步骤使用WeatherXM PRO MCP服务器与Windsurf Editor:
MCP服务器可以构建并作为Docker容器运行。
docker build -t weatherxm-pro-mcp .
docker run -d -p 3000:3000 -e WEATHERXMPRO_API_KEY="你的API密钥" -e PORT=3300 weatherxm-pro-mcp
将"你的API密钥"替换为您的实际WeatherXM PRO API密钥。
MIT许可证