
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Your AI Bridge for the Commodore 64.
Model Context Protocol (MCP) server for driving a Commodore 64 with AI via the REST API of the Commodore 64 Ultimate or Ultimate 64. It is built on the official TypeScript @modelcontextprotocol/sdk and communicates over the stdio transport.
Exposes tools and knowledge that enable LLM agents to upload and run BASIC or assembly programs, read/write RAM, control the VIC or SID, print documents, and more.
The Model Context Protocol (MCP) defines a universal, secure, and consistent way for LLM-based applications to connect with external systems and data sources.
Often called “the USB-C port for AI”, it provides a standardized interface that allows language models to access information and perform actions safely, predictably, and repeatably.
Although it resembles a traditional API, MCP is designed specifically for the way LLMs think and interact. An MCP server can:
C64-MCP applies this to the Commodore 64, serving as an AI bridge and control deck.
You’re the Commodore at the helm — AI assists, extending the reach of your commands into the 8-bit world.
Let's compose a children song on the C64 using ChatGPT and VS Code:
play a children song on the c64.The following image shows the final output, using the C64 Stream OBS plugin to capture the C64 video and audio output:

Now create a PETSCII image related to that song the following image of ducks swimming on a pond appears:
...and our C64 is now AI-powered!
The installation consists of two steps: Installing Node.js and then installing and running the MCP server.
Requires Node.js 18+ (20+ recommended) and npm.
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install -y curl ca-certificates
# Option A: distro packages (may be older)
sudo apt install -y nodejs npm
# Option B (recommended): NodeSource LTS (20.x)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
macOS
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # if Homebrew not installed
brew install node@20
brew link --overwrite node@20
Windows
# Option A: winget (Windows 10/11)
winget install OpenJS.NodeJS.LTS
# Option B: Chocolatey
choco install nodejs-lts -y
Verify:
node --version # v18+ (v20+ recommended)
You have three options to install and run the MCP server: quick start with npx, persistent install via npm, or install from source via GitHub if you want to run tests and contribute.
Run the prebuilt server without creating a project. npx downloads the package and expands all bundled files on disk for this session.
npx -y c64-mcp@latest
By default, the MCP server looks for ~/.c64mcp.json. To target your device, create:
{
"c64u": {
"host": "<hostname or IP>",
"port": 80
}
}
This installs the prebuilt c64-mcp Node package from npm and then runs the server. No build step required.
mkdir -p ~/c64-mcp && cd ~/c64-mcp
npm init -y
npm install c64-mcp
Create ~/.c64mcp.json with your device settings:
{ "c64u": { "host": "c64u" } }
node ./node_modules/c64-mcp/dist/index.js
Notes
doc/, data/, and mcp.json.RAG_BUILD_ON_START=1) apply the same as in a source checkout.Use this path if you plan to run tests or contribute code; npm start automatically prefers the TypeScript sources (via ts-node) when they are available and falls back to the compiled JavaScript otherwise.
git clone https://github.com/chrisgleissner/c64-mcp.git
cd c64-mcp
npm install
npm start
The dev server runs via ts-node; to build the compiled output, you can run:
npm run build
By default the server speaks MCP over stdio, which is the recommended mode for local editor integrations such as GitHub Copilot. If you need to expose the server to other machines, you can bridge it over HTTP with:
npm start -- --http [<port>]
Omitting the port uses 8000. Only switch to HTTP when remote clients require it; stdio remains the preferred option because it avoids extra networking and keeps tool discovery automatic inside your editor.
GitHub Copilot Chat (version 1.214+) includes native MCP support. To enable C64 MCP integration:
Add this configuration to your workspace .vscode/settings.json (stdio transport):
{
"github.copilot.chat.experimental.mcp": {
"servers": [
{
"name": "c64-mcp",
"command": "node",
"args": ["./node_modules/c64-mcp/dist/index.js"],
"type": "stdio"
}
]
}
}
MCP clients discover tools dynamically at runtime; no manifest file is required.
Normally it gets started automatically, but if not, please see the previous chapter on Installing and Running the MCP Server.
Keep this running—it will log successful connectivity to your C64 device.
More system, drive, file, streaming, and SID tools are available. For the full list and parameters, ask the MCP client to list tools.
Agent, Ask, Edit, and C64. The C64 option should be auto-discovered from the .github/chatmodes/c64.chatmode.md file bundled with this project.
Prompt Copilot with "Print a greeting on the screen" to watch the MCP server upload and execute a BASIC greeting on your C64.
You should now see a greeting on the screen of your C64 device:

mcp.json: project configuration (entry point, env vars, metadata).AGENTS.md — Quick-start guidance for automation agents and persona definitions.doc/MCP_SETUP.md — More details on MCP setup and integration with Visual Code.doc/developer.md — Development environment and workflow details. Also covers how to extend and rebuild the local RAG embeddings.doc/rest/c64-openapi.yaml — OpenAPI 3.1 description of the REST surface.data/context/bootstrap.md — Core primer injected ahead of agent prompts.The MCP server reads its configuration from a JSON file called .c64mcp.json which is resolved as follows (first match wins):
C64MCP_CONFIG env var containing the absolute path to the config file~/.c64mcp.json (from user home)./c64mcp.json (from current working directory)If no config file is found, it uses defaults: host=c64u, port=80
The configuration has a dedicated section for each supported platform (i.e. a real or software-emulated C64 device) as described in the chapters below.
Use this section to point the server at an Commodore 64 Ultimate or Ultimate 64 device.
Provide the host (DNS name or IP, defaults to c64u) and a port (defaults to 80).
{
"c64u": {
"host": "c64u",
"port": 80
}
}
[!NOTE] This is an experimental feature that is currently very limited.
This backend starts a fresh VICE process for each PRG run using the emulator binary. In phase one, memory/register operations are not supported; the focus is deterministic PRG execution.
{
"vice": {
"exe": "/usr/bin/x64sc"
}
}
Notes:
If vice.exe is not set, the server attempts to find x64sc (or x64) on your PATH.
Each program execution spawns a new VICE instance, e.g.:
x64sc -autostart "program.prg" -silent -warp
Backend selection is automatic with clear logging. The following precedence applies:
C64_MODE=c64u or C64_MODE=vice is set in the environment, that backend is used.c64u or vice is configured, it is used.c64u unless VICE is explicitly requested via C64_MODE=vice.http://c64u); if unavailable, fall back to VICE.On startup, the server logs the selected backend and reason, for example:
Active backend: c64u (from config)Active backend: vice (fallback – hardware unavailable)By default, the server logs info-level messages and above.
To enable debug logging, set the environment variable LOG_LEVEL=debug before starting the server.
In Visual Code, you can achieve this via an entry in your .env file at the project root:
LOG_LEVEL=debug
Please note that all logs use stderr since stdout is reserved for the MCP protocol messages.
npm run build — type-check the TypeScript sources, normalize the dist layout for packaging, and regenerate the MCP API tables in README.md.npm test — run the integration tests against an in-process mock that emulates the c64 REST API.npm test -- --real — exercise the same tests against a real c64 device. The runner reuses your MCP config (~/.c64mcp.json or C64MCP_CONFIG) to determine the REST endpoint. You can also override explicitly with --base-url=http://<host>.npm run check — convenience command that runs both the type-check and the mock-backed test suite.The test runner accepts the following options:
--mock (default): use the bundled mock hardware emulator.--real: talk to physical hardware (requires reachable C64 device).--base-url=http://host[:port]: override the REST endpoint when running with --real.Program uploaders, runners, and compilation workflows for BASIC, assembly, and PRG files.
Workflow hints:
Default tags: programs, execution
| Name | Description | Tags |
|---|---|---|
load_prg_file | Load a PRG into C64 memory without executing it. | programs, execution, file |
run_crt_file | Run a cartridge image stored on the Ultimate filesystem. | programs, execution, cartridge |
run_prg_file | Run a PRG located on the Ultimate filesystem without uploading source. | programs, execution, file |
upload_and_run_asm | Assemble 6502/6510 source code, upload the PRG, and run it immediately. See c64://specs/assembly. | programs, execution, assembly |
upload_and_run_basic | Upload a BASIC program to the C64 and execute it immediately. Refer to c64://specs/basic for syntax and device I/O. | programs, execution, basic |
Screen, main memory, and low-level inspection utilities.
Workflow hints:
Default tags: memory, debug
| Name | Description | Tags |
|---|---|---|
read_memory | Read a range of bytes from main memory and return the data as hexadecimal. Consult c64://specs/assembly and docs index. | memory, debug, hex |
read_screen | Read the current text screen (40x25) and return its ASCII representation. For PETSCII details, see c64://specs/basic. | memory, debug, screen |
write_memory | Write a hexadecimal byte sequence into main memory at the specified address. See c64://context/bootstrap for safety rules. | memory, debug, hex, write |
SID composition, playback, and audio analysis workflows.
Workflow hints:
Default tags: sid, audio
| Name | Description | Tags |
|---|---|---|
analyze_audio | Automatically analyze SID playback when the user requests verification feedback. | sid, audio, analysis |
modplay_file | Play a MOD tracker module stored on the Ultimate filesystem. | sid, audio, playback |
music_compile_and_play | Compile a SIDWAVE composition to PRG or SID and optionally play it immediately. | sid, audio, music, compiler |
music_generate | Generate a lightweight arpeggio and schedule playback on SID voice 1. | sid, audio, music, generator |
record_and_analyze_audio | Record audio from the default input device and analyze SID playback characteristics. | sid, audio, analysis |
sid_note_off | Release a SID voice by clearing its GATE bit. | sid, audio, control, music |
sid_note_on | Trigger a SID voice with configurable waveform, pulse width, and ADSR envelope. See c64://specs/sid. | sid, audio, control, music |
sid_reset | Reset the SID chip either softly (silence) or with a full register scrub. | sid, audio, control |
sid_silence_all | Silence all SID voices by clearing control and envelope registers. | sid, audio, control |
sid_volume | Set the SID master volume register at $D418. See c64://specs/sid. | sid, audio, control |
sidplay_file | Play a SID file stored on the Ultimate filesystem via the firmware player. | sid, audio, playback |
Power, reset, pause/resume, and diagnostic controls for the C64 and Ultimate hardware.
Workflow hints:
Default tags: machine, control
| Name | Description | Tags |
|---|---|---|
menu_button | Toggle the Ultimate 64 menu button. | machine, control, menu |
pause | Pause the machine using DMA halt. See memory safety checklist in c64://context/bootstrap. | machine, control, pause |
poweroff | Power off the machine via Ultimate firmware. See safety notes in c64://context/bootstrap. | machine, control, power |
reboot_c64 | Reboot the Ultimate firmware and C64. See c64://context/bootstrap. | machine, control, reboot |
reset_c64 | Reset the C64 via Ultimate firmware. Review c64://context/bootstrap safety rules. | machine, control, reset |
resume | Resume the machine after a DMA pause. | machine, control, resume |
Drive management, disk image creation, and file inspection utilities.
Workflow hints:
Default tags: drive, storage
| Name | Description | Tags |
|---|---|---|
create_d64 | Create a blank D64 disk image on the Ultimate filesystem. | drive, storage, disk, create |
create_d71 | Create a blank D71 disk image on the Ultimate filesystem. | drive, storage, disk, create |
create_d81 | Create a blank D81 disk image on the Ultimate filesystem. | drive, storage, disk, create |
create_dnp | Create a blank DNP disk image on the Ultimate filesystem. | drive, storage, disk, create |
drive_load_rom | Temporarily load a custom ROM into an Ultimate drive slot. | drive, storage, rom |
drive_mode | Set the emulation mode for an Ultimate drive slot (1541/1571/1581). | drive, storage, mode |
drive_mount | Mount a disk image onto a specific Ultimate drive slot. | drive, storage, mount |
drive_off | Power off a specific Ultimate drive slot. | drive, storage, power |
drive_on | Power on a specific Ultimate drive slot. | drive, storage, power |
drive_remove | Remove the currently mounted disk image from an Ultimate drive slot. | drive, storage, unmount |
drive_reset | Reset the selected Ultimate drive slot. | drive, storage, reset |
drives_list | List Ultimate drive slots and their currently mounted images. Read c64://context/bootstrap for drive safety. | drive, storage, status |
file_info | Inspect metadata for a file on the Ultimate filesystem. | drive, storage, info |
PETSCII art, sprite workflows, and VIC-II graphics helpers.
Workflow hints:
Default tags: graphics, vic
| Name | Description | Tags |
|---|---|---|
create_petscii_image | Create PETSCII art from prompts or text, optionally run it on the C64, and return metadata. See c64://specs/basic and c64://specs/vic. | graphics, vic, petscii, basic |
generate_sprite_prg | Generate and execute a PRG that displays a sprite from raw 63-byte data. See c64://specs/vic for registers. | graphics, vic, sprite, assembly |
render_petscii_screen | Render PETSCII text to the screen with optional border/background colours. See c64://specs/basic. | graphics, vic, basic, screen |
Printer workflow helpers for Commodore MPS and Epson FX devices, including prompt templates.
Workflow hints:
Default tags: printer
| Name | Description | Tags |
|---|---|---|
define_printer_chars | Define custom characters on Commodore MPS printers using DLL mode. | printer, dll, commodore |
print_bitmap_commodore | Print a Commodore MPS bit-image row using BIM BASIC helpers. | printer, bitmap, commodore |
print_bitmap_epson | Print an Epson FX bit-image row using ESC/P commands. | printer, bitmap, epson |
print_text | Print text on device 4 using Commodore or Epson workflows. See c64://docs/printer/guide. | printer, text |
Retrieval-augmented generation helpers for BASIC and assembly examples.
Workflow hints:
Default tags: rag, search
| Name | Description | Tags |
|---|---|---|
rag_retrieve_asm | Retrieve 6502/6510 assembly references from local knowledge. See c64://specs/assembly. | rag, search, asm |
rag_retrieve_basic | Retrieve BASIC references from local knowledge. See c64://specs/basic before coding. | rag, search, basic |
Configuration management, diagnostics, and helper utilities for advanced workflows.
Workflow hints:
Default tags: developer, config, debug
| Name | Description | Tags |
|---|---|---|
config_batch_update | Apply multiple configuration changes in a single request. | developer, config, debug, write |
config_get | Read a configuration category or specific item. | developer, config, debug, read |
config_list | List configuration categories available on the Ultimate firmware. | developer, config, debug, list |
config_load_from_flash | Load configuration settings from flash storage. | developer, config, debug, flash |
config_reset_to_default | Reset configuration categories to their factory defaults. | developer, config, debug, reset |
config_save_to_flash | Persist current configuration settings to flash storage. | developer, config, debug, flash |
config_set | Set a configuration value within a category. | developer, config, debug, write |
debugreg_read | Read the Ultimate debug register ($D7FF). | developer, config, debug |
debugreg_write | Write a value into the Ultimate debug register ($D7FF). | developer, config, debug |
info | Retrieve Ultimate hardware information and status. | developer, config, debug, diagnostics, info |
version | Retrieve Ultimate firmware and API version information. | developer, config, debug, diagnostics, version |
Long-running or streaming workflows such as audio capture or SID playback monitoring.
Workflow hints:
Default tags: stream, monitoring
| Name | Description | Tags |
|---|---|---|
stream_start | Start an Ultimate streaming session (video/audio/debug) targeting a host:port destination. See c64://docs/index for usage notes. | stream, monitoring, start |
stream_stop | Stop an Ultimate streaming session (video/audio/debug). | stream, monitoring, stop |
| Name | Summary |
|---|---|
c64://docs/index | Explains how to approach each knowledge bundle and when to consult it. |
c64://context/bootstrap | Step-by-step rules for safe automation, verification, and rollback on the C64. |
c64://specs/basic | Token definitions, syntax rules, and device I/O guidance for BASIC v2. |
c64://specs/assembly | Official opcode matrix, addressing modes, and zero-page strategy for the 6510 CPU. |
c64://specs/sid | Register map, waveform behaviour, and ADSR envelopes for expressive SID playback. |
c64://specs/sidwave | Defines the SIDWAVE interchange format used by the SID composer workflow. |
c64://docs/sid/file-structure | Explains PSID/RSID headers, metadata blocks, and compatibility notes for imported music. |
c64://specs/vic | Covers raster timing, sprite control, colour RAM, and bitmap modes on the VIC-II. |
c64://specs/printer | Covers device setup, control codes, and Ultimate 64 integration for printers. |
c64://docs/printer/guide | Quick-look workflow covering setup, troubleshooting, and sample jobs for both printer families. |
c64://docs/printer/commodore-text | Character sets, control codes, and formatting for Commodore MPS text output. |
c64://docs/printer/commodore-bitmap | Details bitmap modes, graphics commands, and data layout for MPS bitmap printing. |
c64://docs/printer/epson-text | Lists ESC/P control codes and formatting advice for Epson FX text output. |
c64://docs/printer/epson-bitmap | Explains bit-image modes, density options, and data packing for Epson bitmap jobs. |
c64://docs/printer/prompts | Reusable prompt templates that drive complex printer jobs through the MCP server. |
| Name | Description |
|---|---|
assembly-program | Author 6502/6510 assembly routines with precise hardware guidance. |
basic-program | Plan, implement, and verify Commodore BASIC v2 programs safely. |
drive-manager | Mount, create, or power drives while preserving running workloads. |
graphics-demo | Create VIC-II graphics demos with safe setup and validation steps. |
memory-debug | Inspect or patch memory ranges with reversible steps and logging. |
printer-job | Send formatted output to Commodore or Epson printers with safe teardown steps. |
sid-music | Compose SID music with expressive phrasing and iterative audio verification. |
If the MCP server is not reachable or VS Code integration isn't working, see the comprehensive troubleshooting guide:
Quick diagnosis commands:
# Start stdio server
npm start
FAQs
Local MCP server for controlling a Commodore 64 via Ultimate 64 REST API
We found that c64-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.