C64UltimateMcpServer
C64 Ultimate MCP Server
Install / Use
/learn @ch0mik/C64UltimateMcpServerQuality Score
Category
Development & EngineeringSupported Platforms
README
C64 Ultimate MCP Server
English | Polski
⚙️ This project was built 100% using AI Agent prompts - Every line of code, configuration, and documentation was generated through conversational prompts to GitHub Copilot Agent.
Comprehensive Model Context Protocol (MCP) server for the Commodore 64 Ultimate device with 45+ tools (45 device operations), 14 MCP prompts, and 38 embedded documentation resources. Built in C# with enterprise-grade architecture, type safety, and comprehensive API coverage.
License: MIT License (see LICENSE file)
🎥 Demo Video
⚡ Key Features
- Complete Ultimate 64 API Support: All 45+ tools from the 1541U REST API
- MCP Prompts Support: 14 prompt templates exposed through
prompts/listandprompts/get - BASIC to PRG Compilation: Real-time compilation of BASIC V2 source code to executable PRG files
- MCP Resources: 38 embedded documentation resources (BASIC specs, Assembly guides, Kernal API, memory maps, graphics, sound, I/O, drive, printer, keyboard/control codes, disassembly)
- Separated Client Library: Reusable
C64UltimateClientNuGet package with clean async API - Clean Architecture: Client → Service → MCP wrapper pattern with proper DI
- HTTP/SSE Transport: Remote multi-client support with session management
- Streaming Support: Video, audio, and debug streaming capabilities
- Binary File Support: Upload PRG files via base64, file path, or URL
- ASP.NET Core 8.0/10.0: Modern, high-performance web framework
- Enterprise Configuration: appsettings.json with environment overrides
- Type Safety: C# static typing with full null-safety and nullable reference types
- Structured Logging: Separate loggers for client and service layers
- Production-Ready: Zero errors/warnings, comprehensive error handling
- Agent Integration: Works with Continue, Copilot, Cody, Cursor, Claude Desktop
🚀 Quick Start
# 1. Build
dotnet build
# 2. Configure (optional, defaults to http://192.168.0.120)
export Ultimate__BaseUrl=http://your-c64-ultimate-ip:port
# 3. Run
dotnet run
# 4. Server starts on http://localhost:8080
📦 Installation
Requirements
- .NET 10.0 SDK - Download
- C64 Ultimate device - On your network
- Curl or HTTP client - For testing
- Docker (optional) - Download
Setup
git clone https://github.com/ch0mik/C64UltimateMcpServer.git
cd C64UltimateMcpServer
dotnet build
dotnet run
⚙️ Configuration
appsettings.json
{
"Ultimate": {
"BaseUrl": "http://192.168.0.120"
}
}
Environment Variable
Ultimate__BaseUrl=http://192.168.0.120
Docker
environment:
- Ultimate__BaseUrl=http://192.168.0.120
🤖 Agent Integration
Continue IDE (Recommended)
- Install Continue - https://continue.dev
- Configure
.continue/config.json:
{
"models": [
{
"title": "Claude",
"provider": "openai",
"model": "claude-3-5-sonnet"
}
],
"mcp_servers": {
"c64-ultimate": {
"url": "http://localhost:8080"
}
}
}
- Use in Chat:
@C64 reboot the device
@C64 load and run /games/loderunner.prg
@C64 what config categories are available?
VS Code Chat (GitHub Copilot)
- Install - GitHub Copilot Chat extension
- Configure
.vscode/settings.json:
{
"github.copilot.chat.mcpServers": [
{
"name": "C64 Ultimate",
"type": "streamable-http",
"url": "http://localhost:8080"
}
]
}
- Use:
@C64 reboot device
@C64 mount disk /games/disk1.d64
Cody (Sourcegraph)
cody mcp add c64-ultimate http://localhost:8080
Then in Cody:
Ask Cody: Use C64 Ultimate MCP to reboot the device
Ask Cody: List all available config categories
Cursor IDE
- Configure
.cursor/mcp.json:
{
"servers": [
{
"name": "C64 Ultimate",
"type": "http",
"url": "http://localhost:8080"
}
]
}
- Use slash commands:
/c64 reboot device
/c64 load program
🛠️ Tools (45 Total)
Machine Control (5)
- ultimate_reset_machine - Soft reset C64 (preserves configuration)
- ultimate_reboot_device - Full device restart (reinitializes cartridge)
- ultimate_pause_machine - Pause machine execution
- ultimate_resume_machine - Resume machine execution
- ultimate_power_off - Power off C64
Program Management (6)
- ultimate_generate_basic_prg - Generate PRG from BASIC source code with token conversion
- ultimate_load_program - Load PRG program from filesystem
- ultimate_run_program - Load and execute PRG from disk
- ultimate_run_prg_binary - Execute program from binary data, URL or file
- ultimate_run_cartridge - Load and run cartridge
- ultimate_menu_button - Simulate menu button press
Memory Management (5)
- ultimate_read_memory - Read C64 RAM memory contents
- ultimate_write_memory - Write to RAM memory
- ultimate_write_memory_binary - Write binary data to memory
- ultimate_get_debug_register - Read debug register
- ultimate_set_debug_register - Write to debug register
Audio Playback (5)
- ultimate_play_sid - Play SID file with optional song number
- ultimate_play_sid_binary - Play SID from binary data, URL or file
- ultimate_play_mod - Play Amiga MOD file
- ultimate_start_stream - Start audio/video/debug stream
- ultimate_stop_stream - Stop active stream
Drive Management (7)
- ultimate_get_drives - Get information about all disk drives
- ultimate_mount_disk - Mount disk image from filesystem or binary data
- ultimate_unmount_disk - Unmount disk image
- ultimate_reset_drive - Reset selected disk drive
- ultimate_set_drive_mode - Change drive operating mode
- ultimate_turn_drive_on - Power on disk drive
- ultimate_turn_drive_off - Power off disk drive
Disk Creation (4)
- ultimate_create_d64 - Create 1541 disk image (D64)
- ultimate_create_d71 - Create 1571 disk image (D71)
- ultimate_create_d81 - Create 1581 disk image (D81)
- ultimate_create_dnp - Create Native Partition disk image (DNP)
ROM Management (1)
- ultimate_load_drive_rom - Load custom ROM to disk drive
File Management (1)
- ultimate_get_file_info - Get file information
Configuration Management (6)
- ultimate_get_config_categories - Get list of available configuration categories
- ultimate_get_config_category - Get all settings in a category
- ultimate_get_config_item - Get single configuration value
- ultimate_set_config_item - Set configuration value
- ultimate_bulk_config_update - Update multiple settings at once
- ultimate_load_config - Load configuration from flash
Note: ultimate_save_config and ultimate_reset_config are also available for configuration management
Connection Management (2)
- ultimate_get_connection - Get current connection settings
- ultimate_set_connection - Change device hostname/port
System Information (1)
- ultimate_version - Get C64 Ultimate API version
💬 Prompts (14 Total)
- c64_basic_program_prompt - Prompt template for generating C64 BASIC V2 programs
- c64_sid_music_prompt - Prompt template for SID composition guidance
Important: prompts are MCP prompts, not tools.
Use prompts/list and prompts/get for prompts, and tools/call only for tools.
�️ Summary (45 Total Tools)
- Machine Control: 5 tools
- Program Management: 6 tools
- Memory Management: 5 tools
- Audio Playback: 5 tools
- Drive Management: 7 tools
- Disk Creation: 4 tools
- ROM Management: 1 tool
- File Management: 1 tool
- Configuration Management: 6 tools
- Connection Management: 2 tools
- System Information: 1 tool
�📚 Resources (38 Total)
Embedded documentation accessible via MCP Inspector at http://localhost:8000:
BASIC Resources (7)
- c64://basic/spec - BASIC V2 Language Specification
- c64://basic/pitfalls - BASIC Pitfalls and Common Gotchas
- c64://basic/examples/hello-world - Hello World Example
- c64://basic/examples/joystick - Joystick Input Example
- c64://basic/examples/bounce - Bounce Animation Example
- c64://basic/examples/wave - Wave Animation Example
- c64://basic/api - BASIC Callable API Reference
Assembly Resources (1)
- c64://assembly/spec - 6510 Assembly Language Specification
Memory Resources (3)
- c64://memory/map - C64 Memory Map (0x0000-0xFFFF)
- c64://memory/kernal - Kernal Memory Map (ROM $E000-$FFFF)
- c64://memory/low - Low Memory Map (0x0000-0x03FF)
Graphics Resources (4)
- c64://graphics/vic - VIC-II Chip Specification
- c64://graphics/charset - Character Set Reference (ASCII/PETSCII)
- c64://graphics/color-palette - C64 16-Color Palette Reference
- c64://graphics/style-guide - Graphics Programming Style Guide
Sound Resources (4)
- c64://sound/sid - SID Chip (6581/8580) Specification
- c64://sound/programming - SID Programming Guide
- c64://sound/file-format - SID File Format Documentation
- c64://sound/effects - Sound Effects Programming Tips
I/O Resources (2)
- c64://io/cia - CIA Chip Specification
- c64://io/spec - I/O Port Specification
Drive Resources (1)
- c64://drive/spec - 1541/1571/1581 Disk Drive Specification
Printer Resources (6)
- c64://printer/commodore-spec - Commodore Printer Specification
- c64://printer/epson-spec - Epson Printer Specification
- c64://printer/commodore-bitmap - Commodore Printer Bi

