Skip to content

MCP server

@recit/mcp is a Model Context Protocol server. Any MCP host (Claude Code, opencode, Codex, another one) connects to it over stdio, reads its guides and calls its tools. Récit never calls a model: the host thinks and writes, the tools are deterministic, and they answer with precise errors, one per node, with its line.

From Claude Code

TerminalBash
claude mcp add recit -- npx recit mcp serve

recit mcp serve needs @recit/mcp, an optional package. --root <dir> bounds what the tools may read and write. See the CLI reference.

From opencode

Declare the server in opencode.json at the root of the project:

JSONJSON
{ "$schema": "https://opencode.ai/config.json", "mcp": { "recit": { "type": "local", "command": ["npx", "recit", "mcp", "serve"], "enabled": true } } }

opencode names the tools recit_<tool> (recit_validate_story, recit_describe_format), and opencode mcp list shows whether the server is connected (recit connected).

Every host runs the same loop:

  1. Call describe_format with {"format": "deck"} to read the format's guide and JSON schema.
  2. Write the story in Markdown.
  3. Call validate_story with {"markdown": "…"} and fix any reported line.
  4. Write lorem.md itself: story_from_beats can write an empty skeleton with out, never the scenes' text, so the host still writes the story (only the film tools build_film, apply_ops and extract write a film, under --root).
  5. Call validate_story with {"file": "lorem.md"}, which answers a line starting with ✓ valid deck.

To export the guides and characters as opencode roles in .opencode/agent/, run recit skills export --target opencode.

Guides (resources)

A guide is a Markdown resource the host reads before it writes. Each one has a single source, in @recit/mcp.

ResourceWhat it holds
recit://guide/motionthe motion loop: draft, validate, apply, render, and the rules
recit://guide/deckhow to write a story in Markdown: separators, front matter, layouts, notes, MDX
recit://guide/pixelhow to draw a sprite in a ```pixel fence
recit://guide/scenariothe scenario method: brief, bible, beats, story, prompts, assets
recit://guide/characterhow to build one coherent character in a bible
recit://guide/atelierthe guided writing workshop: nine steps, a gate per creative step, atelier.md
recit://guide/premisesteps 1 and 2 of the workshop: spark, theme, logline, stakes, tone
recit://guide/interviewstep 4: the character interview, from the wound to the want
recit://guide/art-directionstep 3: medium, palette, light, framing, three boards to choose from
recit://guide/worldsteps 5 and 6: rules and their cost, places, the series and its debts
recit://guide/breakdownstep 7: the episode sheet, synopsis, panel breakdown and tension curve, lines
recit://guide/revisionstep 9: a review that asks questions of intent and never rewrites
recit://guide/continuitysteps 5 to 8: the continuity rules of recit validate, each code and how to fix it
recit://guide/mediaimages, edits, video, voice and keys: without AI first, adapters

Each format with a guide adds its own recit://guide/<format>; describe_format prints it.

The bible of the project is a resource too, read only: recit://bible/cast.md (or recit://bible/series/cast.json) serves the file under the server root as the author wrote it. A file that is not a valid bible is refused with its diagnostics.

Prompts

A prompt is a user message assembled directly from the workshop guides (recit://guide/atelier and recit://guide/interview). The MCP host shows them as commands; each prompt reads atelier.md first, asks at most four questions at a time (one at a time in an interview), stops at every creative gate, and the author always decides. At step 7, the beat_sheet prompt and the story_from_beats tool go together: the prompt guides the beat sheet, and the tool writes the empty story skeleton from it.

PromptArguments (all strings)What it starts
story_intakeentry (optional: from scratch by default, resume an existing project, adapt, add an episode), project (optional project folder)step 1 of the guided writing workshop (spark and theme, with recit://guide/premise) from the chosen entry
character_interviewcharacter (required: character id in the bible), bible (optional path, default cast.md)step 4: the character interview, one question at a time from the wound to the want (recit://guide/interview, recit://guide/character)
beat_sheetformat (required: webtoon, motion, webstory, deck or book), beats (optional beats id, default bible.beats), scenes (optional count)step 7: the episode beat sheet for the format (with recit://guide/webtoon when format is webtoon)

Tools

ToolWhat it does
validate_filmchecks a film (Markdown or JSON), errors with their line
validate_storychecks any other story (deck, docs, roadmap…), by line
list_blocks, describe_blockthe motion blocks and the props of one
describe_formatthe guide and the JSON schema of a format
describe_dataread-only: the columns, their types, the row count and three rows of a data source of a report or a deck
book_outlinethe outline of a book: chapters and their sections, figures, notes, index terms, and its errors with their line
expand_eventsthe occurrences of a calendar between two days in a time zone, recurrences and exceptions applied
describe_ui_nodes, list_iconsthe node vocabulary of a ui-scene, and the icon names an icon node may use
list_templatesthe first-party templates
list_themes, theme_importthe named themes, and a full theme derived from a brand
propose_scenes, build_filma film from a handover the host wrote
apply_opssmall edits of a film, scene by scene
extract, renderread a handover or a rollup; render a film to MP4
lookup_term, search_directorythe entries of a glossary or a directory
describe_bible_schemathe entry types, trait keys and JSON schema of a bible
validate_biblechecks a bible with the rules of recit validate
build_biblea bible from a handover: ids from the names, every trait the author did not give marked {inferred}
build_prompt, list_promptsthe text of an image prompt; each prompt and its image
register_assetwrites the provenance of an image generated elsewhere
story_from_beatsthe skeleton of a story from a beat template: one empty scene per beat, the beat as notes
check_continuitythe continuity of an episode or a bible: debts, dead characters, webtoon pacing, stage, and atelier.md beside a bible
render_characterrenders a pose or animation frame of a character as SVG
expand_animationexpands an animation into frame-by-frame postures
build_frame_promptsthe frame prompts of an animated prompt in a bible

Character drawing (render_character, expand_animation) uses @recit/character, installed with @recit/mcp. Reading a bible and building prompts come from @recit/scenario, installed next to @recit/mcp; it is not on npm yet, so they are available from a clone of Récit.

The rules every tool follows

  • Nothing invented. No metric, no trait, no fact the author did not give. What an agent proposes is marked as such ({inferred} in a bible) until a human validates it.
  • Same schemas as the engine. Tool inputs are the zod definitions the parser uses; an object sent as a JSON string is accepted.
  • Local only. The server runs on your machine, over stdio, and sends nothing anywhere.

When a tool misses a field the user must choose (story_from_beats: its format and its bible; build_bible: the title of the bible and the name of an entry), it asks for it through MCP elicitation when the client supports it. Otherwise, it answers with the list of the missing fields. Récit never guesses them.

The guides as skills

A host without MCP reads the same guides as Agent Skills: recit skills export writes one skill per guide, from the same source.