Back to MCP directory
publicPublicdnsLocal runtime

Minesweeper

一个基于MCP协议的扫雷游戏服务器,允许客户端代理通过MCP协议进行扫雷游戏交互。

article

README

🚀 矿石扫雷 MCP 服务器

本项目是一个基于 模型上下文协议 的服务器,它能够让 MCP 客户端代理在游戏 Minesweeper 中实现交互。该服务器旨在与 Minesweeper 游戏服务器 协同工作。

屏幕截图 若需查看完整视频演示,可访问 https://youtu.be/CXXMafVtlEQ(16x 加速)。

🚀 快速开始

启动本地游戏服务器

按照 说明 启动本地游戏服务器。

构建 MCP 服务器

使用以下命令构建 MCP 服务器:

npm install
npm run build

配置 MCP 客户端

配置您的 MCP 客户端以添加工具。例如,在 Windows 的 claude_desktop_config.json 中添加以下工具(定位文件),假设您将仓库克隆到 C:\path\to\repo\minesweeper-mcp-server

{
  "mcpServers": {
    "mcp-server": {
      "command": "node",
      "args": ["C:\\path\\to\\repo\\minesweeper-mcp-server\\build\\index.js"],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}

重启 Claude Desktop

重启 Claude Desktop 以使其加载工具。请确保通过系统托盘图标退出,而不是从应用程序本身(这只会隐藏窗口)。如果一切正常,点击工具图标时应显示新的工具: Claude Desktop 主页截图 新工具截图

💻 使用示例

示例提示

开始一个新的地雷游戏。尽量在标记了所有地雷之前一直玩下去。记住坐标是基于 0 的索引。

示例交互

实际对话非常长,这里只是一些片段:

游戏开始

游戏开始

在错误的位置放置标记

Claude 在错误的位置放置标记

在多次尝试后放弃

Claude 放弃

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client