Pyxel MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install pyxel-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add pyxel-mcp -- node "<FULL_PATH_TO_PYXEL_MCP>/dist/index.js"

Replace <FULL_PATH_TO_PYXEL_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

MCP server for the Pyxel retro game engine

pyxel-mcp

MCP server for Pyxel, a retro game engine for Python. Enables AI to autonomously run, verify, and iterate on retro game programs.

Features

Run & Capture

  • run_and_capture — Run a Pyxel script and capture a screenshot after N frames
  • capture_frames — Capture screenshots at multiple frame points for animation verification
  • play_and_capture — Play a game by sending simulated input and capture screenshots

Inspect & Debug

  • validate_script — Validate a Pyxel script without running it
  • inspect_state — Read game object attributes at specific frames for debugging
  • inspect_screen — Capture screen as a compact color index grid
  • compare_frames — Compare screenshots at two frames and report pixel differences

Visual Analysis

  • inspect_sprite — Inspect sprite pixel data from a Pyxel image bank
  • inspect_layout — Analyze screen layout, text alignment, and visual balance
  • inspect_palette — Analyze color usage and contrast in a Pyxel screenshot
  • inspect_bank — Visualize an entire Pyxel image bank as a single screenshot
  • inspect_tilemap — Inspect tilemap content, tile usage, and layout

Audio

  • render_audio — Render a Pyxel sound or music to WAV and return waveform analysis

Utility

  • pyxel_info — Get Pyxel installation info: package location, examples path, and API stubs path

Getting Started

Just ask your AI agent (e.g. Claude Code) to create a Pyxel game. The agent will automatically discover and set up pyxel-mcp from the MCP Registry.

Manual Installation

  1. Install the package:
pip install pyxel-mcp
  1. Register pyxel-mcp as an MCP server in your AI agent. For Claude Code, add to your project's .mcp.json:
{
  "mcpServers": {
    "pyxel": {
      "type": "stdio",
      "command": "pyxel-mcp"
    }
  }
}

MCP Registry

mcp-name: io.github.kitao/pyxel-mcp

License

MIT

Tools (14)

run_and_captureRun a Pyxel script and capture a screenshot after N frames
capture_framesCapture screenshots at multiple frame points for animation verification
play_and_capturePlay a game by sending simulated input and capture screenshots
validate_scriptValidate a Pyxel script without running it
inspect_stateRead game object attributes at specific frames for debugging
inspect_screenCapture screen as a compact color index grid
compare_framesCompare screenshots at two frames and report pixel differences
inspect_spriteInspect sprite pixel data from a Pyxel image bank
inspect_layoutAnalyze screen layout, text alignment, and visual balance
inspect_paletteAnalyze color usage and contrast in a Pyxel screenshot
inspect_bankVisualize an entire Pyxel image bank as a single screenshot
inspect_tilemapInspect tilemap content, tile usage, and layout
render_audioRender a Pyxel sound or music to WAV and return waveform analysis
pyxel_infoGet Pyxel installation info: package location, examples path, and API stubs path

Configuration

claude_desktop_config.json
{"mcpServers": {"pyxel": {"type": "stdio", "command": "pyxel-mcp"}}}

Try it

Create a simple Pyxel game script that displays a moving square and verify it runs correctly.
Inspect the current game state at frame 60 to debug why the player character is not jumping.
Analyze the screen layout of my current Pyxel game to ensure the text is properly aligned.
Render the audio for my game's background music and check the waveform analysis.

Frequently Asked Questions

What are the key features of Pyxel MCP?

Run and capture screenshots of Pyxel scripts at specific frames. Inspect game state, sprites, tilemaps, and screen layouts. Compare frames to detect visual regressions. Analyze color palettes and contrast. Render and analyze audio from Pyxel sound banks.

What can I use Pyxel MCP for?

Automated testing of retro game mechanics and visual output. AI-assisted debugging of game object attributes and state. Visual verification of sprite and tilemap assets. Iterative game development with autonomous AI feedback loops.

How do I install Pyxel MCP?

Install Pyxel MCP by running: pip install pyxel-mcp

What MCP clients work with Pyxel MCP?

Pyxel MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Pyxel MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare