实时城市天气服务器

一个定制化的MCP服务器,用于获取和广播任何城市的实时天气数据(温度、降水等),设计用于与Minecraft客户端无缝集成,同时拉取实时天气API以确保准确性。

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

使用说明

实时城市天气服务器(MCP)

Publisher Markdown是一种在线编辑器,在您的浏览器中运行,可与您的本地文件和各种云存储服务一起使用。

降价

开发了一个定制的MCP服务器,可以获取和广播任何城市的实时天气数据(温度、降水量等)。旨在与Minecraft客户端无缝集成,同时提取实时天气API以提高准确性。

如何使用它

首先,您需要克隆此存储库并安装依赖项:

git clone https://github.com/claude-mcp/mcp-server-01.git
cd mcp-server-01
npm install

然后,您需要配置服务器。

克劳德桌面

设置->配置->开发人员->编辑配置 打开文件并添加:

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": [
        "-y",
        "tsx",
        "C:/mcp/mcp-server-01/src/index.ts"  //Here you put the route of your cloned repoitory
      ]
    }
  }
}

Visual Studio Code

  1. 打开mcp.json:
{
    "inputs": [],
    "servers": {
        "mcp-server-time": {
            "command": "npx",
            "args": [
                "-y",
                "tsx",
                "C:/mcp/mcp-server-01/src/index.ts" <-- Here type your repository route
            ],
            "env": {}
        }
    }
}
  1. 打开终端并运行以下命令:
code --add-mcp '{"name":"mcp-server-time","command":"npx","args":["-y","tsx","C:/mcp/mcp-server-01/src/index.ts"],"env":{}}'