c64-kb Builds an MCP Knowledge Base for AI-Assisted Commodore 64 Development
Summary
c64-kb is a BSD-3-Clause-licensed reference knowledge base for AI-assisted Commodore 64 demo and game development, exposed through the Model Context Protocol (MCP). It addresses recurring weaknesses in language-model-generated C64 code, including overreliance on common cc65 patterns and incorrect claims about raster timing, sprite-multiplexing cycles, and SID filter behavior across chip revisions. More than 70 Markdown documents are chunked and embedded in Qdrant for hybrid semantic and keyword search, while entities such as registers, KERNAL routines, memory regions, techniques, recipes, pitfalls, and crash patterns are represented in a FalkorDB knowledge graph. The graph records relationships that flat search may miss, including register use, triggered pitfalls, implementing recipes, and technique conflicts. The repository currently reports 2,413 Qdrant chunks from 74 Markdown files, 550 graph nodes, 989 edges, 73 technique nodes, 41 pitfall nodes, 15 crash-pattern nodes, 17 recipes, 39 KERNAL routines, 24 MCP tools, and 121 passing tests. Its tools cover hardware lookup, toolchain guidance, recipes, compatibility checks, PAL/NTSC timing budgets, failure diagnosis, and demo or game briefings. The intended users are autonomous agent loops and developers working with Claude Code; runtime inspection and emulation remain the responsibility of companion tools such as vice-mcp and sim6502. Setup requires Node.js, Docker, and optionally Ollama with mxbai-embed-large; without Ollama, search falls back to keyword-only retrieval. The documented target is a stock PAL or NTSC C64, while C128, Mega65, SuperCPU, REU, and Ultimate II+ are out of scope.