mcp-pine
mcp-pine lets you inspect and manipulate emulated game memory, query game metadata, and control savestates on PlayStation 2 (PCSX2) and PlayStation 3 (RPCS3) emulators via the PINE protocol. It is well-suited for memory inspection, cheat/RAM hunting, savestate automation, and reverse engineering.
Connection & Status
pine_ping— Verify the emulator is reachable and get its version stringpine_get_status— Check if the emulator is running, paused, or shutdownpine_get_info— Retrieve full game metadata: title, serial code, disc CRC, game version, and run state
Memory Reading
pine_read8/16/32/64— Read unsigned 8/16/32/64-bit values from the emulated address spacepine_read_range— Bulk-read up to 4096 consecutive bytes as a hex dump
Memory Writing
pine_write8/16/32/64— Write unsigned 8/16/32/64-bit values to the emulated address space (RAM only; ROM writes are silently dropped)
Savestate Control
pine_save_state— Save the complete emulator state to a numbered slot (0–255)pine_load_state— Restore a previously saved state from a numbered slot (0–255)
Primary use cases: RAM/memory inspection, cheat hunting, game state mutation (e.g., editing HP, score, flags), snapshot/experiment/restore workflows, reverse engineering, and savestate automation.
Provides tools for reading and writing emulated memory (8/16/32/64-bit), triggering save/load states, and querying game metadata on PlayStation 2 emulators via the PINE protocol.
Provides tools for memory read/write and savestate control on PlayStation 3 emulators via the PINE protocol (tested with RPCS3).
mcp-pine
An MCP server for emulators that speak PINE (Protocol for Instrumentation of Network Emulators) — first-class support for PCSX2 (PS2) and RPCS3 (PS3), with target-aware tool descriptions so the agent sees the right memory map for whichever emulator it's pointed at. Exposes memory read/write and savestate control. Driven from MCP-compatible clients (Claude Desktop, Claude Code, etc.).
What you can do with it
Read & write emulated memory — 8/16/32/64-bit, anywhere in the emulator's address space (PS2 EE for PCSX2, PPU main memory for RPCS3)
Trigger save / load state to numbered slots
Query game metadata — title, serial, disc CRC, version
Inspect emulator state — running / paused / shutdown
Tool descriptions, memory-map context, and setup help are rendered per-target at startup — set PINE_TARGET=rpcs3 and every memory-tool description shows PS3 PPU addresses instead of PS2 EE addresses.
What you can't do (because PINE itself doesn't expose these):
Send controller input
Take screenshots
Step / pause / reset the emulator
This makes mcp-pine well-suited for memory inspection, cheat / RAM hunting, savestate automation, and reverse engineering, but not for "play games via Claude." For input + screenshot capability on Game Boy Advance, see the sister project mcp-mgba.
Related MCP server: mcp-mgba
How it works
+----------------+ stdio +----------------+ PINE socket +-----------------+
| MCP client | JSON-RPC | mcp-pine | (TCP or Unix) | Emulator |
| (Claude etc.) | -----------> | (Node.js) | ---------------> | (PINE server) |
+----------------+ +----------------+ +-----------------+mcp-pine opens a loopback connection to the emulator's PINE server (TCP on Windows, Unix domain socket on Linux/macOS) and translates each MCP tool call into a binary PINE message.
Compatible emulators
Emulator | Platform | PINE built in? | Default slot |
|
PCSX2 ≥ 1.7 (setup) | PlayStation 2 | ✅ Yes (toggle in settings) | 28011 |
|
RPCS3 (setup) | PlayStation 3 | ⚠️ Has IPC with PINE-compatible opcodes — verify before relying on it | 28012 |
|
Other emulators implementing the PINE spec should work out of the box once you point mcp-pine at the right slot — open an issue if you've tested one and it works.
Note on DuckStation (PS1): DuckStation had PINE support from May–September 2024 but dropped it in commit 19698559. Current builds have no PINE server. If upstream brings it back, PINE_TARGET=duckstation is reserved.
Setting PINE_TARGET does two things: (1) selects the right Unix socket filename on Linux/macOS, and (2) renders all tool descriptions, memory maps, and setup help for that emulator's address space. Default is pcsx2 for back-compat.
Requirements
An emulator with PINE enabled (see setup below)
Node.js 18+
Install
Option A — install from npm (recommended)
npm install -g mcp-pineVerify with mcp-pine (it prints a startup line and waits for stdio — Ctrl+C to exit).
Option B — npx (no install)
npx -y mcp-pineOption C — clone and develop
git clone https://github.com/dmang-dev/mcp-pine
cd mcp-pine
npm install # also runs the build via the `prepare` hookEmulator setup
PCSX2
Launch PCSX2 (1.7.x Qt or newer).
Settings → Advanced → Enable PINE Server (the option may live under a different submenu in some builds — search the settings for "PINE").
Default slot is 28011. If you change it, set
PINE_SLOTformcp-pine.Load any game.
That's it — no scripts, no console commands. PINE is always-on once the toggle is set.
RPCS3
RPCS3 has its own IPC implementation that mirrors PINE's opcode set, but the wire-level compatibility hasn't been thoroughly tested with this client. To try it:
Configuration → Advanced → Enable IPC server (or similar — check current RPCS3 docs).
Note the configured port.
Run with
PINE_TARGET=rpcs3 PINE_SLOT=<port> mcp-pine.
If something doesn't work, please file an issue with details.
Register with your MCP client
Claude Code (CLI)
claude mcp add pine --scope user mcp-pineVerify:
claude mcp list
# pine: mcp-pine - ✓ ConnectedClaude Desktop
Edit claude_desktop_config.json:
Platform | Path |
macOS |
|
Windows |
|
Linux |
|
{
"mcpServers": {
"pine": {
"command": "mcp-pine"
}
}
}Restart Claude Desktop after editing.
Other MCP clients
mcp-pine speaks standard MCP over stdio. Run it and connect any compatible client.
Configuration
Env var | Default | Purpose |
|
| Emulator name. Known values: |
| target default | PINE slot — also the TCP port on Windows. Defaults: |
|
| Override the host (TCP only) |
| (auto) | Override the full Unix socket path on Linux/macOS, bypassing automatic resolution |
Tools
Tool | Description |
| Verify the connection by querying the emulator version |
| Title, serial (e.g. |
| Just the running/paused/shutdown state |
| Read memory |
| Bulk read up to 4096 bytes (client-side pipelined PINE calls) |
| Write memory (RAM only — ROM writes are silently dropped) |
| Trigger save state to a numbered slot (0-255) |
| Trigger load state from a numbered slot (0-255) |
See docs/RECIPES.md for end-to-end examples (RAM hunting, struct decoding, snapshot-experiment-restore).
PlayStation 2 address space (PCSX2, default target)
Range | Region |
| EE main RAM (32 MiB) — start here for game data |
| Hardware registers (DMA, GIF, VIF) |
| VU0 / VU1 memory |
| GS privileged registers |
| IOP RAM (2 MiB) |
| IOP scratchpad |
| EE scratchpad (16 KiB) |
Troubleshooting
Symptom | Cause / Fix |
| Emulator isn't running, PINE isn't enabled in its settings, or the slot/port doesn't match. Check |
| The emulator rejected the request — most often because no game is loaded, or the address is unmapped. |
Reads return zeros | Address is in an unallocated region. Try |
Tool calls work but values look corrupted | Check endianness expectations — PINE returns little-endian; if you're interpreting strings, use |
| PCSX2's PINE server can wedge. Its request queue is fragile — if a third-party tool pipelines too aggressively (more than ~6 in-flight requests) it silently drops requests, and from then on every reply is mis-aligned with the wrong waiting client. Symptom: even a fresh |
| Expected. PINE has no native bulk read, so we issue calls serially (pipelining can wedge PCSX2 — see above). Loopback TCP is fast enough that this isn't usually a problem: measured ~52 ms for a full 4096-byte read on PCSX2 v2.6.3. For workloads that need lower latency and can tolerate occasional emulator restarts, set |
Development
npm install
npm run dev # tsc --watchQuick smoke test against a running PCSX2:
node .scratch/smoke.cjsLicense
Related
mcp-mgba — sister MCP server for the mGBA Game Boy Advance emulator (also includes button input + screenshot, which PINE doesn't expose)
PINE protocol spec — the underlying IPC standard
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmang-dev/mcp-pine'
If you have feedback or need assistance with the MCP directory API, please join our Discord server