# AI Integration

> The MCP server, and how to give any assistant accurate Narro docs

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:

```bash
npm install --save-dev @getnarro/docs
```

```js
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.

## 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:

```json
{
  "mcpServers": {
    "narro": {
      "command": "npx",
      "args": ["-y", "@getnarro/mcp-server"]
    }
  }
}
```

### Claude Code

```bash
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 |

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](/docs/ai-prompts) page covers this in detail. The short
version:

1. **Give it the dialect.** The most common failure is a model writing a
   markdown syntax Narro does not speak.
2. **Make it build.** `narro build deck.md` is the pass/fail signal; without it
   nothing catches a bad prop.
3. **Say which package.** `Presentation`, `Slide`, `SlideContent`, `Notes` are
   in `@getnarro/core`; `Heading`, `Text`, `List`, and the rest are in
   `@getnarro/shared-ui`.