# pyplAI

> pyplAI is an open-source MCP server for games and play. MCP server letting language models play board games against MCTS and minimax search. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows
- **Repository:** https://github.com/plss12/pyplai-mcp
- **MCP Registry name:** io.github.plss12/pyplai-mcp
- **Categories:** [games and play](https://ai-powered.com/categories/games-and-play)
- **Listing updated:** 2026-11-27

## About

Language models are weak at searching a game tree, so they can explain a board well but pick poor moves. This server supplies the search: a model can play Tic-tac-toe, Ultimate tic-tac-toe or the hidden-stone game Phantom (4,4,4) against search-based opponents, or call the same algorithms as tools to rank its own legal moves with win rates.

The server runs over stdio and exposes tools for starting games, reading the board, playing moves, analysing positions and ending games. Illegal moves return readable errors listing the legal options, so the model can correct itself. Every analysis works on a copy of the game state, and Phantom uses sampled hidden positions rather than reading the real board.

It suits developers testing how much search helps a model, and people who want an AI opponent or analyst inside an MCP client such as Claude Desktop or Claude Code.

## Features

- **Search-backed move analysis:** Ranks every legal move with MCTS, minimax or information set MCTS, including visits and win rates.
- **Three board games:** Supports Tic-tac-toe, Ultimate tic-tac-toe and imperfect-information Phantom (4,4,4).
- **Opponents of several strengths:** Games can be set against MCTS, minimax, information set searches or a random player.
- **Hidden-information play:** Phantom searches sample possible hidden stones, so the player never receives the opponent's concealed positions.
- **Structured tool outputs:** Every tool returns structured output with a published schema, and invalid arguments are rejected with clear errors.
- **Bounded game sessions:** Keeps at most 100 games and expires idle games after an hour.

## Good for

- Give a language model a strong opponent in board games to play against
- Have an assistant analyse a board position and explain the best move
- Benchmark how far search tools improve a small language model's play
- Study information set search on a hidden-stone game

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add pyplai-mcp -- uvx pyplai-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add pyplai-mcp -- uvx pyplai-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.pyplai-mcp]
command = "uvx"
args = ["pyplai-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user pyplai-mcp uvx -- pyplai-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "pyplai-mcp": {
      "command": "uvx",
      "args": [
        "pyplai-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 7 tools changes data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `list_games` (name suggests: reads): Lists games, move notation, opponents and analysis algorithms.
- `get_rules` (name suggests: reads): Returns the full rules of a game.
- `new_game`: Starts a game with options for first player, opponent, thinking time or depth, seed and opening moves.
- `get_state` (name suggests: reads): Returns the board as the player sees it, legal moves and history.
- `play_move` (name suggests: changes): Plays the player's move and returns the opponent's reply.
- `analyze_position` (name suggests: reads): Ranks legal moves using MCTS, minimax or information set MCTS.
- `end_game`: Frees a game session.

## FAQ

### How do I install pyplAI?

Run it with uvx from PyPI as pyplai-mcp, or add it to Claude Code with claude mcp add pyplai -- uvx pyplai-mcp. It also appears in the MCP Registry as io.github.plss12/pyplai-mcp.

### Which games are supported?

Tic-tac-toe, Ultimate tic-tac-toe and Phantom (4,4,4), with MCTS, minimax, information set MCTS and random opponents depending on the game.

### Does the server need an API key?

No environment variables are required by the registry entry.

### Can pyplAI run over HTTP as well as stdio?

Yes, it can be started with the streamable-http transport on a chosen port, in addition to the default stdio mode.

### Is pyplAI free?

Yes. pyplAI is open source, so you can use and self-host it for free.

### How do I add pyplAI to Claude Code?

Run this command in your terminal: claude mcp add pyplai-mcp -- uvx pyplai-mcp

### What are the best alternatives to pyplAI?

The closest alternatives to pyplAI are Paidia, Llmpvp, Agent Arcade MCP, Chess Sim and Arcade1v1.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Paidia](https://ai-powered.com/mcp/paidia): Paidia is an MCP server for games and play.
- [Llmpvp](https://ai-powered.com/mcp/llmpvp): Llmpvp is an open-source MCP server for games and play.
- [Agent Arcade MCP](https://ai-powered.com/mcp/agent-arcade-mcp): Agent Arcade MCP is an open-source MCP server for games and play.
- [Chess Sim](https://ai-powered.com/mcp/chess-sim): Chess Sim is a freemium MCP server for games and play.
- [Arcade1v1](https://ai-powered.com/mcp/arcade1v1): Arcade1v1 is an MCP server for games and play.
- [Chess Esca](https://ai-powered.com/mcp/chess-esca): Chess Esca is an open-source MCP server for games and play.
- [Chess.com MCP by UnClick](https://ai-powered.com/mcp/chess-com-mcp-by-unclick): Chess.com MCP by UnClick is an open-source MCP server for games and play.
- [Playtable](https://ai-powered.com/mcp/playtable): Playtable is a free MCP server for games and play.

---
Source: https://ai-powered.com/mcp/pyplai
