The backend game engine for Quest Keeper AI. 32 MCP tools (28 consolidated action-routed + 4 meta/event) for complete RPG mechanics. Philosophy: "LLM describes, engine validates" - Database is source of truth. Status: Alpha - 1889 tests passing, 85+ test files, MCP Protocol fully integrated
npm test # Run all tests (Vitest)
npm test -- tests/specific.test.ts # Single test file
npm test -- --watch # Watch mode
npm run build # Compile TypeScript
npm run build:binaries # Create standalone executablessrc/
├── server/
│ ├── consolidated/ # 28 action-routed tool handlers
│ ├── handlers/ # Extracted handler implementations (combat, spatial)
│ ├── index.ts # MCP server entry + transport setup
│ └── meta-tools.ts # search_tools, load_tool_schema
├── engine/
│ ├── combat/ # Encounters, initiative, damage
│ ├── magic/ # Spells, concentration, scrolls, auras
│ ├── spatial/ # Grid, collision, movement
│ ├── worldgen/ # Procedural generation
│ └── strategy/ # Nation simulation
├── storage/ # SQLite repos & migrations
├── schema/ # Zod validation (29 schemas)
├── utils/ # Action router, fuzzy matching
└── math/ # Dice, algebra, physics
tests/ # Mirror of src/ structure (85+ files)
docs/ # White paper, ADRs, LLM spatial guide
fix(component): description # Bug fixes
feat(component): description # New features
test(component): description # Test additions
refactor(component): description # Code cleanup
After successful test pass, immediately commit:
git add . && git commit -m "type(scope): message"Do NOT ask permission for local commits. Just save the state.
- Write failing test (RED)
- Implement fix (GREEN)
- Refactor if needed
- Commit
- Repeat
After building binaries:
copy dist-bundle\rpg-mcp-win.exe "C:\Users\mnehm\Desktop\Quest Keeper AI attempt 2\src-tauri\binaries\rpg-mcp-server-x86_64-pc-windows-msvc.exe"