New tools and modules:
- control.py: pause, resume, reset, savestate, loadstate, memdump, query_status
- resources.py: Live screen capture, screenshot management resources
- clipboard_copy/clipboard_paste via DOSBox-X hotkeys (Ctrl+F5/F6)
- screen_text/screen_graphics for text buffer and VGA memory access
Configuration improvements:
- Dynamic QMP/GDB port handling (stored in session state from launch())
- Joystick config: joysticktype, timed options
- Parallel port config: parallel1, parallel2 settings
- Added -hostrun flag for host clipboard integration
Performance and UX:
- Reduced keyboard_send delay from 50ms to 10ms default
- Refactored server.py to use Tool.from_function() pattern
- Screenshot tool now returns MCP resource URIs only
MCP Resources:
- dosbox://screen - live screen capture (no tool call needed)
- dosbox://screenshots - list available screenshots
- dosbox://screenshots/{filename} - get specific screenshot
- dosbox://screenshots/latest - get most recent screenshot
98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
# DOSBox-X MCP Docker Compose
|
|
#
|
|
# Usage:
|
|
# docker compose up -d # Start DOSBox-X
|
|
# docker compose logs -f # View logs
|
|
# docker compose down # Stop
|
|
#
|
|
# For GUI (X11 forwarding):
|
|
# xhost +local:docker # Allow Docker X11 access
|
|
# docker compose up -d
|
|
|
|
services:
|
|
dosbox:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: dosbox-mcp
|
|
|
|
# Ports (remotedebug fork exposes these when built with --enable-remotedebug)
|
|
ports:
|
|
- "${GDB_PORT:-1234}:1234" # GDB server (standard GDB remote protocol)
|
|
- "${QMP_PORT:-4444}:4444" # QMP server (QEMU Machine Protocol)
|
|
- "5555:5555" # Serial nullmodem for RIPscrip input
|
|
|
|
# X11 forwarding for display
|
|
environment:
|
|
- DISPLAY=${DISPLAY:-:0}
|
|
volumes:
|
|
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
|
- ${XDG_RUNTIME_DIR:-/run/user/1000}:${XDG_RUNTIME_DIR:-/run/user/1000}:rw
|
|
|
|
# DOS files directory
|
|
- ${DOS_DIR:-./dos}:/dos:rw
|
|
|
|
# Custom config (optional)
|
|
- ${CONFIG_FILE:-./config/dosbox.conf}:/config/dosbox.conf:ro
|
|
|
|
# Audio (PulseAudio)
|
|
devices:
|
|
- /dev/snd:/dev/snd
|
|
|
|
# For PulseAudio sound
|
|
# Uncomment if you want sound support:
|
|
# - ${XDG_RUNTIME_DIR}/pulse:/run/user/1000/pulse:rw
|
|
|
|
# Run options
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
# Resource limits
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2'
|
|
memory: 1G
|
|
|
|
# Healthcheck - verify GDB port is listening
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "nc -z localhost 1234 || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
# Restart policy
|
|
restart: unless-stopped
|
|
|
|
# Optional: Separate container for headless operation
|
|
dosbox-headless:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: dosbox-mcp-headless
|
|
profiles:
|
|
- headless
|
|
|
|
ports:
|
|
- "${GDB_PORT_HEADLESS:-1235}:1234" # GDB server
|
|
- "${QMP_PORT_HEADLESS:-4445}:4444" # QMP server
|
|
|
|
environment:
|
|
# Use virtual framebuffer for headless
|
|
- SDL_VIDEODRIVER=dummy
|
|
- SDL_AUDIODRIVER=dummy
|
|
|
|
volumes:
|
|
- ${DOS_DIR:-./dos}:/dos:rw
|
|
- ${CONFIG_FILE:-./config/dosbox.conf}:/config/dosbox.conf:ro
|
|
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1'
|
|
memory: 512M
|