πβAI Integration
How do I wire an AI assistant up to Narro so it can write and build decks?
There are two ways to point an AI assistant at Narro. Which you want depends on whether the assistant already has a terminal.
If your assistant has shell access
Coding agents β Claude Code, Cursorβs agent, Copilot Workspace β can just use the CLI. They need the documentation, not tools:
Read https://getnarro.com/llms.txt, then write a deck about <topic> to deck.md
and run `npx @getnarro/cli build deck.md` to check it.
Every docs page is available as markdown by appending .md, and
https://getnarro.com/llms-full.txt is all of them in one fetch.
Offline or sandboxed? Install the docs:
npm install --save-dev @getnarro/docs
import { getDoc, listDocs, getComponent } from "@getnarro/docs";
listDocs(); // every page's slug, title, description
getDoc("markdown-mode").body; // the markdown
getComponent("List").props; // generated from the TypeScript source
The component data is generated at build time from the types, so it describes the version you installed rather than a hand-maintained copy.
One question, three chunks
@getnarro/docs hands over whole pages, and markdown-mode alone is ~8,000
tokens. When the agent should be asking questions rather than reading manuals,
install the same documentation as a docspack:
npm install --save-dev @getnarro/docspack docspack
npx docspack sync
npx docspack ask "which layout values are valid in slide frontmatter"
sync indexes every installed docspack into a local SQLite database. ask
answers from it β at most three chunks and 3,000 tokens, ranked by full-text
search, with no network call. The index holds every documentation page, one
chunk per component, and the catalog of valid names.
Then two lines in AGENTS.md or CLAUDE.md are the whole setup:
Run `docspack ask "<question>"` for documentation on this project's
dependencies. It answers from the installed versions.
npx docspack mcp serves the same index over MCP for assistants that would
rather have a declared tool.
If your assistant does not
@getnarro/mcp-server exposes Narro over the Model Context Protocol.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json on macOS,
%APPDATA%\Claude\claude_desktop_config.json on Windows:
{
"mcpServers": {
"narro": {
"command": "npx",
"args": ["-y", "@getnarro/mcp-server"]
}
}
}
Claude Code
claude mcp add narro -- npx -y @getnarro/mcp-server
Cursor, Cline, Continue
Same shape, under whatever key the extension uses for MCP servers β for Cline it
is cline.mcpServers in VS Code settings.
Tools
| Tool | What it does |
|---|---|
create_presentation | Scaffolds a project and returns its path |
list_slides | Structured slide data from a deck |
add_slide | Inserts a slide into the file |
update_slide | Rewrites one slide |
delete_slide | Removes a slide |
apply_theme | Applies a marketplace theme |
check_presentation | Validates names without building; fast enough for every edit |
build_presentation | Builds, returning errors on failure |
export_presentation | PPTX, PDF, Google Slides |
bundle_presentation | Single-file HTML |
import_presentation | From PPTX or Google Slides |
get_presentation_info | Documentation on a topic |
manage_comments | Slide comments |
And for @getnarro/video, whose timeline is derived from the narration so every step is an
edit to sentences an assistant can make:
| Tool | Does |
|---|---|
video_script | The brief for a first draft of the narration, then that answer as script.ts |
video_render | The masters, reusing every scene whose inputs have not changed |
video_check | Overflow in every format, every citation against its source, the brand policy |
video_review | The directorβs pass, as a briefing video_apply reads back |
video_apply | A feedback export as a patch to script.ts |
video_brief | The brief for a translation or a channel cut |
video_cover | The brief for a cover image, and the image from the answer |
video_retention | A retention export mapped onto the sentences that cost the most audience |
video_record | Scripted product footage on virtual time; check says whether the product changed |
video_stale | Which cited sources have moved since the last render |
video_approve | The one document a person approves |
Terminal demos
@getnarro/terminal holds a terminal session as text. These five are narro-terminal <command> against a playbook file, and each returns the commandβs output.
| Tool | Does |
|---|---|
terminal_render | The playbook as an animated GIF, or an SVG with svg |
terminal_still | One frame as a PNG β at a mark, a second or a frame |
terminal_check | What will be wrong before anything renders: unimplemented sequences, lines wider than the grid, a mask that matches nothing, timing that will read badly |
terminal_import | An asciicast, a VHS .tape or a ttyrec, read into a playbook |
terminal_export | A playbook written back out as an asciicast |
There is no terminal_record tool, deliberately. Every tool above draws text; record runs
the playbookβs commands in a real shell, and the CLI guards it by printing the commands and
asking a person. A tool would route around exactly that gate, so an assistant authors, renders
and checks a demo β and a person runs it.
Recordings
@getnarro/replay records a web app as real DOM. Recording is a personβs job β it drives a
browser through a flow β so there is one tool, and it reads.
| Tool | Does |
|---|---|
replay_info | A castβs viewport, duration, size and chapter names |
replay_review | What is wrong with the recording, and what to do about each one |
Call replay_info before writing <Replay chapter="β¦"> or <narro-replay start="β¦">.
Those name a chapter as a string, and a name the cast does not have is not an error: seek
falls back to the beginning, so the demo plays from the top and reads as a timing bug rather
than a typo.
Call replay_review before publishing one. A cast is text that travels, and an email
address or an API token typed into a form during the recording is in that text. The rest of the
pass β a click that changed nothing, dead air, a scroll nobody could read, type that will be six
pixels tall on a page β is about whether the demo is worth showing.
There is no replay_apply, deliberately. video_apply exists because rewriting narration in
a video moves every cue after it, so the patch has to be computed. A recording has no such
coupling: a finding asks either for a re-record, which is a person driving a browser, or for an
edit to the .notes.md track β an ordinary markdown file an assistant edits directly and bakes
in with narro annotate.
These edit files on disk. Point them at a directory you are willing to have written to.
Resources
The server also exposes the documentation as MCP resources
(narro://docs/<slug>), which clients can cache and read without spending a
tool call.
Getting good results
The AI prompts page covers this in detail. The short version:
- Give it the dialect. The most common failure is a model writing a markdown syntax Narro does not speak.
- Make it build.
narro build deck.mdis the pass/fail signal; without it nothing catches a bad prop. - Say which package.
Presentation,Slide,SlideContent,Notesare in@getnarro/core;Heading,Text,List, and the rest are in@getnarro/shared-ui.