minesweeper-mcp-server

MCP.Pizza Chef: tonypan2

The minesweeper-mcp-server is an MCP server that integrates Minesweeper gameplay into AI workflows. It allows MCP client agents to interact with and play Minesweeper games in real time by connecting to a Minesweeper game server. This server facilitates multi-step reasoning and game state management, enabling AI models to strategize and make moves within the classic Minesweeper environment.

Use This MCP server To

Enable AI agents to play Minesweeper interactively Integrate Minesweeper gameplay into AI-driven workflows Test AI decision-making in a strategic game environment Simulate Minesweeper game states for training or evaluation Combine Minesweeper with other MCP tools for complex tasks

README

Minesweeper MCP Server

This is an Model Context Protocol server that allows an MCP client agents to play a game of Minesweeper. It is intended to be run alongside the Minesweeper game server.

Screen capture View the entire video demo at https://youtu.be/CXXMafVtlEQ (16x speedup).

Getting started

  • Follow the instructions of the game server to start it locally.
  • Build the MCP server:
npm install
npm run build
  • Configure your MCP client to add the tool. For example, here is how to add the tool to Claude Desktop on Windows's claude_desktop_config.json (locating the file), assuming you cloned the repo at 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 : Restart Claude Desktop to let it pick up the tools. Be sure to quit from the tray menu icon, not from the app (which simply hides the window). If you click the Tools icon, it should show the new tools:

    Screenshot of Claude Desktop homepage

    Screenshot of new tools

Example prompt

Start a new game of Minesweeper. Try your best to keep playing until you have flagged all mines. Remember that the coordinates are 0-indexed.

Example interaction

The actual conversation is very long. Here are some snippets:

Game start

Game starts

Placing flag at the wrong place

Claude places flag at the wrong place

Giving up after several attempts

Claude gives up

minesweeper-mcp-server FAQ

How do I set up the minesweeper-mcp-server?
Install dependencies with npm, build the server, and run it alongside the Minesweeper game server following its setup instructions.
Can I use this MCP server with different MCP clients?
Yes, it is designed to work with any MCP client that supports adding external tools, such as Claude Desktop.
Does the server handle game state management?
Yes, it manages Minesweeper game states and communicates moves and results to the MCP client.
Is this server compatible with multiple LLM providers?
Yes, it works with MCP clients that can connect to models like OpenAI, Claude, and Gemini.
Can I customize the Minesweeper game parameters?
Customization depends on the underlying Minesweeper game server; this MCP server interfaces with it to relay game state.
Where can I find a demo of the minesweeper-mcp-server in action?
A video demo is available at https://youtu.be/CXXMafVtlEQ showing gameplay at 16x speed.
What programming languages and tools are required?
The server is built with Node.js and requires npm for installation and building.
How do I add this MCP server as a tool in an MCP client?
Configure your MCP client’s tool settings, for example by editing claude_desktop_config.json to include this server.