dos-mcp
This MCP server provides loopback-only control and inspection tools for a DOSBox-X QMP emulator session.
Check emulator/debugger status and pause, resume, or reset DOS.
Swap pre-mounted floppy images for A: or B:.
Send simultaneous key chords, press/release individual keys, or type paced US-ASCII text.
Break GDB at the next DOS EXEC entry point.
Read bounded physical memory, optionally writing larger reads to an absolute output path.
Capture the current DOSBox-X screen as a PNG.
Save or load emulator state at absolute host paths.
Use loopback-only QMP with configurable port and timeout.
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., "@dos-mcp pause the emulator and read 64 bytes at 0x4800"
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.
dos-mcp
Small MCP tools for a loopback-only DOSBox-X QMP server. Ghidra's maintained GDB TraceRMI agent owns debugger state; this server supplies emulator control, paced keyboard input, bounded memory reads, screenshots, and snapshots.
Tools
dosbox_status,dosbox_pause,dosbox_resume, anddosbox_resetdosbox_swap_floppydosbox_send_keys,dosbox_key_event, anddosbox_type_textdosbox_break_on_next_execdosbox_read_memoryanddosbox_capture_screendosbox_save_stateanddosbox_load_state
Inline memory responses are capped at 4 KiB and returned as hex. Reads up to
64 KiB can instead be written to an absolute output_path. Typed text is paced
and capped at 128 US-ASCII characters; it is convenient shell input, not a
cycle-deterministic keyboard primitive. Use dosbox_key_event to hold and
release keys. The guest must actively consume its BIOS keyboard ring while text
is sent; a busy program can silently lose input. State paths must be absolute
ASCII paths, and saves do not replace an existing file unless overwrite=true.
Input, reset, state, and capture operations require running execution. QMP
memory reads default to requiring a paused emulator because a running read can
be torn; allow_running=true opts into that explicitly. QMP pause can be
resumed through dosbox_resume; a GDB stop must be continued through GDB.
DOSBox-X zero-fills unreadable physical addresses, so an unmapped byte cannot be
distinguished from a real zero through this QMP interface.
dosbox_swap_floppy advances the pre-mounted image list for A: or B: without
injecting a host-side keyboard shortcut.
Each tool call opens one local QMP session, completes the QMP handshake, performs its commands serially, and disconnects. Requests are never retried: a timed-out mutation may already have happened, so inspect emulator state before repeating it.
This server requires the DOSBox-X remote-debug fork, built with --enable-remotedebug and configured with [dosbox] qmpserver=true. DOSBox-X accepts one QMP client at a time; do not attach another monitor while using this MCP server.
Related MCP server: Rikune
Configuration
The server uses 127.0.0.1 and never accepts a remote QMP host.
DOSBOX_X_QMP_PORTdefaults to4444.DOSBOX_X_QMP_TIMEOUTdefaults to35seconds.
Run with:
uv run dos-mcpApache-2.0.
Ghidra integration baseline
The companion extensions target Ghidra 12.2 and JDK 25. Older Ghidra releases and older trace databases are not supported. dos-mcp remains a separate MCP process.
With sibling checkouts, run the disposable integration test using
python ../ghidra-mcp-next/tools/test_debugger_stacks.py --stack dos --ghidra "$GHIDRA_INSTALL_DIR".
Available Tools
13 toolsdosbox_break_on_next_execB
Break GDB at the next DOS EXEC entry point.
Inputs: enabled. Returns: object
dosbox_capture_screenA
Capture the current DOSBox-X display as an MCP PNG image.
Inputs: no named parameters.
dosbox_key_eventC
Press or release one DOSBox-X QKeyCode key.
Inputs: key (required), down (required). Returns: object
dosbox_load_stateB
Load emulator state from an existing absolute host path.
Inputs: path (required). Returns: object
dosbox_pauseA
Pause DOSBox-X execution.
Inputs: no named parameters. Returns: object
dosbox_read_memoryC
Read physical memory; unmapped bytes are indistinguishable from zero.
Inputs: size (required), address (required), overwrite, output_path, +1 more. Returns: object
dosbox_resetA
Reset the DOS guest, optionally without a full machine reset.
Inputs: dos_only. Returns: object
dosbox_resumeB
Resume DOSBox-X execution.
Inputs: no named parameters. Returns: object
dosbox_save_stateB
Save emulator state to an absolute host path.
Inputs: path (required), overwrite. Returns: object
dosbox_send_keysC
Tap one simultaneous chord of DOSBox-X QKeyCode names.
Inputs: keys (required). Returns: object
dosbox_statusC
Report DOSBox-X run and debugger state.
Inputs: no named parameters. Returns: object
dosbox_swap_floppyA
Advance the mounted floppy image in A: (0) or B: (1).
Inputs: drive. Returns: object
dosbox_type_textC
Type paced US-ASCII text while the guest actively consumes input.
Inputs: text (required), press_enter. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct emulator function, but the input-related tools (send_keys, key_event, type_text) are somewhat similar in purpose. The descriptions clarify the differences, but an agent might occasionally confuse send_keys with key_event.
All tools consistently use the dosbox_ prefix and snake_case. Most use an imperative verb (capture, save, load, pause, resume, reset, swap, break, send, type, read), but a few are nouns (status, key_event), which is a minor deviation.
With 13 tools, the server covers the key aspects of DOSBox control—state, input, display, memory, and execution—without being bloated. The count feels well-scoped for an emulator control surface.
The tool set covers core emulator operations such as state save/load, screen capture, keyboard input, and memory reads. Minor gaps exist, such as mouse control or disk image management, but the surface is largely sufficient for typical DOSBox automation.
Maintenance
Related MCP Connectors
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
MCP server to assist with JxBrowser development.
Related MCP Servers
- AlicenseBqualityBmaintenanceBridges AI agents to a DOSBox emulator, enabling control of DOS programs via MCP tools for typing, screen reading, video capture, Lua scripting, and memory access.4724 PyPI3GPL 2.0
- AlicenseNot gradedqualityFmaintenanceMCP server for reverse engineering Windows executables and related binary formats, offering static analysis, Ghidra-assisted function recovery, plugin-driven tooling, and optional isolated Windows runtime execution.10 npm239MIT
- AlicenseCqualityDmaintenanceA Windows-focused MCP server for controlling and debugging PCSX2 via GDB, offering emulator control, memory inspection, debugger operations, savestates, cheats, screenshots, process management, and log access.64MIT
- AlicenseNot gradedqualityBmaintenanceHeadless reverse engineering MCP server integrating IDA Pro for static analysis and x64dbg for dynamic debugging via controlled MCP tools.5GPL 3.0