# debuff

Lets a coding agent attach to a live 2D game, step the simulation, read explained errors and replay a crash. Useful when you need evidence, not guesses.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 3
- Author: debuffjp
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/debuffjp/debuff/tree/HEAD/tooling/mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/debuff

## What it does

The server either hooks into the tab you already have open under `debuff dev` or spins up a private copy in a headless browser. In live mode the agent works on your session: every pause, step and parameter change lands in an activity log you can undo. Headless time moves only through `game_step`, so a scenario replays the same run exactly.

The tool list covers the whole loop. `inspect_project` and `list_assets` report dependencies, plugins, assets and warnings. `typecheck` runs the project's own `tsc`, which matters because Vite skips type checking — run it after edits. `build` produces the production bundle with a size report, `run_tests` executes the logic tests in `tests/` inside Node with no browser, and `fuzz` throws random input at the game until it crashes or loops, handing back a scenario that reproduces the failure. For performance there is `game_frames` with percentiles and the three slowest frames; `game_errors` tells you whether the fault is yours, a rejected call or a debuff bug, and points at the source line.

Start it from the game folder, or pass `--root <dir>` or set `DEBUFF_ROOT`. Projects created with `npm create debuff` ship a `.mcp.json`, so Claude picks the server up on its own.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add debuff -- npx -y @debuffjp/mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp -- npx -y @debuffjp/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@debuffjp/mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@debuffjp/mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp npx -y @debuffjp/mcp
```

## When to use it
- read the current scene, tick and frame stats without opening a browser
- catch a crash or a back-and-forth loop with random input and get a replay
- find out whether a runtime error is your code or the engine
- type-check after edits that Vite never checks
- save a PNG of the current frame for thumbnails or store art

## Example prompts
- Run `fuzz` and tell me which tick the game got stuck on
- Start the game headless and step the simulation ten times
- Run `typecheck` and `build`, then show me the size report

## Similar
- [harness-writing](https://affpapa.org/en/nevibecode/skills/harness-writing.md) — skill · 5400 installs
- [fuzzing-dictionary](https://affpapa.org/en/nevibecode/skills/fuzzing-dictionary.md) — skill · 5300 installs
- [golang-testing](https://affpapa.org/en/nevibecode/skills/affaan-m-golang-testing.md) — skill · 5000 installs
- [roblox-publish-checklist](https://affpapa.org/en/nevibecode/skills/roblox-publish-checklist.md) — skill · 1900 installs
- [ue-testing-debugging](https://affpapa.org/en/nevibecode/skills/ue-testing-debugging.md) — skill · 1300 installs
- [tune-enemy-ai](https://affpapa.org/en/nevibecode/skills/tune-enemy-ai.md) — skill · 1200 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
