Skip to main content
Glama

80mcp

A Model Context Protocol server over the Z80 and x86 emulator family in the sibling repos — so an agent can run a CP/M, MP/M or DOS package and assert on what came back, and debug the emulators themselves without a human doing it by mouse click and screen read.

Phase 1 ships. Phases 2-5 are still proposal. The full design is in SPEC.md; this file is the short version. If you are an agent about to make a call, read DRIVING-WITH-AI.md instead — it is the operating manual, and its Gotchas chapter is measured rather than remembered.

Install and run

pip install -e .
80mcp doctor        # every backend and profile, exiting nonzero on any problem
80mcp               # speak MCP JSON-RPC on stdio

Python 3.11+, no third-party runtime dependencies. pytest and jsonschema are dev-only: pip install -e ".[dev]".

Register it as an stdio server:

{"mcpServers": {"80mcp": {"command": "80mcp", "args": []}}}

80mcp doctor is the first thing to run and the first thing to paste into a bug report. The doctor output, backend discovery and protocol notes are in docs/status.md.

Related MCP server: pet-tools-mcp

What ships

Seven batch tools over two backends: x80_profiles, x80_cpm_run, x80_dos_run, x80_diff_run, x80_files, x80_probe and x80_images. The other sixteen tools are not registered. Two profiles run today: cpm-hosted (cpmemu) and dos-hosted (dosiz). Every hardware profile reports ready:false with the phase that will unblock the profile. The full tool and profile tables are in docs/status.md.

For an agent that writes, assembles and single-steps a CP/M program on period 8080/Z80 hardware, use deltecent/altairsim alongside 80mcp. docs/background.md explains why.

Documentation

file

for

DRIVING-WITH-AI.md

an agent about to make a call. The seven tools, the profile decision tree, the two tiers, and twelve measured gotchas

examples/agent/80un/

a runnable end-to-end exercise: unpack an archive, prove it byte-correct, then break it four ways on purpose

tests/README.md

how to run the suite and which tests need which backend binary

SPEC.md

the full design: all 23 tools, the MBP boundary, and the measured-facts index in Appendix A

evidence/

the raw transcripts every number in the spec traces back to

docs/status.md

80mcp doctor output, backend discovery, protocol revision, and the full tool and profile tables

docs/background.md

prior art (altairsim, Spice86, DOSBox-X), what is missing, the mode matrix, and two design conclusions

The sibling repos

repo

role here

romwbw_emu

the Z80 + RomWBW HBIOS core, and the primary interactive backend. Already headless, pipe-driven, with a sim> debugger

cpmemu

BDOS-level CP/M 2.2 translator — the cpm-hosted batch backend. Also supplies qkz80, the CPU core the rest of the family compiles

mpm2

real MP/M II V2.1 with a banked XIOS, 60 Hz preemption and up to 8 SSH consoles — the mpm2 backend, and the unclaimed ground

dosiz

DOS-API translator (INT 21h/31h/67h → host C++) — the dos-hosted batch backend

qxDOS

owns emu88, the from-scratch 8088/286/386 whole PC — the x86-bare and freedos backend

romwbw_disks

the sha256-pinned ROM and disk-image catalog every profile resolves through

80un

not an emulator — the reference fixture. Ships the same unpacker as a CP/M .COM and as Python, so it validates both the batch verb and the differential verb

z80cpmw · ioscpm · cpmdroid

GUI clients. Explicitly not automation targets — see docs/background.md

License

GPL-3.0-or-later, matching the rest of the family.

Available Tools

7 tools
x80_cpm_runA

Run one CP/M package to completion in a fresh sandbox and return its console output, a manifest of the files it created, a termination reason, and your assertions. This tool deliberately has no exit_code field, because no CP/M backend has one: CP/M has no exit-status concept, cpmemu exit(0)s on every path including its runaway watchdog, romwbw_emu always returns 0, and a run that extracted 1 of 23 files and printed "Error" still exited 0 (measured). Success must be asserted from stdout plus the file manifest.

Inputs: profile (required), program (required), cpu, args, +9 more.

x80_diff_runA

Run the same inputs through a guest program and a host reference implementation and compare the outputs byte for byte under a declared normalization. Built for the case 80un proves: the same algorithm shipped as a CP/M .COM and as Python.

Inputs: guest (required), inputs (required), reference (required), compare, +2 more.

x80_dos_runA

Run one DOS package to completion in a fresh sandbox. Unlike x80_cpm_run this does have a meaningful exit code — dosiz propagates the DOS AH=4Ch AL value (measured: rc 7) — but rc 1 is ambiguous between "the guest exited 1" and "dosiz failed to load the program", so exit_code_meaning disambiguates it from stderr.

Inputs: profile (required), program (required), env, args, +8 more.

x80_filesA
Destructive

Move files between the host and a guest, list what the guest can see, show what it has open right now, and answer "where would A:FOO.TXT come from?" without running anything. The direction is in the op name, not in a flag, because the single most common agent failure in this domain is editing a host copy of a file instead of the one the guest can see.

Inputs: op (required), via, hash, drive, +13 more.

x80_imagesA
Idempotent

Download and verify disk images from the pinned romwbw_disks catalog. Every other tool in this server is openWorldHint:false. Never called implicitly — no tool call may trigger a download.

Inputs: dry_run, image_ids, timeout_ms, allow_fetch, +1 more.

x80_probeC

Run a package on the cheapest profile and report what operating system it actually needs, from the syscalls it made — evidence instead of a screen read. Returns a literal next call to make.

Inputs: program (required), args, stdin, family, +2 more.

x80_profilesA
Read-onlyIdempotent

List the machine profiles this installation can actually run: backend, tier, capabilities, required disk images and whether they are present. Call this first. Capabilities differ enormously between backends, and a profile with a missing image or a ROM/disk version mismatch will fail x80_open.

Inputs: probe, family, profile, only_ready.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    The tools are mostly distinct: profiles, images, files, probe, CP/M run, DOS run, and diff run each target a different phase or concern. The run/probe/diff tools could be confused at a glance, but their descriptions clearly separate OS detection, full execution, and guest-vs-host comparison.

    Naming Consistency4/5

    All tools share the x80_ prefix and use domain-specific suffixes, with the run tools following an <os>_run pattern. There is a minor mix of noun-style names like x80_files and x80_profiles with verb-style x80_probe, but the overall pattern remains predictable.

    Tool Count5/5

    Seven tools is well within the ideal range and each tool earns its place by covering a distinct part of the emulation workflow: environment discovery, image provisioning, file transfer, probing, execution, and diffing. There is no obvious redundancy or bloat.

    Completeness4/5

    The set covers the core run-to-completion loop well: discover profiles, provision images, transfer files, run CP/M or DOS packages, probe OS requirements, and diff against a host reference. Minor gaps exist, such as no exposed x80_open/session tool and no package catalog listing, but agents can work around these.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to code and debug Commodore PET software using the VICE emulator, with CLI and MCP tools for session control, screen reading, memory manipulation, and testing.
      44
      1
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      This MCP server enables AI agents to inspect and control the native DOSBox-X debugger through bounded MCP tools, including breakpoint management, execution control, register/memory inspection, and disassembly for DOS program debugging and reverse engineering.
      1
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to control an MSX emulator for debugging and reverse-engineering, including memory and code inspection, execution control, and saving annotations via MCP.
      -