About mcp-openmsx-usage
A usage guide for mcp-openmsx, aimed at developers working with openMSX through AI assistants. It organizes emulator control, MSX programming and debugging workflows, and documentation search guidance.
Key features
- 01Launch and control the openMSX emulator
- 02Manage ROM, disk, and tape media
- 03Write and run MSX BASIC programs
- 04Inspect VDP, CPU, and memory state
- 05Debug with breakpoints, stepping, and time travel
- 06Search embedded MSX documentation
Use cases
- 01Launch an MSX machine and verify its startup
- 02Develop BASIC programs in the emulator
- 03Debug MSX-DOS or assembly programs
- 04Find MSX instruction and hardware documentation
MCP support
The guide explains how the mcp-openmsx MCP server connects to openMSX over STDIO or HTTP transports. It describes MCP tools, resources, and prompts for AI assistants to control the emulator, debug programs, and search documentation.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ nataliapc/ mcp-openmsx --skill mcp-openmsx-usageAfter installing, type/mcp-openmsx-usagein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
skill-environment-variables.mdskill-mcp-configuration.mdskill-mcp-resources-prompts.mdskill-tools-basic-programming.mdskill-tools-debugging.mdskill-tools-documentation-search.mdskill-tools-emulator-control.mdskill-tools-screen-capture.mdskill-tools-vdp-video-display-processor.mdreferences/basic-programming.mddebug-asm.mddebug-basic.mddebug-dos-program.mddebug-vdp.mddocumentation.mdlaunch-machine.mdmedia-management.mdnative-tcl-autodiscovery.mdreplay-savestates.mdscreen-capture.mdDetails
From the project READMEMCP-OpenMSX Usage Guide
Skill usage
- Read this file completely.
- Read the linked files if topic/description is relevant to your task. Always load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.
Overview
mcp-openmsx is an MCP server that bridges AI assistants with the openMSX MSX emulator. It spawns openMSX, sending TCL commands via STDIO or HTTP transports.
Typical workflow: launch emulator → insert media → interact (keyboard/BASIC/debug) → capture screen → close.
Prerequisites
- Node.js >= 18 with
npx:- Windows: install via nodejs.org or
winget install OpenJS.NodeJS - macOS:
brew install nodeor the official installer - Linux: use your distro package manager or nvm
- Windows: install via nodejs.org or
- openMSX emulator installed and accessible (see MCP Configuration for per-OS paths).
Set
OPENMSX_EXECUTABLEenv if not in PATH. mcp-openmsxconfigured in your MCP client.- Set
OPENMSX_SHARE_DIRenv if auto-detection fails or a custom folder is needed.
Skill Index
- MCP Configuration: How to configure the MCP server, including transport selection (stdio vs HTTP), emulator executable path, and share directory settings.
- Environment Variables
- MCP tools reference:
- Emulator Control: Manage emulator state (launch, power, reset), media (tapes, ROMs, disks), machine info, keyboard input, savestates, and time-travel replay.
- VDP (Video Display Processor): Inspect and modify VDP state, including registers, palette, screen mode, and text content.
- Screen Capture: Capture screenshots, and screen memory dumps from the emulator.
- Debugging: Control execution (break, continue, step), inspect CPU registers, RAM, and VRAM, manage breakpoints.
- BASIC Programming: Write, load, run, and manage BASIC programs on the emulator.
- Documentation & Search: How to search and retrieve MSX technical documentation from the embedded vector database and resource library to support development tasks.
- Native Tcl Autodiscovery: Discover and use openMSX console functionality not covered by typed tools through the optional
openmsx_tcl_cmdtool.
- MCP Resources: Extensive collection of MSX documentation resources and reference materials embedded in the MCP vector database, organized by category and topic for easy retrieval.
- MCP Prompts: Custom MCP prompts for generating structured reference materials based on the embedded documentation resources, such as an MSX BASIC instruction manual page.
- Tips & Best Practices
Workflows reference files and guides
Detailed step-by-step guides for common workflows. ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake. Read the relevant file when needed:
- MSX documentation search workflow — Search and retrieve MSX technical documentation from the embedded vector database and resource library to support development tasks.
- Launch and configure an MSX machine — Discover machines/extensions, launch, wait for boot, verify status, speed control, power cycle.
- Programming in MSX BASIC — Write, load, run, verify, and manage BASIC programs. Includes line management, interrupting, and loading large programs.
- Debugging the VDP — Inspect/modify VDP registers, palette, VRAM, screen modes. Includes sprite debugging and screen corruption analysis workflows.
- Debugging a BASIC program — Interrupt execution, inspect state, edit lines, low-level interpreter debugging, time-travel, infinite loop detection, variable inspection.
- Debugging an ASM program — Breakpoints, stepping, register/memory inspection, disassembly, BIOS call verification, crash/hang analysis, locating functions without .sym files.
- Debugging MSX-DOS programs — Correct breakpoint workflow for MSX-DOS disk-loaded programs. Avoids boot contamination (BIOS/DOS firing breakpoints before app starts). Includes hang detection and savestate checkpointing.
- Working with media (ROM, disk, tape) — Insert/eject ROMs, disks, tapes. Development workflows for each media type.
- Time-travel debugging with replay and savestates — Timeline navigation, frame-by-frame stepping, checkpointing, comparing execution paths.
- Screen capture and visual verification — Screenshots (inline/file), screen dumps (MSX format), text reading, before/after comparison.
- Native Tcl autodiscovery — Runtime discovery with
help,about,machine_info, andopenmsx_infothrough the optional raw Tcl tool.
Tips & Best Practices
- For a specific BASIC instruction, read
msxdocs://basic_wiki/{INSTRUCTION}directly withread_mcp_resource(ormsxdocs_resource_getfor enum-named resources). And complement it with avector_db_query. Thebasic_wikiresource gives the complete Effect/Syntax/Parameters/Examples/Compatibility page in one call and the vector query search for cross cutting topics. For example, to get theCALLinstruction page, usemsxdocs://basic_wiki/callandvector_db_query("CALL"). - Use
vector_db_queryfor discovery or cross-cutting questions (e.g. "sprite collision + interlaced mode", "PSG envelope timing"). - Use always
\r(CR) as line terminators in BASIC programs. Avoid\n(LF) or\r\n(CRLF) to prevent parsing issues. - All addresses and values use hexadecimal format (e.g.
0x4000,0xA5). - Always
emu_control.waita few seconds afterlaunchto let the machine fully boot before interacting. - Use
screen_shot.as_imageto visually verify emulator state at any point. - Use
debug_run.breakbeforeemu_replay.goBackorabsoluteGototo keep the timeline stable. - Use
vector_db_queryto search MSX documentation before relying on general knowledge. - Use
basic_programmingtools instead ofemu_keyboard.sendTextfor BASIC development — they handle speed optimization and input encoding automatically. - Use
emu_savestatesto checkpoint progress during complex debugging sessions. - Addresses from
.sym/.mapfiles can be used directly withdebug_breakpoints.createanddebug_run.runTo. - Use
debug_conditions.createwhen the trigger is a machine state rather than a location — a Tcl expression (e.g.[reg SP] > 0xC000) evaluated continuously while the CPU runs. - MSX-DOS programs: never set breakpoints before confirming the app is on screen — the BIOS/DOS boot fires them first. See Debugging MSX-DOS Programs.
- CP437 character encoding is the nearest encoding for MSX international charmap, use it for text input/output. Be mindful of special characters.