Minesweeper MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Minesweeper MCP Server create a 9x9 board with 10 mines for a quick game"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Minesweeper MCP Server
A Model Context Protocol (MCP) server that provides Minesweeper game functionality. Users can create custom-sized Minesweeper boards and play the classic game through AI assistants.
Features
Custom Board Sizes: Create Minesweeper boards of any size (up to 50x50)
Flexible Mine Count: Set any number of mines (within reasonable limits)
Multiple Games: Manage multiple concurrent game boards
Visual Display: ASCII art representation of the game board
Game State Tracking: Win/loss detection and timing
Cell Operations: Reveal cells, flag/unflag suspected mines
Related MCP server: Minesweeper MCP Server
Installation
Clone or download this repository
Install dependencies:
npm installBuild the TypeScript code:
npm run buildStart the server:
npm start
Available Tools
create_board
Create a new Minesweeper board with custom dimensions and mine count.
Parameters:
id(string): Unique identifier for the boardwidth(number): Number of columns (1-50)height(number): Number of rows (1-50)mineCount(number): Number of mines to place
Example:
Create a 10x10 board with 15 mines, ID "game1"reveal_cell
Reveal a cell on the board. If it's a mine, the game ends. If it's empty, adjacent cells may be automatically revealed.
Parameters:
boardId(string): ID of the boardx(number): Column coordinate (0-based)y(number): Row coordinate (0-based)
Example:
Reveal cell at position (5, 3) on board "game1"flag_cell
Flag or unflag a cell as a suspected mine.
Parameters:
boardId(string): ID of the boardx(number): Column coordinate (0-based)y(number): Row coordinate (0-based)
Example:
Flag cell at position (2, 7) on board "game1"get_board
Display the current state of a board.
Parameters:
boardId(string): ID of the board to display
list_boards
List all active game boards with their status.
Parameters: None
delete_board
Delete a game board.
Parameters:
boardId(string): ID of the board to delete
Game Symbols
.= Hidden cellF= Flagged cell*= Mine (revealed when game ends)1-8= Number of neighboring mines(space) = Empty cell with no neighboring mines
Example Game Flow
Create a board:
create_board with id="easy", width=9, height=9, mineCount=10Start revealing cells:
reveal_cell on board="easy" at x=4, y=4Flag suspected mines:
flag_cell on board="easy" at x=0, y=0Check board status:
get_board for boardId="easy"Continue until you win or hit a mine!
Game Rules
Objective: Reveal all cells that don't contain mines
Winning: Reveal all non-mine cells
Losing: Reveal a cell containing a mine
Numbers: Show count of mines in the 8 adjacent cells
Flagging: Mark cells you suspect contain mines (prevents accidental revelation)
Auto-reveal: When you reveal an empty cell (0 neighbors), all adjacent cells are automatically revealed
Development
Project Structure
src/
├── index.ts # Main MCP server implementation
└── minesweeper.ts # Core game logic and typesScripts
npm run build- Compile TypeScript to JavaScriptnpm run dev- Watch mode for developmentnpm start- Run the compiled server
Integration with AI Assistants
This MCP server can be integrated with AI assistants that support the Model Context Protocol, such as Claude Desktop. The AI can help you:
Create boards with optimal mine distributions
Suggest strategic moves
Analyze board patterns
Track multiple games simultaneously
License
MIT License - feel free to use and modify as needed!
Available Tools
6 toolscreate_boardB
Create a new Minesweeper board with specified dimensions and mine count
Inputs: id (required), width (required), height (required), mineCount (required).
delete_boardC
Delete a Minesweeper board
Inputs: boardId (required).
flag_cellC
Flag or unflag a cell on the Minesweeper board
Inputs: boardId (required), x (required), y (required).
get_boardC
Get the current state and visual representation of a Minesweeper board
Inputs: boardId (required).
list_boardsB
List all active Minesweeper boards
Inputs: no named parameters.
reveal_cellC
Reveal a cell on the Minesweeper board
Inputs: boardId (required), x (required), y (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: create_board for initialization, delete_board for removal, flag_cell for marking, get_board for state retrieval, list_boards for enumeration, and reveal_cell for uncovering. The actions and targets are unambiguous, preventing agent misselection.
All tools follow a consistent verb_noun pattern with snake_case (e.g., create_board, flag_cell, get_board). The verbs are clear and descriptive, and there are no deviations in style or convention throughout the set.
With 6 tools, the count is well-scoped for a Minesweeper game server. It covers core operations without bloat, and each tool earns its place by addressing a specific aspect of board management and gameplay.
The toolset provides complete CRUD/lifecycle coverage for the Minesweeper domain: create, list, get, and delete for boards, plus reveal and flag for cell interactions. There are no obvious gaps, enabling agents to handle all essential gameplay workflows without dead ends.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Games for AI agents. Each game runs inside a single context window.
Generate game-ready 3D models, textures, and audio from natural language, over MCP.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceProvides a Model Context Protocol interface for HexagonML ModelManager tools, enabling interaction with machine learning model management functionality through natural language.1-
- FlicenseAqualityNot gradedmaintenanceEnables MCP client agents to play the classic Minesweeper game by connecting to a separate Minesweeper game server. Provides tools for starting games, revealing cells, and placing flags through natural language interactions.4-
- FlicenseBqualityDmaintenanceA stdio-based MCP server that enables users to play and manage Minesweeper games through a Rails 8 REST API. It provides tools to start games, track states, and perform actions like opening cells and flagging mines.72-
- FlicenseNot gradedqualityDmaintenanceProvides dice rolling and coin flipping functionality for AI assistants via the Model Context Protocol. It enables users to roll single or multiple dice with configurable sides and perform randomized coin tosses.1-