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 companion DOSBox-X build made 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dos_mcp-0.1.1.tar.gz (100.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dos_mcp-0.1.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file dos_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: dos_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 100.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dos_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 87f996003f09866d7071b53e38afca67671c5e5b52e936b55c0065515ba8062b
MD5 c98fdf9ed93748dee26a97e1b976d74f
BLAKE2b-256 6cc3b0ae5f08056b7440b472680d96e88dd55ce18989c35ae2a017ef89385c5d

See more details on using hashes here.

File details

Details for the file dos_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dos_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dos_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0e70e310ffa3df7448f59409daa9dd976c432bd3f41ca61f78ca663686ddd4a
MD5 00b7d4d8cb7d2e36d9aaa81214c901c4
BLAKE2b-256 a4cfdef0ad4e1d696a0f64e6e7fe8d5f9859dfdaabfcad089eda9bf5be6b0e9e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page