mcp-pine
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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.
How it works
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 | PINE_TARGET |
|------------------|---------------|-------------------------------------------|--------------|---------------|
| **PCSX2 ≥ 1.7** (setup) | PlayStation 2 | ✅ Yes (toggle in settings) | 28011 | pcsx2 (default) |
| **RPCS3** (setup) | PlayStation 3 | ⚠️ Has IPC with PINE-compatible opcodes — verify before relying on it | 28012 | rpcs3 |
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 22+**
Install
Option A — install from npm (recommended)
Verify with mcp-pine (it prints a startup line and waits for stdio — Ctrl+C to exit).
Option B — npx (no install)
Option C — clone and develop
Emulator setup
PCSX2
1. Launch PCSX2 (1.7.x Qt or newer).
2. **Settings → Advanced → Enable PINE Server** (the option may live under a different submenu in some builds — search the settings for "PINE").
3. Default slot is **28011**. If you change it, set PINE_SLOT for mcp-pine.
4. 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:
1. **Configuration → Advanced → Enable IPC server** (or similar — check current RPCS3 docs).
2. Note the configured port.
3. Run with PINE_TARGET=rpcs3 PINE_SLOT= mcp-pine.