C64 Bridge — Claude Code MCP server: drive a Commodore 64 from chat
An MCP server that lets an AI client run programs, poke memory, draw graphics and play sound on a Commodore 64, either on real hardware or in VICE.
claude mcp add --env LOG_LEVEL=<LOG_LEVEL> --env C64BRIDGE_CONFIG=<C64BRIDGE_CONFIG> --env C64_MODE=<C64_MODE> --env C64U_HOST=<C64U_HOST> --env C64U_PORT=<C64U_PORT> --transport stdio c64-bridge -- npx -y c64bridgeWhat C64 Bridge does
C64 Bridge exposes the Commodore 64 to an agent as a set of grouped MCP tools: c64_program, c64_memory, c64_graphics, c64_sound and others. Through them the client runs BASIC, 6510 assembly, PRG and CRT images, reaches into memory, puts pictures on screen and plays audio. Hardware targets are the C64 Ultimate, Ultimate 64 and U2-family cartridges; VICE emulator sessions work too. With both configured, c64_select_backend moves between them at runtime, so hardware and emulation fit in one conversation.
The server uses the official TypeScript @modelcontextprotocol/sdk and speaks stdio for local integration. An optional HTTP bridge is there for manual inspection. Resources and prompts ship alongside the tools.
Node.js 24+ and npm are needed before starting. The backend is chosen through environment variables such as C64_MODE, C64U_HOST, C64U_PORT and the VICE binary path. Point one of those at the wrong place and the connection simply fails. If your C64 work belongs next to your code, this keeps it in the same window.
What it helps with
- Run a BASIC listing on a real Commodore 64 from the chat
- Dump and patch a memory block on hardware or in VICE
- Render a picture and push it to the C64 screen
- Play a SID tune through the emulator
- Move a session from hardware to VICE without restarting
Example prompts for the agent
- Run this PRG on the C64 Ultimate and show me the screen
- Read the memory at that address and print a hex dump
- Render a picture with
c64_graphicsand put it on screen
How to install C64 Bridge
Platform CLI
claude mcp add --env LOG_LEVEL=<LOG_LEVEL> --env C64BRIDGE_CONFIG=<C64BRIDGE_CONFIG> --env C64_MODE=<C64_MODE> --env C64U_HOST=<C64U_HOST> --env C64U_PORT=<C64U_PORT> --transport stdio c64-bridge -- npx -y c64bridgeReplace <…> with your own values. 5 more environment variables are in the server README
Platform CLI
codex mcp add c64-bridge --env LOG_LEVEL=<LOG_LEVEL> --env C64BRIDGE_CONFIG=<C64BRIDGE_CONFIG> --env C64_MODE=<C64_MODE> --env C64U_HOST=<C64U_HOST> --env C64U_PORT=<C64U_PORT> -- npx -y c64bridgeReplace <…> with your own values. 5 more environment variables are in the server README
Config file
{
"mcpServers": {
"c64-bridge": {
"command": "npx",
"args": [
"-y",
"c64bridge"
],
"env": {
"LOG_LEVEL": "<LOG_LEVEL>",
"C64BRIDGE_CONFIG": "<C64BRIDGE_CONFIG>",
"C64_MODE": "<C64_MODE>",
"C64U_HOST": "<C64U_HOST>",
"C64U_PORT": "<C64U_PORT>"
}
}
}
}Replace <…> with your own values. 5 more environment variables are in the server README
Config file
{
"servers": {
"c64-bridge": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"c64bridge"
],
"env": {
"LOG_LEVEL": "<LOG_LEVEL>",
"C64BRIDGE_CONFIG": "<C64BRIDGE_CONFIG>",
"C64_MODE": "<C64_MODE>",
"C64U_HOST": "<C64U_HOST>",
"C64U_PORT": "<C64U_PORT>"
}
}
}
}Replace <…> with your own values. 5 more environment variables are in the server README
Platform CLI
gemini mcp add -e LOG_LEVEL=<LOG_LEVEL> -e C64BRIDGE_CONFIG=<C64BRIDGE_CONFIG> -e C64_MODE=<C64_MODE> -e C64U_HOST=<C64U_HOST> -e C64U_PORT=<C64U_PORT> c64-bridge npx -y c64bridgeReplace <…> with your own values. 5 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about C64 Bridge
How do I install C64 Bridge in Claude Code?
Run claude mcp add c64bridge -e C64U_PASSWORD=<C64U_PASSWORD> -e GITHUB_TOKEN=<GITHUB_TOKEN> -- npx -y c64bridge. The alternative form spells out the variables: `claude mcp add --env LOG_LEVEL=<LOG_LEVEL> --env C64BRIDGE_CONFIG=<C64BRIDGE_CONFIG> --env C64_MODE=<C64_MODE> --env C64U_HOST=<C64U_HOST> --env C64U_PORT=<C64U_PORT> --transport stdio c64-bridge -- npx -y c64bridge`.
What does C64 Bridge do?
It hands the agent tools for running programs, touching memory, drawing graphics, playing sound, handling disks and printing on a Commodore 64. The backend can be C64 Ultimate hardware, a U2 cartridge or the VICE emulator.
Do I need VICE if I own the real machine?
No. The server drives C64 Ultimate, Ultimate 64 and U2-family hardware directly. When both sides are configured, c64_select_backend switches between them mid-session.