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>/__mcpFor example, register it with your agent:
claude mcp add --transport http slidev http://localhost:3030/__mcp{
"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:
---
mcp: false
---Via Stdio โ
Without a dev server, you can start a standalone MCP server over stdio, operating directly on the markdown files:
slidev mcp [entry]For example:
{
"mcpServers": {
"slidev": {
"command": "npx",
"args": ["slidev", "mcp", "slides.md"]
}
}
}Available Tools โ
| Tool | Description |
|---|---|
slidev-get-info | Deck overview: entry file, title, slide count, markdown files, dev server URL and current position |
slidev-list-slides | List all slides with number, title, layout, and source file |
slidev-get-slide | Full source of one slide: frontmatter, content, and note |
slidev-update-slide | Update the content, note, and/or frontmatter of a slide |
slidev-insert-slide | Insert a new slide after an existing one |
slidev-remove-slide | Remove a slide |
slidev-move-slide | Move a slide before/after another one to reorder the deck |
slidev-goto-slide | Navigate 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.