Skip to main content
Glama

=== There is also a TypeScript and Lua version ===

CoCo 3 MCP Server PYTHON

This app lets an assistant use a Tandy Color Computer 3. It runs the CoCo in MAME, so the assistant can type, use disks, and look at the screen.

You need:

  • Python 3.10 or newer (python on your PATH)

  • This repo

  • MAME (mame.exe)

  • Your own CoCo 3 ROM (coco3.zip)

decb.exe is only needed if you want the assistant to build a disk.

Turn it on

In this folder, run:

install.cmd

That sets the app up and starts it. Leave it running.

After you restart the computer, start it again with:

coco3-mcp.cmd

The assistant starts MAME when you ask it to start the CoCo.

Related MCP server: C64 Bridge

Use it from any app

Once coco3-mcp.cmd is running, any program on this computer can use the CoCo at:

http://127.0.0.1:18766/mcp

That address is also saved in server.json in this folder, and in your user folder at .coco3-mcp\server.json.

Open this in a browser to check that it is on:

http://127.0.0.1:18766/

You should see "ok": true.

Add it to an IDE

This works the same way in Cursor, VS Code, Antigravity, Visual Studio, and other editors that support MCP. Open the editor’s MCP (or AI tools) settings and add a server.

If you use Cursor, install.cmd already adds it. Reload MCP in Cursor’s settings.

For any other editor, add a server with these three settings:

Setting

Value

Name

coco3

Command

python

Arguments

-m coco3_mcp

Working folder

this folder

Example:

{
  "mcpServers": {
    "coco3": {
      "command": "python",
      "args": ["-m", "coco3_mcp"],
      "cwd": "C:\\path\\to\\coco3-mcp"
    }
  }
}

Change C:\\path\\to\\coco3-mcp to the real path of this folder. Then reload MCP in the editor and ask it to start the CoCo.

What you can ask for

  • Start or stop the CoCo

  • Type on the keyboard

  • Mount or eject a disk

  • Take a picture of the screen

  • Read or change memory

  • Save or load a state

  • Build a disk (needs decb.exe)

Disclosure

Agentic AI was used in some parts of this code.

License

MIT

Available Tools

14 tools
coco_build_diskA

Build a 35-track Disk BASIC image with ToolShed decb. Prefer storage/disks for output and storage/host/bas|bin|data for inputs. BASIC is tokenized; BIN and data are copied unchanged.

Inputs: files (required), dskPath (required).

coco_list_imagesB

List MAME image devices, including flop1 and flop2, with tag, briefname, filename, and exists.

Inputs: no named parameters.

coco_load_stateA

Schedule a MAME state load. Fails immediately if no matching file exists in the state directory; otherwise the load is asynchronous and the result is reported as scheduled.

Inputs: name (required).

coco_mount_flopB

Mount a disk image on flop1 or flop2. Prefer paths like storage/disks/game.dsk (resolved from the MCP root). Drives come from manager.machine.images.

Inputs: path (required), drive.

coco_read_memoryB

Read bytes from the current 64K MMU window, not physical RAM. $0400 is the 32-column text screen only in the CoCo 1/2-compatible map.

Inputs: length (required), address (required).

coco_save_stateB

Schedule a MAME save into the state directory. The save is asynchronous; fileFound reports whether the file appeared.

Inputs: name (required).

coco_snapshotA

Capture the CoCo screen to snapshots/current.png and return the PNG. Falls back to the newest PNG in the snapshot directory.

Inputs: no named parameters.

coco_soft_resetB

Soft-reset the emulated CoCo. This does not hard-reset MAME.

Inputs: no named parameters.

coco_startB

Spawn local official MAME coco3 with the disk controller and wait until the Lua bridge answers ping.

Inputs: no named parameters.

coco_statusA

Report whether MAME is running, whether the bridge answered, and the mounted flop1 image.

Inputs: no named parameters.

coco_stopA

Stop the MAME process tree and close the bridge listener.

Inputs: no named parameters.

coco_typeB

Post one natural-keyboard string. pressEnter defaults to true and appends {ENTER} when it is not already present, then waits until the queue is empty and not posting.

Inputs: text (required), pressEnter.

coco_unmount_flopB

Unload the disk image from flop1 or flop2.

Inputs: drive.

coco_write_memoryB

Write bytes into the current 64K MMU window, not physical RAM.

Inputs: data (required), address (required).

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 14 tools

    Disambiguation5/5

    Each tool has a clearly distinct emulator operation: lifecycle (start/stop/status), media (mount/unmount/list), memory (read/write), state (load/save), input (type), and disk building. There are no overlapping or indistinguishable tools.

    Naming Consistency4/5

    All tools use snake_case with a consistent coco_ prefix, which is highly predictable. A few names deviate slightly from the verb_noun pattern (e.g., coco_status as noun, coco_soft_reset as adjective_noun), but the set remains easy to navigate.

    Tool Count5/5

    14 tools is well-scoped for controlling a MAME CoCo 3 emulator, covering lifecycle, media, memory, state, input, and disk building without unnecessary bloat. Each tool earns its place.

    Completeness4/5

    The surface covers core emulator workflows: start/stop/status, reset, snapshot, type, mount/unmount/list images, read/write memory, load/save state, and build disk. Minor gaps exist, such as no explicit hard reset or pause/resume, but agents can work around them.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Lets an AI application instantiate, connect to, drive, capture output from, and interrogate a real BBC Micro emulator.
      22
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Lets AI clients control and program a Commodore 64, including running programs, reading/writing memory, rendering graphics, playing sound, and switching between C64 Ultimate hardware and VICE emulation.
      220 npm
      41
      GPL 2.0
    • 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.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI assistant to drive a Color Computer 3 emulated in MAME, including entering BASIC commands, mounting disk images, capturing screen snapshots, and peeking/poking memory.
      5
      MIT