MCP HubMCP Hub
tonypan2

minesweeper-mcp-server

by: tonypan2

An MCP server for playing Minesweeper

107created 20/03/2025
Visit
Minesweeper
Game

📌Overview

Purpose: To provide an MCP server that enables client agents to interactively play the game of Minesweeper within a structured protocol environment.

Overview: The Minesweeper MCP Server is designed to work in conjunction with the Minesweeper game server, facilitating an interactive gaming experience where agents can participate in the classic puzzle game. It is built using Node.js, allowing for easy configuration and integration with various client applications.

Key Features:

  • MCP Protocol Compliance: Ensures effective communication between client agents and the server, adhering to the Model Context Protocol specifications to create a seamless gameplay experience.

  • Client Integration: Allows for straightforward configuration with any MCP-compatible client, providing a plug-and-play setup to enhance existing applications with Minesweeper gameplay capabilities.


Minesweeper MCP Server

The Minesweeper MCP Server is a Model Context Protocol server that enables MCP client agents to play Minesweeper. It is designed to run alongside the Minesweeper game server.

Getting Started

  1. Start the Minesweeper game server locally by following the instructions.

  2. Build the MCP server:

    npm install
    npm run build
    
  3. Configure your MCP client to add the server. For example, here is how to configure Claude Desktop on Windows in the claude_desktop_config.json file (assuming the repo is cloned 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": "*"
          }
        }
      }
    }
    
  4. Restart Claude Desktop to apply the changes. Make sure to quit from the tray menu icon for the update to take effect.

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 following sections describe interactions with the game:

Game Start

Placing Flag at the Wrong Place

Giving Up After Several Attempts

This structured format outlines the necessary steps and interactions for using the Minesweeper MCP Server effectively.