ViceMCP bridges the gap between modern AI assistants and retro computing by exposing the VICE Commodore emulator's powerful debugging capabilities through the Model Context Protocol (MCP). This enables AI assistants like Claude to directly interact with running Commodore 64, VIC-20, PET, and other 8-bit Commodore computer emulations.
- ๐ค AI Integration - Use Claude or other MCP clients to debug Commodore programs
- ๐ Memory Operations - Read, write, search, and analyze memory in real-time
- ๐ Advanced Debugging - Set breakpoints, step through code, examine registers
- โก Batch Commands - Execute multiple operations in one shot for 10x performance
- ๐ฆ Zero Dependencies - Native AOT builds available - no .NET runtime needed!
- ๐ Cross-Platform - Works on Windows, macOS, and Linux
- ๐ฎ Multi-Machine Support - C64, C128, VIC-20, PET, Plus/4, and more
Execute multiple VICE operations in a single command for massive performance gains:
execute_batch [
{"command": "write_memory", "parameters": {"startHex": "0xD020", "dataHex": "00"}},
{"command": "write_memory", "parameters": {"startHex": "0xD021", "dataHex": "05"}},
{"command": "fill_memory", "parameters": {"startHex": "0x0400", "endHex": "0x07E7", "pattern": "A0"}},
{"command": "write_memory", "parameters": {"startHex": "0x0400", "dataHex": "08 05 0C 0C 0F"}}
]Result: Set border/background colors, clear screen, and write "HELLO" in ~1.4 seconds instead of ~14 seconds!
Check out the batch_examples/ directory for ready-to-use JSON files.
Download the latest release for your platform from the releases page.
Native AOT Builds Available! ๐ No .NET runtime required - just download and run:
vicemcp-linux-x64- Linux x64 native executablevicemcp-windows-x64- Windows x64 native executablevicemcp-macos-x64- macOS Intel native executablevicemcp-macos-arm64- macOS Apple Silicon native executable
docker run -it ghcr.io/barryw/vicemcp:latest# Using Docker image directly
claude mcp add vicemcp "docker run -i --rm ghcr.io/barryw/vicemcp:latest"
# With VICE binary path mounted (if you have VICE installed locally)
claude mcp add vicemcp "docker run -i --rm -v /usr/local/bin:/vice:ro ghcr.io/barryw/vicemcp:latest" --env VICE_BIN_PATH=/vice{
"mcpServers": {
"vicemcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/barryw/vicemcp:latest"],
"env": {
"VICE_MONITOR_PORT": "6502"
}
}
}
}# docker-compose.yml
version: '3.8'
services:
vicemcp:
image: ghcr.io/barryw/vicemcp:latest
stdin_open: true
tty: true
environment:
- VICE_MONITOR_PORT=6502
- VICE_STARTUP_TIMEOUT=5000Then configure with:
claude mcp add vicemcp "docker-compose run --rm vicemcp"git clone https://github.com/barryw/ViceMCP.git
cd ViceMCP
dotnet buildx64sc -binarymonitor -binarymonitoraddress 127.0.0.1:6502# If you downloaded the release binary
claude mcp add vicemcp ~/Downloads/vicemcp-osx-arm64/ViceMCP
# Or if you built from source
claude mcp add vicemcp ~/RiderProjects/ViceMCP/ViceMCP/bin/Release/net9.0/ViceMCP
# Or using Docker (no installation needed!)
claude mcp add vicemcp "docker run -i --rm ghcr.io/barryw/vicemcp:latest"With VICE path configured (if not in system PATH):
claude mcp add vicemcp ~/Downloads/vicemcp-osx-arm64/ViceMCP --env VICE_BIN_PATH=/Applications/vice-x86-64-gtk3-3.8Add to your Claude Desktop or other MCP client configuration:
{
"mcpServers": {
"vicemcp": {
"command": "/path/to/vicemcp",
"env": {
"VICE_BIN_PATH": "/path/to/vice/bin"
}
}
}
}Ask your AI assistant to:
- "Read memory from $C000 to $C100"
- "Set a breakpoint at $0810"
- "Show me the current CPU registers"
- "Find all JSR $FFD2 instructions in memory"
Memory Operations (click to expand)
Read bytes from memory and display in hex format.
Parameters:
- startHex: Start address (e.g., "0x0400" or "0400")
- endHex: End address
Returns: Hex string like "08-05-0C-0C-0F"Write bytes to memory.
Parameters:
- startHex: Start address
- dataHex: Space-separated hex bytes (e.g., "A9 00 8D 20 D0")
Returns: Confirmation with bytes writtenCopy memory from one location to another.
Parameters:
- sourceHex: Source start address
- destHex: Destination start address
- length: Number of bytes to copy
Returns: Confirmation of copy operationFill memory region with a byte pattern.
Parameters:
- startHex: Start address
- endHex: End address
- pattern: Hex bytes to repeat (e.g., "AA 55")
Returns: Confirmation with pattern usedSearch for byte patterns in memory.
Parameters:
- startHex: Search start address
- endHex: Search end address
- pattern: Hex bytes to find (e.g., "A9 00" for LDA #$00)
- maxResults: Maximum matches to return (default: 10)
Returns: List of addresses where pattern foundCompare two memory regions.
Parameters:
- addr1Hex: First region start
- addr2Hex: Second region start
- length: Bytes to compare
Returns: List of differences or "regions identical"CPU Control (click to expand)
Get all CPU register values.
Returns: A, X, Y, PC, SP, and status flagsSet a CPU register value.
Parameters:
- registerName: Register name (A, X, Y, PC, SP)
- valueHex: New value in hex
Returns: Confirmation of register updateStep CPU by one or more instructions.
Parameters:
- count: Instructions to step (default: 1)
- stepOver: Step over subroutines (default: false)
Returns: Number of instructions steppedResume execution after breakpoint.
Returns: "Execution resumed"Reset the emulated machine.
Parameters:
- mode: "soft" or "hard" (default: "soft")
Returns: Reset confirmationBreakpoint Management (click to expand)
Set a breakpoint/checkpoint.
Parameters:
- startHex: Start address
- endHex: End address (optional)
- stopWhenHit: Stop execution on hit (default: true)
- enabled: Initially enabled (default: true)
Returns: Checkpoint number and address rangeList all checkpoints.
Returns: List with status, address range, hit countDelete a checkpoint.
Parameters:
- checkpointNumber: Checkpoint # to delete
Returns: Confirmation of deletionEnable or disable a checkpoint.
Parameters:
- checkpointNumber: Checkpoint # to toggle
- enabled: true to enable, false to disable
Returns: New checkpoint stateFile Operations (click to expand)
Load a PRG file into memory.
Parameters:
- filePath: Path to PRG file
- addressHex: Override load address (optional)
Returns: Load address and size informationSave memory region to file.
Parameters:
- startHex: Start address
- endHex: End address
- filePath: Output file path
- asPrg: Save as PRG with header (default: true)
Returns: Confirmation with bytes savedSystem Control (click to expand)
Launch a VICE emulator instance.
Parameters:
- emulatorType: x64sc, x128, xvic, xpet, xplus4, xcbm2, xcbm5x0
- arguments: Additional command line arguments
Returns: Process ID and monitor portGet VICE version information.
Returns: VICE version and SVN revisionCheck if VICE is responding.
Returns: "Pong! VICE is responding"List available memory banks.
Returns: List of bank numbers and namesCapture current display.
Parameters:
- useVic: Use VIC (true) or VICII/VDC (false)
Returns: Display dimensions and image data sizeQuit the VICE emulator.
Returns: Confirmation of quitSend keyboard input to VICE.
Parameters:
- keys: Text to type (use \n for Return)
Returns: Confirmation of keys sentExecute multiple VICE commands in a single operation for significantly improved performance.
Parameters:
- commandsJson: JSON array of command specifications
- failFast: Stop on first error (default: true)
Returns: JSON with results of all commands๐ Performance Tip: Always use batch execution for multiple related operations. Setting up a sprite display can be 10x faster using batch vs individual commands. See batch_examples/ for examples.
AI: Let me examine what caused the crash...
> read_memory 0x0100 0x01FF // Check stack
> get_registers // See CPU state
> read_memory 0xC000 0xC020 // Examine code at PC
AI: I'll search for all JSR instructions to $FFD2...
> search_memory 0x0800 0xBFFF "20 D2 FF"
AI: Let me load your program and set a breakpoint...
> load_program "game.prg"
> set_checkpoint 0x0810 // Break at start
> continue_execution
> step 10 true // Step over subroutines
AI: I'll check if the sprite data was copied correctly...
> compare_memory 0x2000 0x3000 64
AI: I'll create a red heart sprite in the center of the screen...
> execute_batch [
{"command": "write_memory", "parameters": {"startHex": "0xD020", "dataHex": "00"}, "description": "Black border"},
{"command": "write_memory", "parameters": {"startHex": "0xD021", "dataHex": "00"}, "description": "Black background"},
{"command": "fill_memory", "parameters": {"startHex": "0x0400", "endHex": "0x07E7", "pattern": "20"}, "description": "Clear screen"},
{"command": "write_memory", "parameters": {"startHex": "0x0340", "dataHex": "00 66 00 01 FF 80 03 FF C0 07 FF E0 0F FF F0..."}, "description": "Heart sprite data"},
{"command": "write_memory", "parameters": {"startHex": "0x07F8", "dataHex": "0D"}, "description": "Set sprite pointer"},
{"command": "write_memory", "parameters": {"startHex": "0xD015", "dataHex": "01"}, "description": "Enable sprite 0"},
{"command": "write_memory", "parameters": {"startHex": "0xD000", "dataHex": "A0"}, "description": "Center X position"},
{"command": "write_memory", "parameters": {"startHex": "0xD001", "dataHex": "86"}, "description": "Center Y position"},
{"command": "write_memory", "parameters": {"startHex": "0xD027", "dataHex": "02"}, "description": "Red color"}
]
// Result: Beautiful red heart sprite in 1.4 seconds! (vs 14+ seconds individually)
ViceMCP is built with:
- .NET 9.0 - Modern, cross-platform runtime
- Model Context Protocol - Standardized AI tool interface
- vice-bridge-net - Robust VICE binary monitor implementation
- Async/await patterns - Efficient concurrent operations
- .NET 9.0 SDK
- VICE emulator
- Git
dotnet build
dotnet test
dotnet run --project ViceMCP/ViceMCP.csprojdotnet testTests use mocking to run without VICE, ensuring fast CI/CD.
- ๐ฎ Game Development - Debug crashes, optimize routines, trace execution
- ๐ Reverse Engineering - Analyze vintage software behavior
- ๐ Education - Learn 6502 assembly with AI assistance
- ๐ ๏ธ Tool Development - Automate debugging workflows
- ๐ Demoscene - Profile and optimize demo effects
See KNOWN_ISSUES.md for any current limitations.
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
This project is licensed under the MIT License - see LICENSE for details.
- VICE Team - The amazing Commodore emulator
- Anthropic - Model Context Protocol
- Miha Markic - vice-bridge-net library
- The Commodore community for keeping the 8-bit dream alive