mcp-pine is an MCP server for communicating with emulators that support the PINE (Protocol for Instrumentation of Network Emulators) protocol. It provides native support for PCSX2 (PS2) and RPCS3 (PS3), and through target-aware tool descriptions, lets agents see the correct memory mappings for the emulator they are connected to. The server is driven by MCP-compatible clients (such as Claude Desktop, Claude Code, etc.).
Main capabilities
- Read and write emulated memory: supports 8/16/32/64-bit, and can access any location in the emulator's address space (PS2 EE for PCSX2, PPU main memory for RPCS3).
- Save/load state control: can trigger saving or loading states to numbered slots.
- Query game metadata: title, serial number, disc CRC, version.
- Check emulator status: running, paused, closed.
- Tool descriptions, memory mapping context, and setup help are rendered at startup according to the target—after setting PINE_TARGET=rpcs3, all memory tool descriptions show PS3 PPU addresses instead of PS2 EE addresses.
Features that cannot be implemented (because PINE itself does not expose them)
- Sending controller input
- Screenshots
- Single-stepping/pausing/resetting the emulator
Therefore mcp-pine is suitable for memory inspection, cheat/RAM searching, save automation, and reverse engineering, but not for "playing games through Claude." If you need Game Boy Advance input and screenshot capabilities, you can refer to the sister project mcp-mgba.
How it works
mcp-pine establishes a loopback connection to the emulator's PINE server (TCP on Windows, Unix domain sockets on Linux/macOS), and converts each MCP tool call into a binary PINE message.
Compatible emulators
Other emulators that implement the PINE specification should work out of the box after pointing mcp-pine at the correct slot; if you have tested that it works, you can submit an issue to report it.
Regarding DuckStation (PS1): DuckStation supported PINE from May to September 2024, but it was removed in commit 19698559. Current builds do not have a PINE server. If the aboveRestore this feature; PINE_TARGET=duckstation has been retained.
Setting PINE_TARGET has two effects: (1) selecting the correct Unix socket filename on Linux/macOS; (2) rendering all tool descriptions, memory maps, and setup help for that emulator's address space. The default value is pcsx2 to maintain backward compatibility.
Usage
Prerequisite: an emulator with PINE enabled (see setup below).
Installation options:
- Option A — Install from npm (recommended): after installation, verify with mcp-pine (it will print a startup line and wait on stdio; press Ctrl+C to exit).
- Option B — Use npx (no installation required).
- Option C — Clone and develop.
PCSX2 Setup
- Launch PCSX2 (1.7.x Qt or newer).
- Settings → Advanced → Enable PINE Server (in some builds the option may be in a different submenu; search for "PINE" in settings).
- The default slot is 28011. If you change it, you need to set PINE_SLOT for mcp-pine. No scripts or console commands are needed; once the setting is toggled, PINE is always on.
RPCS3 Setup
RPCS3 has its own IPC implementation that mirrors PINE's opcode set, but wire-level compatibility has not been fully tested with the client. Steps to try:
- Configuration → Advanced → Enable IPC Server (or a similar option; consult the current RPCS3 documentation).
- Note the configured port.
- Run with PINE_TARGET=rpcs3 PINE_SLOT=<port> mcp-pine. If you encounter problems, please file an issue with detailed information.
Registering with an MCP Client
Claude Code (CLI): edit claude_desktop_config.json, and restart Claude Desktop after editing. Other MCP clients: mcp-pine uses standard MCP over stdio; after running it, connect any compatible client.
See docs/RECIPES.md for end-to-end examples (RAM search, struct decoding, snapshot-experiment-restore).
Address Space
PlayStation 2 address space (PCSX2, default target).
Troubleshooting
Quick smoke test against a running PCSX2.
Debugging with MCP Inspector: you can interactively browse and call this server's tools via MCP Inspector. If you have edited src/ since the last npm install, build first (npm run build, or keep npm run dev running). Set PINE_TARGET (default pcsx2, or rpcs3) and PINE_SLOT to match the emulator — for example PINE_TARGET=rpcs3 PINE_SLOT=28012 npm run inspector. tools/list works even without an emulator connected; calling tools requires PCSX2 (or RPCS3) to be running with PINE/IPC enabled.
Related Projects
- mcp-mgba — a sister MCP server for the mGBA Game Boy Advance emulator (it also includes button input and screenshots that PINE does not expose).
- PINE protocol specification — the underlying IPC standard.
MCP server for PINE-speaking emulators (PCSX2, RPCS3, etc.) — exposes memory r/w and savestate control.