branching-story-mcp

v1.0.0
io.github.ouba-studio/branching-story-mcp Checked 4 days ago Published 9 days ago

Deterministic story-state kernel plus the 2026 AI story continuity benchmark, for MCP clients.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

validate_story_graph Validate a branching story graph

Validate a branching-story-kit JSON scene graph. Checks the schema, detects missing choice targets, unreachable scenes, dead-end loops and invalid guard predicates, and returns structured diagnostics with issue codes, stats and a pass/fail verdict.

ParameterTypeDescription
initialStateobjectAlternative to `story`: the initial state vector.
scenesobjectAlternative to `story`: the scenes map.
startScenestringAlternative to `story`: the start scene id.
storyobjectA branching-story-kit v1 story graph: {id?, title?, startScene (or legacy start), initialState?, scenes}. Scenes map id -> {title, body, ending?, choices?}. Choices carry label, next (or href), option…

step_story_state Advance deterministic story state

Run the deterministic story-state reducer for one or more player choices. Evaluates `requires` guards, applies `set` / `add` / `append` effects through a single write path, and returns the next scene, updated state, fired guards, available choices and a turn-stamped memory trace with a verifiable SHA-256 trace hash. Zero silent state drift.

ParameterTypeDescription
choices *arrayOrdered player choices. Each entry is an integer index into the current scene's choices, a case-insensitive choice label, or {index}/{label}.
story *objectA branching-story-kit v1 story graph: {id?, title?, startScene (or legacy start), initialState?, scenes}. Scenes map id -> {title, body, ending?, choices?}. Choices carry label, next (or href), option…
memoryarrayOptional prior memory log: strings or {turn, fact} objects.
rememberarrayFacts to plant in the turn-stamped memory log before stepping.
startScenestringOptional override for the entry scene.
stateobjectOptional state overrides applied on top of initialState.

query_ai_story_benchmark Query the 2026 AI story continuity benchmark

Query the verified Nov 15 2026 10-Platform Consumer AI Story Continuity Benchmark (doi:10.7910/DVN/YEBHQR): Ouba 20t verbatim PASS, Talkie 20t PASS, AI Dungeon 7t verbatim PASS, Character.AI 20t FAIL (silent state loss), Janitor AI / Talefy / Joyland / NovelAI right-censored, Chai / Galatea untestable. Optional `platform` or `status` filter. Returns structured JSON plus full APA/BibTeX citation and the interactive benchmark explorer URL.

ParameterTypeDescription
platformstringPlatform name or alias, e.g. 'Character.AI', 'talkie', 'ai-dungeon'.
statusstringOptional outcome filter.

detect_state_drift Detect silent state drift in a transcript

Given a planted fact {key, expected_value, planted_turn} and a transcript of turns, check deterministic recall / contradiction / omission and classify the session against the five-mode silent state drift taxonomy (F1 silent state loss, F2 session non-persistence, F3 gating censoring, F4 transient service degradation, F5 platform delisting) from doi:10.5281/zenodo.24549412.

ParameterTypeDescription
fact *object
transcript *arrayConversation turns, oldest first.
delistedbooleanSet true when the platform was delisted (forces F5).
min_gapintegerMinimum turns after planting before a session counts as probed (default 2).
probe_turnintegerTurn at which recall is probed (default: last turn).