Skip to content

MCP Server โ€‹

Slidev ships a built-in MCP (Model Context Protocol) server, so any MCP-capable AI agent (Claude Code, Codex, Cursor, VS Code Copilot, etc.) can work with your slides through structured tools instead of raw text edits โ€” reading slides, updating content and notes, inserting/removing/reordering slides, and even driving the live presentation.

Via the Dev Server โ€‹

When the dev server is running, the MCP server is available over HTTP (streamable transport) at:

http://localhost:<port>/__mcp

For example, register it with your agent:

bash
claude mcp add --transport http slidev http://localhost:3030/__mcp
json
{
  "mcpServers": {
    "slidev": {
      "type": "http",
      "url": "http://localhost:3030/__mcp"
    }
  }
}

With the dev server connected, agents can also use the slidev-goto-slide tool to navigate all connected browsers to a slide โ€” handy for visually verifying a slide right after editing it. Edits made through the MCP tools are written back to your markdown files and hot-reloaded instantly.

To disable the endpoint, set in your headmatter:

yaml
---
mcp: false
---

Via Stdio โ€‹

Without a dev server, you can start a standalone MCP server over stdio, operating directly on the markdown files:

bash
slidev mcp [entry]

For example:

json
{
  "mcpServers": {
    "slidev": {
      "command": "npx",
      "args": ["slidev", "mcp", "slides.md"]
    }
  }
}

Available Tools โ€‹

ToolDescription
slidev-get-infoDeck overview: entry file, title, slide count, markdown files, dev server URL and current position
slidev-list-slidesList all slides with number, title, layout, and source file
slidev-get-slideFull source of one slide: frontmatter, content, and note
slidev-update-slideUpdate the content, note, and/or frontmatter of a slide
slidev-insert-slideInsert a new slide after an existing one
slidev-remove-slideRemove a slide
slidev-move-slideMove a slide before/after another one to reorder the deck
slidev-goto-slideNavigate the live presentation to a slide (dev server only)

Slides are addressed by their rendered 1-based number, matching the slide numbers shown in the presentation.

Released under the MIT License.