# Pyxel MCP

> Pyxel MCP is an MCP server for games and play. Runs Pyxel games headlessly so an agent can play them and inspect screenshots and state. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI
- **Repository:** https://github.com/kitao/pyxel-mcp
- **MCP Registry name:** io.github.kitao/pyxel-mcp
- **Categories:** [games and play](https://ai-powered.com/categories/games-and-play), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

An agent can write a Pyxel game quickly but cannot open a window or press keys. This server closes that gap by running the script in a fresh subprocess with SDL dummy drivers and a frame budget, then returning observations: screenshots, pixel grids, game state, assets, audio and frame differences. It reports facts; judging whether the game is good stays with the agent and the person asking.

Input is data. Buttons, axes and mouse position are scheduled by frame, so a playtest is a JSON document that can be rerun and extended. A run can stop on an event rather than a frame count, for example until score >= 1, and snapshots can capture that final frame. A random_seed makes Python's random module and Pyxel's generator repeatable, though other timing and external state can still vary the frames. Images can come back inline as MCP image content, up to 12 per call.

It needs Python 3.11 or newer and installs Pyxel 3.0.1 or later; Pyxel 3 Cube 3D programs can be observed too. The README warns that script tools execute local Python and do not sandbox untrusted code. A separate pyxel-skill plugin teaches agents when to use each tool.

## Features

- **Headless playtests:** Run a script with scheduled input and a frame budget, no window needed.
- **Stop on a condition:** End a run when a game attribute holds, such as a score threshold.
- **Inline screenshots:** Return the frame as an image the model can look at directly.
- **Asset readers:** Inspect palettes, image banks, tilemaps and rendered audio.
- **Frame diffing:** Compare two PNGs to see pixel differences.
- **Seeded randomness:** Repeat runs with the same random seed.

## Good for

- Playtest a Pyxel game an agent just wrote and look at the result
- Check that a jump or score event fires at the expected frame
- Inspect tilemap and palette use in a project
- Compare screenshots before and after a code change
- Render and measure a sound or music asset

## Install

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

```sh
claude mcp add pyxel-mcp -- uvx pyxel-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": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

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

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

```json
{
  "mcpServers": {
    "pyxel-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pyxel-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 pyxel-mcp -- uvx pyxel-mcp
```

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

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

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

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

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

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

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

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

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

```json
{
  "mcpServers": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-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": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-mcp"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-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": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-mcp"
      ]
    }
  }
}
```

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

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

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

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

```json
{
  "mcpServers": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-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": {
    "pyxel-mcp": {
      "command": "uvx",
      "args": [
        "pyxel-mcp"
      ]
    }
  }
}
```

## Tools

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

- `validate` (name suggests: reads): Checks syntax and recognisable Pyxel patterns without executing.
- `run` (name suggests: changes): Runs headless frames with scheduled input, logs and snapshots.
- `pyxel_info`: Returns versions, stub paths, bundled examples and resource URIs.
- `read_palette` (name suggests: reads): Returns palette colours and image-bank indices in use.
- `read_image` (name suggests: reads): Returns image-bank pixels and an optional PNG.
- `read_tilemap` (name suggests: reads): Returns tile coordinates, usage counts and an optional render.
- `read_audio` (name suggests: reads): Returns a rendered sound or music WAV plus measurable data.
- `diff_frames`: Reports pixel differences between two PNG files.

## FAQ

### What Python version is needed?

Python 3.11 or newer; Pyxel 3.0.1 or later is installed as a dependency.

### Does Pyxel MCP sandbox the game script?

No. Scripts run as local Python in subprocesses without sandboxing untrusted code.

### Can Pyxel MCP handle Pyxel Cube 3D?

Yes, with the same run tool and snapshots.

### How do I add Pyxel MCP to Claude Code?

claude mcp add --scope user pyxel -- uvx pyxel-mcp

### What are the best alternatives to Pyxel MCP?

The closest alternatives to Pyxel MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

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

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

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