---
title: "Mastermind"
url: "https://aigamehub.app/ja/games/mastermind-web-de6733"
source: "https://github.com/gextam/mastermind-web"
source_type: "github"
play_url: "https://gextam.github.io/mastermind-web/docs/"
platform: "desktop"
login_required: false
pricing: "free"
origin: "original"
ai_tools: []
game_languages: ["en"]
author: "gextam"
author_handle: "gextam"
category: "カジュアル"
categories: ["casual", "puzzle"]
tags: ["board-game", "code-breaking", "html5-canvas", "mastermind", "mcp", "solver"]
added: "2026-11-15T11:20:58.305Z"
updated: "2026-11-15T11:20:58.305Z"
locale: "ja"
content_locale: "ja"
---

# Mastermind

木製ボードで遊ぶ古典的なコード破りゲーム Mastermind のブラウザ版。リアルタイムの共有スコアボードとオフラインコピー付き。

## Description

あなたはコードブレイカーとして、できるだけ少ない行数で隠された色コードを当てるか、コードメイカーとしてコードを隠し、サーバーの Knuth minimax solver がそれを解き明かすのを見ます。6 つのプリセットボード（定番の 4 ペグ x 6 色 x 10 回の推測から、6 ペグ x 8 色 x 15 回の推測まで）に加え、2～8 ペグ、2～10 色、繰り返しと空白の任意設定、残っているコード数を表示するソルバーヒント付きのカスタムルールがあります。マウスのドラッグ＆ドロップまたはフルキーボードでプレイでき、REST API と MCP サーバーにより AI エージェントが同じスコアボードでプレイできます。

## Original post

Mastermind in the browser plus a game server with REST API and MCP server so Claude can play remotely

Topics: claude, game, html5-canvas, mastermind, mcp, mcp-server, model-context-protocol, nodejs, rest-api

<div align="center"> <img src="assets/logo.png" alt="MASTERMIND" width="640"> ### The code-breaking classic on a walnut board, with a game server, a REST API and an MCP server so Claude can play against it remotely ![HTML5 Canvas](https://img.shields.io/badge/HTML5-Canvas-e34f26) ![Web Audio](https://img.shields.io/badge/Web%20Audio-synthesized-7b61ff) ![Node](https://img.shields.io/badge/Node.js-20%2B-339933) ![MCP](https://img.shields.io/badge/MCP-2025--06--18-6b4fbb) ![Dependencies](https://img.shields.io/badge/dependencies-none-success) ![Tests](https://img.shields.io/badge/tests-engine%2079%20%C2%B7%20api%2084%20%C2%B7%20smoke%2018-blue) <img src="docs/screenshots/hero.jpg" alt="The decoding board mid-game: codemaker shield, key pegs, the tray and the scoreboard" width="900"> </div> Plain HTML5 Canvas, Web Audio and vanilla JavaScript in the browser; one dependency-free Node.js process behind it that serves the game, a REST API and a Model Context Protocol server. You break the codemaker's code with as few guesses as possible, or set a code and watch Knuth's solver break it. Every player, human or agent, plays on the same scoreboard. > Unofficial recreation of the classic game for entertainment only. Play money, no wagering. **Live table:** <https://cocojs.com/games/mastermind/> (shared scoreboard) · **MCP endpoint for agents:** `https://cocojs.com/games/mastermind/mcp` · **Docs:** <https://cocojs.com/games/mastermind/docs/mcp.html> · The GitHub Pages copy at <https://gextam.github.io/mastermind-web/> plays offline with a local scoreboard. --- ## Contents 1. [Features](#features) 2. [Platforms](#platforms) 3. [Installation](#installation) 4. [Let Claude play (MCP server & API)](#let-claude-play-mcp-server--api) 5. [Configuration reference](#configuration-reference) 6. [User guide](#user-guide) 7. [Keyboard shortcuts](#keyboard-shortcuts) 8. [Scoring](#scoring) 9. [Known limitations](#known-limitations) 10. [Project layout](#project-layout) 11. [Development](#development) --- ## Features **The table** * A walnut decoding board under a banker's lamp: drilled rows, routed channel, engraved row numbers, a 2×2 (or 3×2, 4×2) key-peg cluster per row, a brass hinged shield over the codemaker's row * Glossy pre-rendered pegs that drop into their holes with a bounce; key pegs that pop in one by one; a brass marker that slides to the next row; the shield swings open on its hinge to reveal the code; confetti for a win, a shake for a loss * Click, drag and drop, right-click to remove, full keyboard play **The game** * Both roles: **codebreaker** (the server hides a code) and **codemaker** (you hide a code, the server's Knuth minimax solver breaks it row by row while you watch) * Six boards: Classic 4 pegs × 6 colours × 10 guesses, Mini, No repeats, With blanks, Super 5 × 8 × 12, Grand 6 × 8 × 15, plus custom rules (2–8 pegs, 2–10 colours, 1–30 guesses, repeats and blanks on or off) * Hints from the solver (how many codes are still possible, a sample, and
