DuckStation MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DuckStation MCPpause the game and show me the registers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DuckStation MCP
ENGLISH | KOREAN
DuckStation MCP is a Windows-focused Model Context Protocol server for debugging PlayStation games through DuckStation's built-in GDB Remote Serial Protocol server. It exposes execution control, register access, memory inspection, breakpoints, process management, and log analysis as MCP tools.
Basic debugging uses DuckStation's existing GDB server. Native background input and rendered-frame screenshots require the companion patched DuckStation build that implements theqDuckStation commands used by this server.
Features
Connect to DuckStation's GDB server and inspect connection status.
Pause, resume, and single-step emulation.
Read MIPS registers and list supported register names.
Read, write, and dump emulated memory.
Dump preset RAM, scratchpad, and BIOS regions.
Add and remove execution, read, write, and access breakpoints.
Locate, tail, and filter DuckStation logs by level, channel, or text.
List and terminate DuckStation processes when files are locked.
Capture covered or inactive DuckStation windows without activating them.
Send controller actions through native
qDuckStationinput, an optional virtual XInput pad, or targeted keyboard messages.Capture the rendered frame natively through
qDuckStation, with inactive-window fallback.
Related MCP server: gdb-mcp
Requirements
Windows
Python 3.10 or newer
DuckStation with its GDB server enabled
An MCP client that supports local stdio servers
The default GDB endpoint is 127.0.0.1:19000.
DuckStation setup
DuckStation normally stores its Windows configuration at %LOCALAPPDATA%\DuckStation\settings.ini. Enable the GDB server and file logging:
[Debug]
EnableGDBServer = true
GDBServerPort = 19000
[Logging]
LogToFile = trueThe equivalent GUI options are under Settings > Advanced > Debugging (Tweaks). Restart DuckStation after changing the settings, then load a game before calling connect.
The default log path is %LOCALAPPDATA%\DuckStation\duckstation.log.
Background capture and input
configure_background_input preserves existing Pad 1 bindings, enables
DuckStation background input, and adds keyboard plus XInput mappings. Restart
DuckStation only when the tool reports restart_required=true.
The input tools accept backend="auto", "native", "keyboard", or
"xinput". auto uses an already-connected qDuckStation GDB client first,
then tries the optional XInput backend, and finally falls back to targeted
PostMessageW keyboard events when vgamepad or its driver is unavailable.
The keyboard path posts directly to DuckStation's native render child and does
not activate, restore, or foreground the window.
take_screenshot captures the rendered frame through qDuckStation when GDB
is connected. Otherwise it falls back to capture_duckstation_window, which
uses PrintWindow(PW_RENDERFULLCONTENT) without changing the target window
state. Neither path brings DuckStation forward.
Installation
Open PowerShell in the repository directory:
python -m pip install -e .The keyboard backend has no extra dependency. Optional XInput support uses
vgamepad and an installed ViGEmBus driver:
python -m pip install -e ".[xinput]"Run the server directly:
python -m duckstation_mcpThe server communicates over stdio, so it normally runs under an MCP client rather than in a standalone interactive terminal.
Codex MCP configuration
To register DuckStation MCP as a local stdio server in Codex, add the following blocks to %USERPROFILE%\.codex\config.toml. Replace C:\path\to\Duckstation_MCP with the path where you cloned this repository.
[mcp_servers.duckstation]
command = "python"
args = ["-m", "duckstation_mcp"]
cwd = 'C:\path\to\Duckstation_MCP'
[mcp_servers.duckstation.env]
PYTHONPATH = 'C:\path\to\Duckstation_MCP\src'The python command must resolve to the interpreter where the project dependencies were installed. Restart Codex after changing config.toml.
Typical workflow
Enable DuckStation's GDB server and load a game.
Call
connectusing port19000. The defaultauto_resume=trueresumes emulation after DuckStation pauses for the new GDB client.Use
pausebefore inspecting registers or single-stepping.Inspect state with
get_registersandread_memory.Use
set_breakpoint,step, andresumeto control execution.Use
dump_memoryordump_regionwhen a binary memory dump is required.Call
disconnectbefore shutting down DuckStation.
If DuckStation is holding a file lock, call kill_duckstation. It first requests normal termination and escalates to a forced kill after the timeout. Set force=true to kill it immediately.
Memory region presets
Name | Address | Size |
|
| 2 MiB |
|
| 2 MiB |
|
| 2 MiB |
|
| 1 KiB |
|
| 512 KiB |
Use list_memory_regions to inspect these presets and dump_region to write one to a file.
Operational notes
DuckStation pauses emulation when a GDB client connects.
connectdefaults toauto_resume=true, but the connection can still cause a short visible interruption.Large memory dumps are split into
0x7000-byte requests to keep hex-encoded GDB replies below the socket response limit.Memory reads and writes can work while the game is running. Pause the game for stable register inspection and single-step operations.
A breakpoint hit produces an asynchronous stop reply. The client consumes that reply during the next MCP operation.
Safety
This server can modify emulated memory, alter execution flow, write memory dumps to arbitrary paths, and terminate DuckStation processes. Keep it bound to local MCP clients and review tool arguments before approving destructive operations.
Generated logs, dumps, virtual environments, bytecode, and build outputs should remain outside version control.
License
This project is distributed under the terms in LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Agent Replay Debugger MCP — record every agent step + deterministic replay. Step-debugger for
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server providing direct access to gdb-multiarch for debugging Nintendo Switch executables on Yuzu or hardware via a GDB stub. It features specialized tools for offset-based breakpoints, instruction patching, and frame-pointer backtraces relative to the game's base address.333MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to control GDB debugger via MCP protocol for local and remote debugging, supporting CTF Pwn, crash analysis, and ELF inspection.131MIT
- AlicenseAqualityCmaintenanceMCP server for PCSX2 and other emulators that speak the PINE protocol. Read and write 8/16/32/64-bit emulator memory and control save states for PlayStation-family emulation.1417 npm2MIT
- AlicenseAqualityBmaintenanceAn MCP server that exposes PPSSPP — the PlayStation Portable emulator — to any MCP-compatible client (Claude Desktop, Claude Code, etc.) via PPSSPP's built-in WebSocket debugger interface. Read and write PSP memory, drive games with button input, capture screenshots, set CPU breakpoints, inspect MIPS Allegrex registers — all through a clean tool interface. No bridge plugin needed; PPSSPP's debugg2319 npm8MIT