theEngine includes a zero-LLM-math Model Context Protocol (MCP) and OpenAPI 3.1.0 server (mcp-combat/) built on the exact same TypeScript rules core (shared/genesis-rules/) that powers Caudex Machina (/machina/). AI Game Masters, autonomous aiPC squad companions, IDE agents, and custom apps can execute canonical Caudex Regulum character creation, Character Life survival, 5-step hit-location combat, and High-DWarp astrogation without hallucinating dice math or table lookups.
Core Guarantees
- Zero LLM Math +
mathAudit: Every percentile target, table lookup, armor soak, and state transition runs in deterministic TypeScript and returns a structuredmathAudittrace (rollsUsed,rollSource,tablesConsulted,modifiers,formulas,effectiveTarget). - Hybrid Tabletop Dice (
manualRolls&rngSeed): Pass physical d100 rolls from your table viamanualRolls: [35, 72], passrngSeed: "session-42"for reproducible PRNG sequences, or omit both for live server rolls. - Dual-Mode State (Zero Auth Required or Live Firestore Sync): Run 100% locally/statelessly with JSON state pass-through or local disk persistence (
CAUDEX_STATE_FILE) and zero Firebase credentials, or enable optionalfirestore_syncto mirror character, squad, and encounter updates live into/machina/.
Quickstart & Transports
Clone the monorepo from GitLab (theengine-public/interesting-octopus) and build the server once:
mcp-combat from source:git clone https://gitlab.com/theengine-public/interesting-octopus.git
cd interesting-octopus/mcp-combat
npm install
npm run build
1. Local stdio Transport (Claude Desktop, Cursor, Antigravity)
Register the compiled stdio entrypoint in your MCP client configuration (see mcp-combat/mcp-config.json in the repository):
mcp_config.json / claude_desktop_config.json):{
"mcpServers": {
"theEngine": {
"command": "node",
"args": ["/ABS/PATH/TO/interesting-octopus/mcp-combat/dist/stdio.js"]
}
}
}
2. Streamable HTTP & OpenAPI 3.1.0 Transport (Remote Agents & Actions)
Launch the HTTP service for remote agent runtimes, multi-agent aiPC orchestrators, or ChatGPT Custom Actions:
8787):cd mcp-combat
PORT=8787 npm run start:http
POST /mcp(plusGET /mcp,DELETE /mcp) — MCP Streamable HTTP endpoint.GET /openapi.json— Full OpenAPI 3.1.0 schema for importing into agent frameworks and Custom Actions.POST /api/tools/:toolName— Direct JSON REST execution for any of the 23 tools (accepts optionalAuthorization: Bearer <firebase-id-token>).GET /api/resources— JSON snapshot of all 12 canonicalmachina://*andgenesis://*rule tables and catalogs.GET /llms.txt&GET /health— Service discovery summary and session health check.
Connecting aiPC Companions to theEngine
External agents can pilot aiPC Squad Companions alongside human players in three steps:
- Generate or Load an
aiPCOperative: Callchargen_create_characterwithcontrolMode: "aiPC", one of the five canonical Tactical Doctrines (balanced,medic_support,cautious_recon,vanguard,bodyguard), and an optionalaiPersonadirective—or register an existing sheet in a squad viasquad_manage_state. - Run Adventure & Survival Loops: Initialize a canonical or custom module with
adventure_initialize_session, resolve environmental checks viacharacter_life_*tools, and advance milestones withadventure_advance_milestone. - Escalate & Sync Tactical Combat: Call
adventure_escalate_to_combat(mode: "escalate") to launch a 5-stepmachina_*encounter, resolve turns deterministically from Step 1 Surprise through Step 5 Segment Trauma, and sync wounds, ammo, and Performance Points back to the squad viamode: "sync_outcome"(with optionalfirestore_syncfor live browser visibility in/machina/combatand/machina/teams).
Deterministic Tool Inventory (23 Tools)
Character Generation & Star Travel (2 Tools)
chargen_create_character— Full Chapter 1 Steps 1–15 character creation (rolledorracial_average, Table#1.4Appearance, CO-scaled Table#1.5Damage Points, Encultured skills with Krane sex split, Table#1.8I.G.A.L. courses, Xeno-Disciplines check, andaiPCdoctrine).flight_calculate_transit— 3D Euclidean star-system distance, DeltaRatio drive tuning, DWarp transit duration, G-dampener acceleration/deceleration, and Micro-Singularity Crunch Hazard alert (> 1.39e-8).
Character Life & Progression (6 Tools)
character_life_attribute_check— Single or opposed Attribute checks, Encumbrance Efficiency, Limb Ability Percentage (AP), and+1 ATTRPerformance Point ticks.character_life_skill_check— Procedures 1 (Simple), 2 (Table#2.1), and 3 (Xeno-Disciplines + mandatory Focus roll), turn durations, heat/AP modifiers, and strict Category PP ticks.character_life_encumbrance_and_travel—Carried gear mass vs. endurance limits, NewtonianD = V × Tmarch solver, and inverse proportional Efficiency (Table#2.9).character_life_wounds_and_healing— Tables#3-25-25.1healing and attribute recovery, Pharmaceuticals (endbleed,bioxin,instacast, and Human/Eebek-gatedgrim_reaper), shock, and unconsciousness thresholds.character_life_performance_points— Inspect, award, or spend Performance Points at1:1Category Experience,5:1Skill Aptitude, and10:1Attribute with strict category isolation.character_life_aging— Table#2.8species lifespan brackets, aging attribute deltas, and CO disease resistance checks.
Adventure Setup & Squad / aiPC Management (6 Tools)
adventure_initialize_session— Initialize Formula Approach scenarios (andromedian-rose,sedna-rendezvous,carakuss-frontier, or custom).adventure_get_state— Read active milestones, Disclosures/Epiphany progress, and environmental hydration/efficiency clocks.adventure_advance_milestone— Complete Little Accomplishments, deduct Table#2.10perceived-heat water, update Table#2.9efficiency, and unlock Disclosures.adventure_escalate_to_combat— Escalate milestone scenes intoEncounterStorecombat (Type I Static / Type II Dynamic NPCs) or sync combat outcomes back to Character Life.adventure_trigger_pacing_event— Keep the Action Alive: advances hazard clock, narrows choices to two tactical options, and steps down Procedure (3 → 2 → 1).squad_manage_state— Create, inspect, and update Squad rosters,pc/aiPCcontrol modes, Tactical Doctrines,aiPersona, and combat loadouts.
5-Step Tactical Combat State Machine (9 Tools)
machina_create_encounter— Launch Carakuss Dawn Ambush, Andromedian Rose, or custom multi-faction combat encounters.machina_get_encounter_state— Inspect live round/turn order, Action/Agility Points, stances, ammunition, and anatomical wound penalties.machina_step1_surprise— Resolve Step 1 Surprise and sleeping operative wake checks.machina_step2_primary_attack— Resolve Step 2 Initiative and Procedure 3>30margin lockouts.machina_step3_action_ap— Spend Action/Agility Points on movement (including Silent stealth), stance/cover transitions, weapon swaps, and reloads.machina_step4_preview_to_hit— Preview deterministic Marksmanship, Table#3.1Range, Table#3.2Adversity, Net To-Hit%, and Lore Guardrails before committing an attack.machina_step4_and_5_resolve_attack— Execute To-Hit roll, Placed vs. Random Hit Location (enforcing sightless Wrist Laser rules), Table#3.3Tissue DP, KAR / Prism Suit laser reflection, and Segment Trauma.machina_apply_triage— Apply Field Medkit (-8DP) or Grim Reaper (-14DP, Human/Eebek xenobiology gated) stabilization.machina_advance_turn_or_round— Advance to the next active combatant or replenish round AP.
Canonical Resources, Prompts & Discovery Endpoints
- 12 MCP Resources:
machina://rules/procedures,machina://tables/weapons,machina://tables/armors,machina://tables/species-combat,machina://presets/encounters,genesis://tables/character-life,genesis://tables/medical-and-healing,genesis://tables/chargen,genesis://tables/star-travel,genesis://species/catalog,genesis://equipment/catalog, andgenesis://adventures/catalog. - 3 GM Prompts:
genesis_living_world_narrator,genesis-gm-conductor, andexplain-procedure-tiers. - Site-Wide Machine-Readable Indexes:
https://genesisrpg.com/llms.txt(concise LLM index),https://genesisrpg.com/llms-full.txt(full-text rulebook & lore corpus), andhttps://genesisrpg.com/search-index.json(structured JSON archive).
