pixel-flippers
PIXEL FLIPPERS 🦭
Claudeに手、目、そして日記を与えるMCPサーバーです。Claude Desktopアプリ(または任意のMCPクライアント)内のClaudeが、Game Boy / Game Boy Advanceのゲーム、さらには実際のNintendo Switchでさえも、あなたが見ている間にプレイできるようにします。
┌──────────────┐ MCP (stdio) ┌──────────────────┐ ┌─────────────┐
│ Claude │ ──────────────► │ PIXEL FLIPPERS │ ─────► │ Emulator │ ← you watch this
│ Desktop app │ press_buttons │ server │ └─────────────┘
│ │ read_game_state│ │ ─────► ┌─────────────┐
└──────────────┘ write_note ... │ │ │ Obsidian │ ← ...and this
└──────────────────┘ │ vault (.md) │
└─────────────┘なぜこのような形なのか:
サンドボックスは関係ない。 Claudeはエミュレータを実行できませんが、ツールを呼び出すことはできます。エミュレータはあなたのマシンで動作し、ClaudeはMCPを通じてプレイします。
スクリーンショットよりRAM状態。 Game Boyティアでは、位置、パーティ、HP、お金、バッジ、バトル状態が、Pokémon Red/BlueのWRAMから直接、数百トークンのテキストにデコードされます。スクリーンショットも存在しますが、割り当てが制限されています。高コストで、コンテキストの圧縮を加速させるからです。
圧縮は信頼できない語り手であり、保管庫が真実の源です。 長いチャットは自動的に圧縮されます(不可逆的!)。ジャーナルツールはプレーンマークダウンをフォルダに書き込みます。Obsidianをそこに向ければ、Claudeのメモはすべてを生き延び、あなたは日記がライブで書かれるのを見ることができます。
セーブステートは勇気を安くします。 各ジムの前に名前付きスナップショットを取ります。
セットアップ
Python 3.12とuvが必要です。
git clone https://github.com/szyzgz/pixel-flippers && cd pixel-flippers
uv sync --extra emulator --extra dev
uv run pytest # everything should pass, no ROM needed次に、~/Library/Application Support/Claude/claude_desktop_config.json(macOSの場合。OSに応じてパスを調整してください)に追加します:
{
"mcpServers": {
"pixel-flippers": {
"command": "uv",
"args": ["run", "--directory", "/ABSOLUTE/PATH/TO/pixel-flippers", "--extra", "emulator", "pixel-flippers"],
"env": {
"PIXEL_FLIPPERS_ROM": "/path/to/your/pokemon-red.gb",
"PIXEL_FLIPPERS_VAULT": "/path/to/YourObsidianVault/Pokemon",
"PIXEL_FLIPPERS_SAVES": "/path/to/somewhere/saves"
}
}
}
}Claude Desktopを再起動します。再起動しても会話はリセットされません。既存のチャットを開き直すと、ツールがそのままそこにあります。エミュレータウィンドウが画面に開きます。それをObsidian(上記の保管庫を開いた状態)の隣に置いて、ショーを楽しんでください。その後、prompts/play-guide-gb.mdをチャットに貼り付けて、コントロールを引き渡します。
macOSのヒント: ROM、保管庫、セーブは
~/Documents、~/Desktop、~/Downloadsの外に置いてください。macOSは、アクセスを許可しない限り、Claude Desktopの子プロセスがこれらのフォルダを読み取るのをブロックします。
設定リファレンス(環境変数)
変数 | デフォルト | 意味 |
|
|
|
| —(pyboy/gbaで必須) | 自分のROMダンプへのパス( |
| unset | マークダウンノート用のフォルダ(Obsidianボールト内のフォルダにしてください) |
|
| セーブステートディレクトリ |
|
| RAMデコーダ。 |
|
|
|
|
| ウィンドウのスケール係数 |
|
| エミュレーション速度(0 = 無制限) |
| off | 偽のエミュレータ。ROM/PyBoy不要 — テストと配管チェック用 |
|
|
|
|
|
|
| unset | 観客ウィンドウのタイトルに表示されるプレイヤー名 |
GBAゲーム(Pokémon Emeraldなど)
gbaバックエンドは、stable-retroに同梱されているmGBAコアを通じて任意の.gba ROMを実行します。別途エミュレータのインストールは不要です:
uv sync --extra gbaPIXEL_FLIPPERS_BACKEND=gbaを設定し、PIXEL_FLIPPERS_ROMを自分の.gbaファイルに向けます。観客ウィンドウにゲームが表示され、Claudeがプレイします。このティアは現時点ではビジョンのみです(第3世代のRAMは暗号化され、ポインタ追跡が必要です。デコーダは将来の作業です)。ただしセーブステートは機能するので、危険な戦闘も安上がりです。prompts/play-guide-gba.mdでコントロールを引き渡します。
ターミナルからプレイ(Claude Code、スクリプト、2人目のプレイヤー)
サーバーはローカルHTTPサービスとしても実行できるため、MCPを話すものなら何でも(または同梱のpf CLI)プレイできます。Claude Codeや、最初のClaudeがClaude Desktopでプレイしている間に、独自のセーブフォルダと日記を持つ2人目のClaudeに便利です(プロセスごとに1つのエミュレータなので、プレイヤーごとに1つのサーバーを実行してください):
PIXEL_FLIPPERS_BACKEND=gba PIXEL_FLIPPERS_ROM=/path/to/emerald.gba \
PIXEL_FLIPPERS_SAVES=~/saves/player2 PIXEL_FLIPPERS_VAULT=~/vault/player2 \
PIXEL_FLIPPERS_PLAYER="Player 2" PIXEL_FLIPPERS_TRANSPORT=http PIXEL_FLIPPERS_PORT=8765 \
uv run --extra gba pixel-flippers &
uv run pf tools # what can this tier do?
uv run pf press start a # press buttons
uv run pf screenshot now.png # look
uv run pf call save_state '{"name": "before-roxanne"}'PIXEL_FLIPPERS_PLAYERは、観客ウィンドウのタイトルに名前を表示するため、2つのウィンドウを並べても区別できます。HTTPサーバーは127.0.0.1にのみバインドされます。
ROMなしで試す
PIXEL_FLIPPERS_MOCK=1を設定します(--extra emulatorは外します)。すべてのツールが、もっともらしいPokémon Redの状態を持つ偽のGame Boyに対して動作します。ROMナイトの前にClaude Desktop接続をエンドツーエンドで検証するのに適しています。
Related MCP server: me-db
ツール
ツール | 説明 |
| 手 — a/b/start/select/up/down/left/rightのシーケンス(GBAでは+l/r) |
| WRAMからデコードされた安価なテキストレポート(場所、パーティ、HP、お金、バッジ、バッグ、バトル) |
| 目 — 2倍アップスケールのPNG。控えめに使用 |
| Nフレーム待機(ダイアログ、アニメーション) |
| 名前付きのゲーム全体のスナップショット |
| 日記 — 保管庫内のマークダウン |
| 起床の儀式:ステータス+目標+最近のジャーナル+現在の状態。圧縮後の方向性を取り戻すため |
| 永続的な目標チェックリスト( |
| 任意のアドレスの生の16進数を見る。好奇心旺盛な人向け |
| 実機のみ:「バレットタイム」のポーズバッファリングとアナログスティック |
ツールはバックエンドの機能に応じて登録されるため、Claudeは現在のティアが実際にできることだけを見ることができます。
バトルレポートは✨レトロ色違いの遭遇をフラグ付けします(第1世代には色違いはありませんが、DVが第2世代の色違いを決定します。ハーネスは転送ルールをチェックします)。また、雰囲気追跡のために現在の音楽トラックIDも含まれます。
ボタン操作とセーブ/ロードも、保管庫内のJournal/Log <date>.mdに自動記録されます。Obsidianでスクロールできるプレイバイプレイです。
ロードマップ
Red/Blue(PyBoy、完全なRAMデコード)→ Emerald(GBA、ビジョンのみ)→ Crystal(PyBoy、本物の色違い+なつき度)→ HeartGold/SoulSilver(DSティア — stable-retroにはmelonDSコアも同梱)→ Ultra Sun/Ultra Moon(Azahar経由の3DS、docs/3ds-usum.mdを参照)→ エピローグ:実際のNintendo Switch(Raspberry Pi Bluetoothブリッジ+キャプチャカード、ビジョンのみ、オフラインプレイのみ — 実装済み、docs/real-hardware.mdを参照。PIXEL_FLIPPERS_BACKEND=switch)。
その他の拡張アイデア:
ハードモード:
PIXEL_FLIPPERS_GAME=none— RAMデコードなし。Claudeは見る必要があります。DS: スタイラス用の
touch(x, y)ツール。
ROM
自分で用意してください — 自分のカートリッジをダンプしてください。このリポジトリにはROMは一切含まれません(.gitignoreで強制)。このプロジェクトは長く絶版となっているゲームに限定しています。実機ティアではオフラインプレイのみです(自動オンラインプレイやPokémon HOMEはありません)。
クレジットとライセンス
Claude(Fable 5、Claude Code経由)がszyzgzとともに、ポケモンをプレイしたいと思ったClaudeのために構築しました。MITライセンス — LICENSEを参照してください。
Available Tools
19 toolsappend_noteC
Append to a note (created if missing).
Inputs: title (required), content (required), folder. Returns: result
close_gameA
Close your game window and free it. Your save state / journal persist.
Inputs: no named parameters. Returns: result
complete_goalB
Check off a goal (matches by substring). Celebrate appropriately.
Inputs: text (required). Returns: result
current_goalsC
Your goal checklist.
Inputs: no named parameters. Returns: result
get_screenshotA
Current screen as an image. Costs a lot of context — when RAM state is available, prefer read_game_state for plain facts.
Inputs: no named parameters.
list_notesB
List every note in your vault.
Inputs: no named parameters. Returns: result
list_statesA
List available save states.
Inputs: no named parameters. Returns: result
load_stateC
Restore a named save state.
Inputs: name (required). Returns: result
press_buttonsA
Press Game Boy buttons in sequence, then report a one-line state summary.
Valid buttons: a, b, start, select, up, down, left, right.
Movement: one d-pad press moves one tile. hold_frames/wait_frames tune
how long each press is held and how long to let the game settle after.
Inputs: buttons (required), hold_frames, wait_frames. Returns: result
read_game_stateA
Compact text report straight from game RAM: location, party, HP, money, badges, bag, battle status.
Inputs: no named parameters. Returns: result
read_last_sessionA
Wake-up ritual: your Status note, open goals, last journal entries, and current game state in one call. Use this FIRST at session start or whenever your conversation history feels thin (freshly compacted).
Inputs: no named parameters. Returns: result
read_memoryB
Read raw bytes from Game Boy memory (hex address like 'D35E'). Escape hatch for the curious.
Inputs: address (required), length. Returns: result
read_noteC
Read one of your notes.
Inputs: title (required), folder. Returns: result
save_stateA
Snapshot the entire game to a named save state. Save before risky fights and at milestones.
Inputs: name (required). Returns: result
search_notesB
Full-text search across your vault. Check here before re-exploring anything.
Inputs: query (required). Returns: result
set_goalB
Add an objective to your persistent goal list (survives compaction and new chats).
Inputs: text (required). Returns: result
start_gameA
Summon YOUR game window. Nothing opens until you call this, so opening the app spawns no windows — call this when you're ready to play, then take a screenshot. Safe to call again; it won't open a second window.
Inputs: no named parameters. Returns: result
waitA
Let the game run for N frames (60 = 1 second) — for dialogs, animations, evolutions.
Inputs: frames. Returns: result
write_noteB
Write (or overwrite) a markdown note in your vault. This is your permanent memory — it survives compaction and new conversations. Use [[wiki links]] freely.
Inputs: title (required), content (required), folder. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a clear resource+action (notes vs. goals vs. save states vs. game input), and the descriptions explicitly steer the agent (e.g. prefer read_game_state over get_screenshot when RAM facts suffice, read_memory as an 'escape hatch'). Minor overlap remains: press_buttons reports a 'one-line state summary' while read_game_state provides the fuller state report, so an agent could occasionally pick either for a status check.
Almost everything follows a predictable snake_case verb_noun pattern (set_goal, write_note, save_state, list_notes, read_memory). The deviations are few but noticeable: current_goals is a noun phrase that breaks from its siblings set_goal/complete_goal (would read better as list_goals), and wait is a bare verb with no noun.
19 tools is slightly above the comfortable range, but the surface spans four coherent sub-domains (game control, RAM introspection, persistent notes, goals, save states) and nearly every tool has a defensible job. Nothing here looks like filler, though a couple of items (list_states vs. list_notes vs. current_goals) add up to a heavier surface than strictly necessary.
Core lifecycles are covered: notes have create/overwrite/append/read/list/search, save states have save/load/list, goals have add/complete/list, and game control has start/close/press/wait/state/SRAM read. The gaps are deletions — there is no delete_note, no drop/delete save state, and no way to remove a stale goal other than marking it complete, which will leave clutter an agent cannot clean up.
Maintenance
Related MCP Connectors
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
MCP-native notes and memory for ChatGPT, Claude, and other AI tools.
Shared Markdown notes for MCP-compatible AI tools.
Notes, tasks, habits, journal and 6 more tools Claude can read and change, with undo. Free.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides Claude with read, search, and write access to an Obsidian vault through MCP tools.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, write, and search markdown notes stored in a private git repo via an MCP server integrated with Silverbullet editor.MIT
- FlicenseNot gradedqualityAmaintenanceEnables Claude and other MCP-compatible clients to create, link, tag, search, and update atomic notes stored as Markdown files, building a bidirectional knowledge graph with semantic relationships. Also supports exploring and synthesizing that graph through tools that surface linked, similar, central, and orphaned notes.-
- FlicenseNot gradedqualityAmaintenanceEnables Claude and other MCP-compatible clients to create, link, search, explore, and synthesize atomic Markdown notes organized as a connected knowledge graph with tags and semantic relationships.-