# debuff MCP server

> Enables AI agents to inspect, build, test, and play 2D web games using real-time state, frame data, and automated fuzzing.

- Repository: https://github.com/debuffjp/debuff
- Page: https://hostedmcp.org/servers/debuffjp/debuff
- Transport: stdio
- Stars: 12
- License: MIT
- Latest version: 0.35.0

## Install

### Claude Code

```sh
claude mcp add debuff -- npx -y @debuffjp/mcp
```

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

```json
{
  "mcpServers": {
    "debuff": {
      "command": "npx",
      "args": [
        "-y",
        "@debuffjp/mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "debuff": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@debuffjp/mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"debuff","type":"stdio","command":"npx","args":["-y","@debuffjp/mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "debuff": {
      "command": "npx",
      "args": [
        "-y",
        "@debuffjp/mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add debuff -- npx -y @debuffjp/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.debuff]
command = "npx"
args = ["-y", "@debuffjp/mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user debuff npx -- -y @debuffjp/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "debuff": {
      "command": "npx",
      "args": [
        "-y",
        "@debuffjp/mcp"
      ]
    }
  }
}
```

## Tools (22)

- `inspect_project`
- `list_assets`
- `typecheck`
- `build`
- `run_tests`
- `run_scenarios`
- `fuzz`
- `game_start`
- `game_step`
- `game_pause`
- `game_frames`
- `game_notes`
- `game_rewind`
- `game_replay`
- `game_input`
- `game_state`
- `game_command`
- `game_capture`
- `game_clip`
- `game_errors`
- `game_stop`
- `report_papercut`

## FAQ

### How can I run the server with Claude Code?

You can add the server to Claude Code using the command: `claude mcp add debuff -- npx -y @debuffjp/mcp`.

### Can the AI agent play the game in a browser?

Yes, the agent can attach to a live game running in a browser tab or run a private copy in a headless browser.

### What happens during a fuzz test?

The fuzz tool plays with random input, and any crashes, stuck states, or loops are provided with an explained error and a replayable scenario.

### How does the agent handle runtime errors?

The `game_errors` tool provides explained runtime errors, identifying the source line and whether the issue lies in your code, a rejected call, or a debuff bug.
