freshcrate
Home > MCP Servers > mcp-openmsx

mcp-openmsx

A Model Context Protocol (MCP) server for automating openMSX emulator instances. This server provides comprehensive tools for MSX software development, testing, and automation through standardized MCP

Description

A Model Context Protocol (MCP) server for automating openMSX emulator instances. This server provides comprehensive tools for MSX software development, testing, and automation through standardized MCP protocols.

README

MCP-openMSX

"Orchestrating a binary opera where AI conducts, MCP interprets, and openMSX acts as the 8-bit diva."

Built by NataliaPC License GitHub Repo stars
NPM Version NPM Downloads

A Model Context Protocol (MCP) server for automating openMSX emulator instances.

This server provides comprehensive tools for MSX software development, testing, and automation through standardized MCP protocols.

🎁🎁 If you find this project useful, please consider making a donation by PAYPAL Link or GitHub Sponsors


Table of Contents

Project Overview

This project creates a bridge between modern AI-assisted development (e.g. GitHub Copilot, Claude Desktop) and retro computing (MSX systems) by providing:

  • Emulator Control: Launch, configure, manage openMSX instances, and replay timelines.
  • Media Management: Handle ROM cartridges, floppy disks, and cassette tapes.
  • BASIC Programming Support: Tools to facilitate BASIC language programming and development.
  • Debugging Tools: Full CPU debugging with breakpoints, memory inspection, and step execution.
  • Video Control: VDP register manipulation and screen capture.
  • Memory Operations: Read/write RAM, VRAM, and I/O port access.
  • Automation: Keyboard input simulation and savestate management.
  • Vector DB Integration: Query an embedded vector database with MSX resources for development support.
  • Hybrid Mode: This MCP server supports hybrid access mode (STDIO and HTTP transports).

Architecture

flowchart TB
  %%{init: {'flowchart': {'curve':'monotoneX' }}}%%

  subgraph yourComputerGroup[" "]
    HOST["Your AI dev companion<br>(MCP Client support)"]
    EMU["openMSX emulator<br>(local instance)"]

    subgraph mcpGroup["**mcp-openmsx**"]
      MCP["MCP Server<br>stdio / http"]
      TOOLS["MCP Tools"]
      VECTORDB[("Embeddings RAG<br>(Vector Database)")]
      RESOURCES["MCP Resources"]
      LOCALDATA["Local data<br>(inner documentation)"]
    end
    EXTDATA["External data<br>(webpages)"]

    HOST <--"_MCP<br>&nbsp;protocol&nbsp;_"--> MCP
    MCP <--> TOOLS & RESOURCES
    TOOLS <--"_&nbsp;Query&nbsp;_"--> VECTORDB
    TOOLS <--"_&nbsp;Console commands&nbsp;_"---> EMU
    RESOURCES <--_&nbsp;http&nbsp;_---> EXTDATA
    RESOURCES <--> LOCALDATA
  end

  HOST@{ shape: rounded }
  MCP@{ shape: rounded }
  EMU@{ shape: rounded }
  LOCALDATA@{ shape: docs }
  EXTDATA@{ shape: docs }
  style yourComputerGroup color:#fff,fill:#4444,text-align:left
  style mcpGroup color:#fff,fill:#4444
  style HOST color:#000000,fill:#BBDEFB,stroke-width:4px,stroke-dasharray:0
  style MCP color:#000000,fill:#FFF9C4
  style EMU color:#FFFFFF,fill:#0000FF,stroke-width:4px,stroke-dasharray:0
Loading

The MCP server translates high-level natural language commands from your Copilot AI into TCL commands to control openMSX, enabling automated MSX software testing and debugging.

Available MCP Tools

Emulator Control Tools

  • emu_control: Controls an openMSX emulator: launch, close, powerOn, powerOff, reset, getEmulatorSpeed, setEmulatorSpeed, machineList, extensionList, wait.
  • emu_replay: Controls emulation timeline: start, stop, status, goBack, absoluteGoto, advanceFrame, reverseFrame, truncate, saveReplay, loadReplay.
  • emu_info: Obtain informacion about the current emulated machine: getStatus, getSlotsMap, getIOPortsMap.
  • emu_media: Manage ROM, disk, and tape media: tapeInsert, tapeRewind, tapeEject, romInsert, romEject, diskInsert, diskInsertFolder, diskEject.
  • emu_vdp: Manage VDP (Video Display Processor): getPalette, getRegisters, getRegisterValue, setRegisterValue, screenGetMode, screenGetFullText.

Programming Tools

  • basic_programming: BASIC tools: isBasicAvailable, newProgram, runProgram, setProgram, getFullProgram, getFullProgramAdvanced, listProgramLines, deleteProgramLines.

Debugging Tools

  • debug_run: Control execution: break, isBreaked, continue, stepIn, stepOut, stepOver, stepBack, runTo.
  • debug_cpu: Read/write CPU registers, CPU info, Stack pile, and Disassemble code: getCpuRegisters, getRegister, setRegister, getStackPile, disassemble, getActiveCpu.
  • debug_memory: RAM memory operations: selectedSlots, getBlock, readByte, readWord, writeByte, writeWord, searchBytes.
  • debug_vram: VRAM operations: getBlock, readByte, writeByte, searchBytes.
  • debug_breakpoints: Breakpoint management: create, remove, list.

Automation Tools

  • emu_keyboard: Send text or key combinations to emulator: sendText, sendKeyCombo.
  • emu_savestates: Save and restore machine states: load, save, list.
  • screen_shot: Capture emulator screen: as_image, to_file.
  • screen_dump: Export screen data as BASIC BSAVE instruction.
  • msxdocs_resource_get: Retrieve MCP resources for MCP clients that don't support MCP resources.

Documentation Tools

  • vector_db_query: Query the Vector DB resources to obtain information about MSX systems, cartridges, and other development resources.
  • msxdocs_resource_get: Retrieve MCP resources for MCP clients that don't support MCP resources.

Available MCP Resources

What are MCP Resources?

MCP resources are structured data sets, documentation, and helper files that extend the capabilities of the MCP server. They provide essential information such as machine definitions, extension lists, media templates, and programming examples, enabling more powerful automation, testing, and development workflows for MSX software within the MCP-openMSX environment.

Available Resources

There are more than 60 resources available, some included directly in the MCP and others accessible via download when queried. They are organized into the following categories:

  • Processors (Z80, R800)
  • Bios (Bios ROM, DOS ROM, SUBROM, ...)
  • System
  • Audio
  • Video
  • Programming (ASM, BASIC, ...)
  • MSX-DOS
  • MSX-UNAPI
  • MSX BASIC

And books and manuals:

  • MSX2 Technical Handbook
  • The MSX Red Book
  • SDCC Compiler

Resources from:

Thanks to the authors of these resources, who have made them available under various licenses. This MCP server includes some of these resources to enhance the development experience.

Important

The rights to these resources belong to their respective authors and are distributed under the licenses they have defined.

Quick Start

You can use this MCP server in this basic way with the precompiled NPM package.

Quick installation with VSCode

Install in VS CodeSteps to install the MCP server in VSCode:

  1. Install Github Copilot extension
  2. Install nodejs (npx command must be available in your PATH).
  3. Install de MCP Server:
    • Use the Install MCP Server button above to install the MCP server in your VSCode settings.
    • Or add to your workspace folder a file named .vscode/mcp.json with the json configuration below.

STDIO mode (recommended)

{
  "servers": {
    "mcp-openmsx": {
      "command": "npx",
      "args": ["@nataliapc/mcp-openmsx"],
      "env": {
        "OPENMSX_SHARE_DIR": "C:\\the\\location\\of\\your\\openmsx\\share\\folder"
      }
    }
  }
}

Note

Environment variables are optional. Customize them as you need.

Streamed HTTP mode (more advanced)

{
  "servers": {
    "mcp-openmsx": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": { }
    }
  }
}

Note

The MCP HTTP Server must be running standalone in the same computer or in another (make run_http).

Basic Installation with Claude Desktop

Follow these instrutions to access Claude's claude_desktop_config.json file.

Edit it to include the following JSON entry:

{
  "mcpServers": {
    "mcp-openmsx": {
      "command": "npx",
      "args": ["@nataliapc/mcp-openmsx"],
      "env": {
        "OPENMSX_SHARE_DIR": "C:\\the\\location\\of\\your\\openmsx\\share\\folder"
      }
    }
  }
}

Note

Environment variables are optional. Customize them as you need.

Environment Variables

Variable Description Default Value Example
OPENMSX_EXECUTABLE Path or command to the openMSX executable Auto-detected: openmsx (Linux), /Applications/openMSX.app/Contents/MacOS/openmsx (macOS), openmsx.exe (Windows) /usr/local/bin/openmsx or C:\Program Files\openMSX\openmsx.exe
OPENMSX_SHARE_DIR Directory containing openMSX data files (machines, extensions, etc.) System dependent /home/myuser/.openmsx/share
OPENMSX_SCREENSHOT_DIR Directory where screenshots will be saved Default for openmsx /myproject/screenshots
OPENMSX_SCREENDUMP_DIR Directory where screen dumps will be saved Default for openmsx /myproject/screendumps
OPENMSX_REPLAYS_DIR Directory where replay files will be saved Default for openmsx /myproject/replays
MCP_TRANSPORT Transport mode (stdio or http) stdio http
MCP_HTTP_PORT Port number for HTTP transport mode 3000 8080
MCP_ALLOWED_ORIGINS Comma-separated list of allowed origins for HTTP transport Empty for all allowed http://localhost,http://mydomain.com

Advanced Manual Usage

Important

This is not needed for using the MCP server, but if you want to install it manually, follow these steps.

The MCP server runs on Linux, macOS, and Windows. Building from source requires Node.js >= 18 and TypeScript.

Manual installation

npm install -g @nataliapc/mcp-openmsx

Manual set of Environment Variables

Set optional environment variables to customize the server:

export OPENMSX_EXECUTABLE="openmsx"
export OPENMSX_SHARE_DIR="/usr/share/openmsx"
export OPENMSX_SCREENSHOT_DIR="/my_project/screenshots"
export OPENMSX_SCREENDUMP_DIR="/my_project/screendumps"
export OPENMSX_REPLAYS_DIR="/my_project/replays"
export MCP_HTTP_PORT=3000
export MCP_ALLOWED_ORIGINS="http://localhost,http://mydomain.com"

As MCP Server (stdio)

mcp-openmsx

As HTTP Server

MCP_TRANSPORT=http mcp-openmsx
# or
mcp-openmsx http

Development

Important

This is not needed for using the MCP server, but if you want to contribute or modify the code, follow these steps.

Prerequisites to build

  • Node.js >= 18.0.0
  • TypeScript
  • openMSX emulator installed

Building

git clone https://github.com/nataliapc/mcp-openmsx.git
cd mcp-openmsx/mcp-server
npm install
npm run build

Running in Development

npm run dev

License

GPL2 License - see LICENSE file for details.

Support

If you need help, or have questions or suggestions, please open an issue on the GitHub Issues page or check the project discussions.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

More stars!

Please give us a star on GitHub if you like this project.

Star History Chart

Star History


Release History

VersionChangesUrgencyDate
v1.2.9# What's New ## Unit Test Suite - **Vitest test framework added** β€” The project now includes a full unit test suite using [Vitest](https://vitest.dev/). Run tests with `npm test`, watch mode with `npm run test:watch`, and coverage reports with `npm run test:coverage`. - **Command queue tests** β€” Covers `sendCommand()` serialization, reply parsing (success/error/HTML entities), concurrent command queuing, 10-second timeout behavior, buffer desync prevention, and error recovery after failurHigh4/15/2026
v1.2.8# What's New ## Windows: TCP + SSPI Authentication (Breaking Protocol Change) - **TCP socket with SSPI authentication** β€” The Windows communication has been completely rewritten. The previous named-pipe approach (`-control pipe:<name>`) is replaced by TCP socket connection with SSPI (Negotiate/NTLM) authentication, matching the protocol used by the [openMSX debugger](https://github.com/openMSX/debugger). This fixes emulator control reliability on Windows. The optional `node-expose-sspi` npHigh4/11/2026
v1.2.7# What's New ## Windows: Correct Control Protocol - **Named pipe control for Windows** β€” The MCP server now uses `-control pipe:<name>` on Windows instead of `-control stdio`. This follows the [official openMSX documentation](https://openmsx.org/manual/openmsx-control.html) and fixes a known issue where the `StdioConnection` stdin reader thread hangs on exit because `read()` never unblocks cleanly on Windows. Commands are sent to openMSX via a Windows named pipe (`\\.\pipe\openmsx-mcp-<pidMedium4/9/2026
v1.2.6# What's New ## New Features - **RAM byte-sequence search** β€” `debug_memory.searchBytes` scans a range of RAM for a given sequence of bytes, making it easy to locate routines, data structures, or magic values at runtime without manual stepping. - **VRAM byte-sequence search** β€” `debug_vdp.searchBytes` does the same across Video RAM, useful for finding sprite tables, tile patterns, or screen data that has been loaded into VRAM. ## Bug Fixes & Cross-Platform Improvements - **Windows: Medium4/8/2026
v1.2.5# What's New ## New Features - **Screenshot double-size option** β€” The screenshot command now supports a doublesize option for higher resolution captures. - **Key combo support** β€” New emu_keyboard.sendKeyCombo command allows sending keyboard combinations (e.g. CTRL+STOP) to the openMSX emulator. - **Interactive machine & extension resolution** β€” The launch command now uses user elicitation to interactively resolve machine type and extensions when not explicitly specified. - **Structured CoMedium3/27/2026
v1.2.4- Refactored the server codebase into separate modules for Tools, Resources, and Prompts, improving maintainability and structure. - Enhanced the handling of BASIC `setProgram` tool for more robust BASIC program management. - Updated project dependencies to their latest versions for improved stability and compatibility. Low8/1/2025
v1.2.3**Vector Database:** - Updated the embedded **Vector Database** (RAG) with a lot of new resources embeddings. **Tools:** - Adding auto-detection of the **openMSX** share directory when `OPENMSX_SHARE_DIR` is missing or empty. **Resources:** - Adds MSX-DOS resources about environment variables, and know file extensions. - Now, a lot of external resources are local. **Others:** - README enhances installation and usage instructions. - README architecture diagram enhanced and updated.Low7/23/2025
v1.2.2**Vector Database:** - Includes an embedded **Vector Database** (RAG) to enable semantic searches across the available **MSX** resources. **Tools:** - `vector_db_query`: A new tool that semantically queries the vector database of embeddings to retrieve the most relevant resource data for any given question. - `msxdocs_resource_get`: Retrieve MCP resources for MCP clients that don't support MCP resources. **Resources:** - Adds a local comprehensive set of markdown files containing documLow7/20/2025
v1.1.15**Tools:** - Adds a new tool `msxdocs_resource_get` that allows clients to retrieve MSX documentation resources directly, addressing the needs of clients that may not natively support MCP resources. **Resources:** - Adds SDCC 4.5.2 Manual - Adds technical documentation for MoonSound and MGSC MML - Simplifies MSX BASIC instruction template completion - Adds instruction index to Z80 documentation **Others:** - Sanitizes HTML content fetched from URLs - Updates MCP SDK dependency - CoLow7/12/2025
v1.1.14- Improved resources. Low7/7/2025
v1.1.13- Extends `emu_replay` functionality: `advanceFrame`, `reverseFrame`. - Enhanced `basic_programming` functionality: `isBasicAvailable`, `setProgram`. - Improved tool descriptions with command details. - Updated **tool** and **resources** registration process to latest version of MCP SDK. - Added [msx.org Wiki BASIC](https://www.msx.org/wiki/Category:MSX-BASIC_Instructions) instruction documents for MSX development as **MCP Resources**. Low7/5/2025
v1.1.8- Adds MSX documentation resources to the server Added +60 technical documents for MSX development as MCP Resources. Some of them included directly in the MCP and others accessible via download when queried. They are organized into the following categories: - `Processors` (Z80, R800) - `Bios` (Bios ROM, DOS ROM, SUBROM, ...) - `System` - `Audio` - `Video` - `Programming` (ASM, BASIC, ...) - `MSX-DOS` - `MSX-UNAPI` And two books: - `MSX2 Technical Handbook` - `The MSX Red BLow7/3/2025
v1.1.5- Minor bugfixes and improvements - Supports `OPENMSX_REPLAYS_DIR` env for custom user replays folder. - Adds BASIC tools to facilitate BASIC programming: `newProgram`: clears the current BASIC program. `setProgram <program>`: sets/updates the current BASIC program to the specified program string. `runProgram`: runs the current BASIC program. `getFullProgram`: returns the current BASIC program as a plain text string. `getFullProgramAdvanced`: returns the current BASIC program with the rLow6/23/2025
v1.1.4- Improves command encoding - Adds inspector for testing (`make inspector`) Low6/12/2025
v1.1.3- Improves error handling and Refines descriptions for better context. - Enhances README with quick start guide. - Refactors build process with server-side Makefile.Low6/11/2025
v1.1.2- Bugfix obtaining machines/extensions descriptions. Low6/9/2025
v1.1.0- Adds "emu_replay" tool which allows the model agent to manage replays using the ["reverse"](https://openmsx.org/manual/commands.html#reverse) openMSX console command. - Adds "wait" command in "emu_control" tool to allow the model agent to perform a wait in seconds. Low6/8/2025
v1.0.0First releaseLow6/8/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

stigixStigix is a lab platform to validate SD‑WAN and SASE. ​ It unifies SaaS traffic generation, security tests, convergence probes, and voice/IoT/VyOS simulations in one web UIv1.2.2-patch.81
kibiRepo-local, per-git-branch, queryable knowledge base for LLM Agents.kibi-opencode@0.8.0
claw-pilotMulti-agent orchestration runtime with task board, flow engine, budget control, MCP integration and real-time dashboard. Self-hosted on Linux/macOS.v0.81.1
trace-mcpMCP server for Claude Code and Codex. One tool call replaces ~42 minutes of agent explorationv1.28.0
@baseplate-dev/plugin-aiAI agent integration plugin for Baseplate β€” generates AGENTS.md, CLAUDE.md, .mcp.json, and .agents/ configuration files0.6.8