dos-mcp
Enables an MCP client to observe and control a text-mode DOS system via a Python bridge, supporting keyboard input and screen capture.
README
DOS MCP
DOS MCP lets a modern MCP client observe and control DOS systems without putting MCP, JSON, HTTP, or an AI runtime on the retro machine. The modern Python bridge owns MCP, credentials, retries, target routing, policy, and structured results. DOS runs a small packet-driver endpoint.
Two DOS executables are retained:
RAGENT.EXE: the original foreground command-shell endpoint;RA-TSR.EXE: a loadable/unloadable resident endpoint for background observation, BIOS keyboard insertion, sandboxed file transfer, and raw standard graphics capture.
PicoMEM/PicoMEM2-specific code is intentionally absent.
Implemented MCP tools
dos.list_targetsdos.get_statusdos.get_capabilitiesdos.capture_screendos.capture_graphicsdos.send_keysdos.download_filedos.upload_file
All target-taking tools accept an optional target selector. It may be
omitted only when the bridge knows exactly one system.
Target matrix
| Capability | Linux PTY | UDP simulator | RAGENT | RA-TSR |
|---|---|---|---|---|
| Status/capabilities | Yes | Yes | Yes | Yes |
| 80×25 text capture | Yes | Yes | Yes | Yes |
| Keyboard input | terminal | UDP | BIOS queue | BIOS queue |
| Sandboxed file read/write | opt-in | opt-in | No | opt-in |
| Raw graphics capture | No | fixture-dependent | No | CGA/Herc/EGA/VGA |
| Background operation | host process | host process | No | Yes |
| Load/unload | process | process | process | DOS TSR |
| Named local discovery | No | No | No | Yes |
RA-TSR is built with 8086 instruction generation for 8088 through 486-class
machines. DOSBox-X verifies the complete resident path, including exact
text/VGA capture, keyboard-driven VER, binary upload/download, and unload.
Physical adapter, BIOS, video-card, and 4.77 MHz timing coverage remains an
explicit hardware-verification item.
Architecture
MCP client
│ MCP over stdio
▼
Python DOS MCP bridge
│ target registry + transport-independent Backend operations
├── Linux PTY backend
├── configured UDP target(s)
└── validated local discovery records
│ authenticated protocol v2 over UDP
├── Linux simulator
├── RAGENT.EXE
└── RA-TSR.EXE
│ FTP/Crynwr packet driver
└── Ethernet adapter
Discovery is only an unauthenticated address hint. Every target operation still performs the configured credentialed handshake. RA-TSR announcements use Ethernet/IP limited broadcast and TTL 1, and stop while connected.
Quick start: local Linux backend
Requirements are Linux, Python 3.12+, and
uv:
uv sync
uv run dos-mcp
Select a shell and starting directory:
DOS_MCP_ROOT=/path/to/workspace \
DOS_MCP_SHELL=/bin/bash \
uv run dos-mcp
The starting directory is not an OS sandbox; the child retains the bridge user's permissions.
Quick start: Linux-backed UDP simulator
# terminal 1
uv run dos-mcp-simulator \
--bind 127.0.0.1:21300 \
--password 'local-test-only' \
--root "$PWD" \
--allow-file-read \
--allow-file-write
# terminal 2
DOS_MCP_TARGET=127.0.0.1:21300 \
DOS_MCP_PASSWORD='local-test-only' \
DOS_MCP_ALLOW_FILE_READ=1 \
DOS_MCP_ALLOW_FILE_WRITE=1 \
uv run dos-mcp
Quick start: DOS
Build with Open Watcom 2:
make -C dos WATCOM=/path/to/watcom all
Foreground:
RAGENT pass:UniqueLabPass 192.168.10.55 21300 0x60
Resident, named, with an explicit file root:
MD C:\REMOTE
RA-TSR pass:UniqueLabPass 192.168.10.55 21300 0x60 C:\REMOTE RW WORKBENCH-386
Connect directly:
DOS_MCP_TARGET=192.168.10.55:21300 \
DOS_MCP_PASSWORD=UniqueLabPass \
DOS_MCP_ALLOW_FILE_READ=1 \
DOS_MCP_ALLOW_FILE_WRITE=1 \
uv run dos-mcp
Or listen for disconnected RA-TSRs:
DOS_MCP_DISCOVERY=1 \
DOS_MCP_PASSWORD=UniqueLabPass \
uv run dos-mcp
For multiple fixed machines:
DOS_MCP_TARGETS='{"desk8088":"192.168.10.21","lab386":"192.168.10.38"}' \
DOS_MCP_PASSWORD=UniqueLabPass \
uv run dos-mcp
The bridge currently uses one UDP credential per process. Separate bridge processes are recommended when targets have different secrets.
Credentials
A password/passphrase of any nonzero length supported by the invoking command line is deterministically reduced to a 128-bit key. A legacy 32-hex raw key is still accepted. The credential is optional on both peers; omission selects conspicuous open mode.
Open mode is unauthenticated and suitable only for an isolated test network. Credentialed protocol v2 authenticates but does not encrypt traffic and uses a deliberately short 32-bit packet tag for 8088 feasibility. Use a trusted private LAN, a unique high-entropy credential per deployment, and never forward the DOS operation port to the Internet.
Test
uv run ruff check .
uv run python tools/check_docs.py
uv run pytest
make -C dos WATCOM=/path/to/watcom all
Foreground and resident DOSBox-X harnesses:
WATCOM=/path/to/watcom \
DOSBOX_X=/path/to/dosbox-x \
PACKET_DRIVER=/path/to/NE2000.COM \
tools/test_dosbox_x.sh
WATCOM=/path/to/watcom \
DOSBOX_X=/path/to/dosbox-x \
PACKET_DRIVER=/path/to/NE2000.COM \
tools/test_dosbox_x_tsr.sh
Documentation
Start with Documentation:
- Getting started
- Configuration
- MCP tools
- DOS executables
- RA-TSR
- Discovery and multiple targets
- Protocol v2
- Architecture
- Security model
- DOS reentrancy
- Video capture
- Testing
- Roadmap
PROJECT.md is the original brief. AGENTS.md
contains the current contributor constraints.
License
A final open-source license has not yet been selected. Third-party packet drivers are not redistributed by this repository.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.