mcp-c64
An MCP server for developing BASIC and Assembly Language programs for the Commodore 64
claude mcp add --transport stdio cliffhall-mcp-c64 npx -y mcp-c64 \ --env ASM_PATH="/Users/zaphod/Projects/retro-game/asm/" \ --env EMULATOR="/Users/zaphod/vice/x64sc.app/Contents/MacOS/x64sc" \ --env ASSEMBLER="64tass" \ --env TOKENIZER="/Users/zaphod/vice/bin/petcat" \ --env BASIC_PATH="/Users/zaphod/Projects/retro-game/basic/"
How to use
The mcp-c64 server provides an MCP-based development pipeline for Commodore 64 projects. It exposes tools to assemble 6502 assembly into .prg, tokenize BASIC into .prg, and run the resulting programs inside the VICE emulator. A minimal REPL client lets you list available tools, call tools with structured arguments, and view tool outputs. You can interact with the server by invoking the REPL client (npm run repl) or by integrating with editors/IDEs via the provided mcp.json configurations that point to the npx-based server. Available tools include: assemble_program (assemble 64tass into .prg and optional auxiliary files), tokenize_program (tokenize BASIC with petcat), and run_program (launch the .prg in x64sc with optional emulator arguments).
How to install
Prerequisites:
- Node.js and npm installed on your system
- VICE emulator installed (including petcat tokenizer and x64sc)
- 64tass assembler installed and accessible in PATH
Install steps:
- Install Node.js and npm from https://nodejs.org/
- Install the MCP server package (example: npm install -g mcp-c64 or clone the repository and run npm install in the project root)
- Ensure VICE components are installed and accessible:
- petcat tokenizer (provided with VICE)
- x64sc emulator (provided by VICE)
- Create a .env file in the project root and set paths to assembler, tokenizer, emulator, and source folders, e.g.: ASSEMBLER=64tass TOKENIZER=/path/to/petcat EMULATOR=/path/to/x64sc ASM_PATH=./asm/ BASIC_PATH=./basic/
- Start the MCP server (example using npm/npx): npx -y mcp-c64 or if using a local install: npm run start
- Open the REPL (npm run repl) to interact with the server and call tools like assemble_program, tokenize_program, and run_program.
Additional notes
Tips and notes:
- The mcp.json example demonstrates running via npx with environment variables for the required tools. Adjust ASSEMBLER, TOKENIZER, EMULATOR, ASM_PATH, and BASIC_PATH to match your environment.
- The REPL allows you to call tools with structured JSON arguments, for example: {"file":"hello.asm","args":["-a","--cbm-prg"]} for assembling, or {"file":"token.bas","path":"/path/to/basic","args":["-w2"]} for tokenizing.
- Ensure the paths in env variables are correct for your OS (macOS/Linux use forward slashes; Windows paths may differ).
- If you encounter permission issues with npx, consider installing the package locally and running via npm scripts.
- When running programs, you can pass additional emulator arguments (e.g., -exitscreenshot) to capture state or control behavior.
- The environment variables are user-specific; keep them out of version control in production setups.
Related MCP Servers
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
shadcn-ui
MCP server for shadcn/ui component references
advanced-homeassistant
An advanced MCP server for Home Assistant. 🔋 Batteries included.
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.