DuckStation MCP

DuckStation MCP

Enables debugging of PlayStation games through DuckStation by providing MCP tools for execution control, register access, memory inspection, breakpoints, process management, and log analysis.

Category
Visit Server

README

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.

[!IMPORTANT] DuckStation must have its GDB server enabled and a game loaded before the MCP server can connect. This project uses DuckStation's existing GDB server and does not require modifying or rebuilding DuckStation.

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.

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

The 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.

Installation

Open PowerShell in the repository directory:

python -m pip install -e .

Run the server directly:

python -m duckstation_mcp

The 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

  1. Enable DuckStation's GDB server and load a game.
  2. Call connect using port 19000. The default auto_resume=true resumes emulation after DuckStation pauses for the new GDB client.
  3. Use pause before inspecting registers or single-stepping.
  4. Inspect state with get_registers and read_memory.
  5. Use set_breakpoint, step, and resume to control execution.
  6. Use dump_memory or dump_region when a binary memory dump is required.
  7. Call disconnect before 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
ram 0x00000000 2 MiB
ram_kseg0 0x80000000 2 MiB
ram_kseg1 0xA0000000 2 MiB
scratch 0x1F800000 1 KiB
bios 0x1FC00000 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. connect defaults to auto_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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured