dmang-dev/mcp-pine

๐ŸŽฎ Gaming
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Memory inspection and savestate control for PCSX2 and other emulators speaking the PINE protocol. Read/write 8/16/32/64-bit memory, save/load state slots, query game metadata. TCP on Windows, Unix sockets on Linux/macOS.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "dmang-dev-mcp-pine": {
      "command": "npx",
      "args": [
        "-y",
        "dmang-dev-mcp-pine"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

mcp-pine

npm version npm downloads CI License: MIT Snyk Socket Bundlephobia npmgraph

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

+----------------+    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

EmulatorPlatformPINE built in?Default slotPINE_TARGET
PCSX2 โ‰ฅ 1.7 (setup)PlayStation 2โœ… Yes (toggle in settings)28011pcsx2 (default)
RPCS3 (setup)PlayStation 3โš ๏ธ Has IPC with PINE-compatible opcodes โ€” verify before relying on it28012rpcs3

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)

npm install -g mcp-pine

Verify with mcp-pine (it prints a startup line and waits for stdio โ€” Ctrl+C to exit).

Option B โ€” npx (no install)

npx -y mcp-pine

Option 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` hook

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=<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-pine

Verify:

claude mcp list
# pine: mcp-pine - โœ“ Connected

Claude Desktop

Edit claude_desktop_config.json:

PlatformPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json
{
  "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 varDefaultPurpose
PINE_TARGETpcsx2Emulator name. Known values: pcsx2, rpcs3. Selects (1) the Unix socket file prefix on Linux/macOS (<target>.sock.<slot>), and (2) the memory map and setup help shown in tool descriptions. Unknown values pass through with a generic memory map.
PINE_SLOTtarget defaultPINE slot โ€” also the TCP port on Windows. Defaults: pcsx2=28011, rpcs3=28012. Set explicitly to override.
PINE_HOST127.0.0.1Override the host (TCP only)
PINE_SOCKET_PATH(auto)Override the full Unix socket path on Linux/macOS, bypassing automatic resolution

Tools

ToolDescription
pine_pingVerify the connection by querying the emulator version
pine_get_infoTitle, serial (e.g. SLUS-21274), disc CRC, game version, status
pine_get_statusJust the running/paused/shutdown state
pine_read8 / pine_read16 / pine_read32 / pine_read64Read memory
pine_read_rangeBulk read up to 4096 bytes (client-side pipelined PINE calls)
pine_write8 / pine_write16 / pine_write32 / pine_write64Write memory (RAM only โ€” ROM writes are silently dropped)
pine_save_stateTrigger save state to a numbered slot (0-255)
pine_load_stateTrigger 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)

RangeRegion
0x00100000-0x01FFFFFFEE main RAM (32 MiB) โ€” start here for game data
0x10000000Hardware registers (DMA, GIF, VIF)
0x11000000VU0 / VU1 memory
0x12000000GS privileged registers
0x1C000000-0x1C1FFFFFIOP RAM (2 MiB)
0x1F800000IOP scratchpad
0x70000000EE scratchpad (16 KiB)

Troubleshooting

SymptomCause / Fix
Cannot reach PINE serverEmulator isn't running, PINE isn't enabled in its settings, or the slot/port doesn't match. Check PINE_SLOT.
PINE FAIL response (0xFF)The emulator rejected the request โ€” most often because no game is loaded, or the address is unmapped.
Reads return zerosAddress is in an unallocated region. Try 0x00100000 first (almost always inside loaded EE RAM).
Tool calls work but values look corruptedCheck endianness expectations โ€” PINE returns little-endian; if you're interpreting strings, use read_range-style byte reads.
PINE call timed out (10s) from pine_ping after some heavy usePCSX2'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 pine_ping times out. Fix: fully restart PCSX2. Reconnecting alone won't help โ€” the corruption is on the emulator side.
pine_read_range slower than mGBA's read_rangeExpected. 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 PINE_PIPELINE_BATCH=2.

Development

npm install
npm run dev      # tsc --watch

Quick smoke test against a running PCSX2:

node .scratch/smoke.cjs

Debugging with the MCP Inspector

Browse and call this server's tools interactively with the MCP Inspector:

PINE_TARGET=pcsx2 npm run inspector

Build first if you've edited src/ since your last npm install (npm run build, or keep npm run dev running). Set PINE_TARGET (pcsx2 default, or rpcs3) and PINE_SLOT to match your emulator โ€” e.g. PINE_TARGET=rpcs3 PINE_SLOT=28012 npm run inspector. tools/list works even without an emulator connected; calling a tool needs PCSX2 (or RPCS3) running with PINE/IPC enabled.

License

MIT

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

Related MCP Servers

3aKHP/prts-mcp

๐Ÿ ๐Ÿ“‡ โ˜๏ธ ๐Ÿ  - MCP Server for Arknights, querying the PRTS Wiki API and serving auto-synced operator archives and voice lines from game data. Designed for fan-creation (ๅŒไบบๅ‰ตไฝœ) AI agents. Python (stdio/Docker) and TypeScript (Streamable HTTP) implementations.

๐ŸŽฎ Gaming0 views
alex-gon/thegamecrafter-mcp-server

๐Ÿ“‡ โ˜๏ธ - Design, manage, and price tabletop games on The Game Crafter. Browse catalogs, create projects, upload artwork, get pricing.

๐ŸŽฎ Gaming0 views
antics-gg/antics-mcp

๐Ÿ“‡ โ˜๏ธ - Deploy a single-file HTML game to a shareable multiplayer URL with rooms, state sync, and leaderboards. No backend or player accounts.

๐ŸŽฎ Gaming0 views
beckettlab/beckett-godot-mcp

๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Beckett โ€” MCP for Godot: a zero-sidecar GDScript editor addon that serves MCP over Streamable HTTP from inside the Godot 4 editor (no Node/Python sidecar). Reflection over any class, validate-before-write GDScript, scene/script/resource authoring, and a runtime play-test loop (play, screenshot, input, assert). MIT.

๐ŸŽฎ Gaming0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

Last checked: 7/28/2026, 10:17:00 PM

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.