Logo PCSX2 MCP

PCSX2 MCP

Cộng đồng
hkmodd

AI-powered PCSX2 debugger bridge via Model Context Protocol (MCP). Set breakpoints, read registers, disassemble MIPS, inspect memory all from your AI coding assistant. Pre-built, plug-and-play.

Nhà phát hànhhkmodd
Kho mãPCSX2-MCP
Ngôn ngữJavaScript
Bản fork
8
Sao
43
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépGPL-3.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    PCSX2 MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    43 sao và 8 bản fork từ kho mã được liên kết.

PCSX2-MCP

A PCSX2 modification and MCP server

Control a PS2 emulator from your AI coding assistant. Set breakpoints, read registers, disassemble MIPS, inspect memory — all via MCP tools.

┌─────────────┐    stdio (MCP)    ┌─────────────────────┐    TCP:21512    ┌─────────────────┐
│ AI Assistant │ ◄──────────────► │  pcsx2-mcp-server   │ ◄────────────► │  PCSX2 Emulator │
│ (Antigravity │                  │  (Node.js bridge)    │                │  + DebugServer   │
│  Claude etc) │                  │                      │ ◄────────────► │  + Pine IPC      │
└─────────────┘                  └─────────────────────┘    TCP:28011    └─────────────────┘

⚠️ Repository vs Release — Read This First

This git repo does NOT contain the full PCSX2 source code. We only provide the source of our modifications to avoid wasting storage uploading 1 GB of upstream code.

This Git RepoGitHub Release (zip)
PurposeSource code onlyReady-to-run package
PCSX2 binaries❌ Not included✅ Pre-built pcsx2-qt.exe + all DLLs
PCSX2 full source❌ Not included (see upstream)❌ Not included
DebugServer patch✅ pcsx2-plugin/DebugServer.cpp + .h✅ Included (already compiled in)
MCP server source✅ pcsx2-mcp-server/src/✅ Pre-built dist/ + node_modules/
Setup script✅ setup-mcp.bat✅ Included

Want to just USE it? → Download the latest Release zip. Everything is pre-built.

Want to modify or rebuild? → Clone this repo, then follow Building from Source below.


Quick Start (3 steps)

1. Download

Grab the latest release from GitHub Releases — extract the zip anywhere.

2. Setup

Run setup-mcp.bat — it checks Node.js and writes the MCP config for you.

Requires Node.js ≥ 18. The setup script will tell you if it's missing.

3. Use

  1. Launch pcsx2-qt.exe from the extracted folder
  2. Load a PS2 game (ISO or disc)
  3. Restart your AI assistant (Antigravity / Claude Desktop)
  4. Ask: "Connect to PCSX2 and show me the thread list"

That's it! Your AI assistant now has 30 debugging tools for PS2.


Manual MCP Configuration

If setup-mcp.bat doesn't work or you want to configure manually:

Edit ~/.gemini/antigravity/mcp_config.json:

json
{
  "mcpServers": {
    "pcsx2": {
      "command": "node",
      "args": ["<path-to-extracted>/pcsx2-mcp-server/dist/index.js"],
      "disabled": false
    }
  }
}

Edit %APPDATA%\Claude\claude_desktop_config.json:

json
{
  "mcpServers": {
    "pcsx2": {
      "command": "node",
      "args": ["<path-to-extracted>/pcsx2-mcp-server/dist/index.js"]
    }
  }
}

Create .vscode/mcp.json in your project:

json
{
  "servers": {
    "pcsx2": {
      "command": "node",
      "args": ["<path-to-extracted>/pcsx2-mcp-server/dist/index.js"]
    }
  }
}

What's Inside

DebugServer (built into PCSX2)

A custom TCP server injected into PCSX2 that listens on port 21512. When the emulator starts, you'll see:

[DebugServer] Listening on 127.0.0.1:21512

MCP Server (Node.js bridge)

Translates MCP tool calls into DebugServer TCP commands. Also supports Pine IPC (port 28011) as fallback for basic memory R/W and save states.


All 30 Tools

Connection & Status

ToolDescription
pcsx2_connectConnect to PCSX2 (auto-detects DebugServer or Pine)
pcsx2_statusConnection type + emulator status

Memory

ToolDescription
pcsx2_read_memoryRead N bytes as hex dump
pcsx2_write_memoryWrite hex data to address
pcsx2_read_stringRead null-terminated string
pcsx2_find_patternSearch for hex pattern (?? wildcards)
pcsx2_memory_diffSnapshot + diff memory regions

Registers

ToolDescription
pcsx2_read_registersAll 7 categories (GPR, CP0, FPU, VU…), full 128-bit
pcsx2_write_registerWrite register by category + index

Disassembly

ToolDescription
pcsx2_disassembleNative MIPS disassembly at address
pcsx2_evaluateEvaluate expressions: v0 + 0x100, gp - 4

Breakpoints & Watchpoints

ToolDescription
pcsx2_set_breakpointSet BP with optional condition + description
pcsx2_remove_breakpointRemove by address
pcsx2_list_breakpointsList all with condition/status
pcsx2_set_watchpointWatch read/write/access/onChange
pcsx2_remove_watchpointRemove watchpoint
pcsx2_list_watchpointsList with hit counts
pcsx2_clear_all_breakpointsRemove ALL breakpoints + watchpoints

Execution Control

ToolDescription
pcsx2_stepStep one instruction
pcsx2_step_overStep over JAL/JALR calls
pcsx2_continueResume execution
pcsx2_pauseHalt emulator

System

ToolDescription
pcsx2_get_threadsList EE/IOP BIOS threads
pcsx2_get_modulesList loaded IOP modules
pcsx2_get_backtraceCall stack walk — entry points, PCs, stack pointers, frame sizes
pcsx2_game_infoGame title/ID/version (Pine)
pcsx2_save_stateSave state to slot 0-9 (Pine)
pcsx2_load_stateLoad state from slot (Pine)

PS2Recomp Integration

ToolDescription
ps2recomp_lookup_functionSearch overrides by address or name
ps2recomp_list_overridesList all function overrides

Example Workflows

Reverse engineering a function

> "Connect to PCSX2"
> "Disassemble 40 instructions at 0x001000E0"
> "Set breakpoint at 0x001000E0 with condition v0 == 5"
> "Continue and wait for breakpoint"
> "Read registers"
> "Read 256 bytes at the address in a0"

Finding a memory value with diffing

> "Take a memory snapshot of 0x200000, size 4096"
  (do something in the game)
> "Diff the snapshot to find changes"

Debugging a crash with call stack

> "Pause the emulator"
> "Get the backtrace"
> "Disassemble the function at entry 0x00125bf4"
> "Read registers to see what went wrong"

Comparing with PS2Recomp

> "Look up function at 0x0072e5c0 in PS2Recomp"
> "Set breakpoint at 0x0072e5c0 in PCSX2"
> "Step through and compare register values"

Architecture

Git Repository

PCSX2-MCP/                       ← source code only, lightweight
├── pcsx2-plugin/
│   ├── DebugServer.cpp          ← our custom patch for PCSX2 (this is the only PCSX2 modification)
│   └── DebugServer.h
├── pcsx2-mcp-server/
│   ├── src/index.ts             ← MCP server source (TypeScript)
│   ├── src/debug-server-client.ts
│   ├── src/pine-client.ts
│   ├── package.json
│   └── tsconfig.json
├── README.md
├── setup-mcp.bat
└── package-release.ps1

GitHub Release (zip)

PCSX2-MCP-v1.0.0-win64/          ← ready to run, everything pre-built
├── pcsx2-qt.exe                 ← PCSX2 with DebugServer already compiled in
├── *.dll                        ← Qt + runtime dependencies
├── platforms/                   ← Qt platform plugins
├── resources/                   ← PCSX2 shaders, GameDB, etc
├── pcsx2-mcp-server/
│   ├── dist/index.js            ← compiled MCP server
│   └── node_modules/            ← pre-installed dependencies
├── source/
│   ├── DebugServer.cpp          ← patch source (GPL compliance)
│   └── DebugServer.h
├── setup-mcp.bat
└── README.md

Building from Source

Prerequisites

ComponentRequires
PCSX2Git, CMake ≥ 3.22, Ninja, MSVC (Visual Studio 2022), Qt 6
MCP ServerNode.js ≥ 18 (includes npm)

All MCP server dependencies (@modelcontextprotocol/sdk, zod, typescript) are declared in package.json and installed automatically by npm install. You do not need to install them manually.

PCSX2

powershell
# 1. Clone the upstream PCSX2 source (we don't include it in this repo to save space)
git clone https://github.com/PCSX2/pcsx2.git pcsx2-src
cd pcsx2-src

# 2. Copy our DebugServer patch into the PCSX2 source tree
cp ../pcsx2-plugin/DebugServer.cpp pcsx2/DebugTools/
cp ../pcsx2-plugin/DebugServer.h pcsx2/DebugTools/

# 3. Add to CMakeLists.txt (in pcsx2/DebugTools/)
# Add DebugServer.cpp and DebugServer.h to the source list

# 4. Build with CMake + Ninja + MSVC
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target pcsx2-qt

MCP Server

bash
cd pcsx2-mcp-server

# Install all dependencies (MCP SDK, Zod, TypeScript, etc.)
npm install

# Compile TypeScript → dist/index.js
npm run build

Troubleshooting

IssueFix
"No Qt platform plugin"Make sure platforms/qwindows.dll exists next to pcsx2-qt.exe
DebugServer not listeningCheck PCSX2 console for [DebugServer] Listening on 127.0.0.1:21512
"No connection" from toolsCall pcsx2_connect first
Pine tools failEnable Pine IPC: PCSX2 Settings → Advanced → Enable Pine IPC
Breakpoints don't triggerGame must be running (not in BIOS/menu)

License

  • PCSX2: GPL-3.0 (same as upstream)
  • DebugServer plugin: GPL-3.0 (derivative work)
  • MCP Server: MIT

The GitHub Release includes a pre-built PCSX2 binary (GPL-3.0). Full source for our modifications is provided in pcsx2-plugin/ (this repo) and also bundled in the release zip under source/. The unmodified PCSX2 source is available at github.com/PCSX2/pcsx2.

Cài đặt

TypingMind
{
  "mcpServers": {
    "pcsx2-mcp": {
      "command": "node",
      "args": [
        "<path-to-extracted>/pcsx2-mcp-server/dist/index.js"
      ]
    }
  }
}

Dùng MCP PCSX2 MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối PCSX2 MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm PCSX2 MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của PCSX2 MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "pcsx2-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của PCSX2 MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của PCSX2 MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng PCSX2 MCP giúp tôi làm việc này không?
PCSX2 MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng PCSX2 MCP.

Câu hỏi thường gặp

Máy chủ MCP PCSX2 MCP dùng để làm gì?

PCSX2 MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP PCSX2 MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng PCSX2 MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP PCSX2 MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối PCSX2 MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP PCSX2 MCP với TypingMind?

PCSX2 MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP PCSX2 MCP cung cấp những công cụ nào trong TypingMind?

PCSX2 MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP PCSX2 MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu PCSX2 MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇