Skip to main content

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, and dosbox_reset
  • dosbox_swap_floppy
  • dosbox_send_keys, dosbox_key_event, and dosbox_type_text
  • dosbox_break_on_next_exec
  • dosbox_read_memory and dosbox_capture_screen
  • dosbox_save_state and dosbox_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.

Configuration

The server uses 127.0.0.1 and never accepts a remote QMP host.

  • DOSBOX_X_QMP_PORT defaults to 4444.
  • DOSBOX_X_QMP_TIMEOUT defaults to 35 seconds.

Run with:

uv run dos-mcp

Apache-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".

Metadata

Release files for dos-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dos-mcp 0.2.0
File Size Uploaded Provenance
dos_mcp-0.2.0.tar.gz 102.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dos-mcp 0.2.0
File Interpreter ABI Platform
dos_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 117.9 kB

Release files / dos_mcp-0.2.0.tar.gz

Download URL dos_mcp-0.2.0.tar.gz
Size 102.3 kB
Tags Source
SHA-256 checksum
How to use checksums
11e13e6d7ca3b79aaebc8c035c201cfb323f5021a517e21270aa7e4ba7cb21d5
BLAKE2b-256 checksum
How to use checksums
2de30873f1bffd71bb462c4d6c9e8003ac2abfcedd2e178b9735db6e39200ed0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / dos_mcp-0.2.0-py3-none-any.whl

Download URL dos_mcp-0.2.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12da10aafeb7077f3b535c299a39cad085af96956810942fe74023c129177345
BLAKE2b-256 checksum
How to use checksums
027affec94ffe7bf2b58b1dced5cbd1200c0d9ebe1f974e66c90e8991d33e4b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for dos-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page