slate-mcp
v0.1.0
Published
MCP server for Slatepad — connect Claude Desktop, Claude Code, Gemini CLI, Codex CLI, or Cursor to a Slatepad browser tab
Maintainers
Readme
slate-mcp
MCP (Model Context Protocol) server that bridges Claude Desktop, Claude Code, Gemini CLI, Codex CLI, and Cursor to a Slatepad browser tab.
Once connected, you can talk to your AI in its normal chat window and Slatepad updates live:
"Rewrite the headline on slide 2 to be shorter." "Move the intro slide to the end." "Make the subtitle on slide 1 bold and change its color to #2563eb."
How it works
[Claude Desktop / Claude Code / Gemini CLI / Codex CLI / Cursor]
(your AI client, acting as MCP host)
via stdio (MCP protocol)
[slatepad-mcp — this package]
via WebSocket on localhost:5175
[Slatepad browser tab]The MCP server only runs when your AI client spawns it. Slatepad works normally without it.
Install
You do not need to install anything globally. Your AI client will run the server on demand with:
npx -y slate-mcpFor development against a local build:
cd slate-mcp && npm install && npm run build
node dist/index.jsSetup
Add the snippet below to your AI client's config file. The key name (slatepad) is a label — it can be anything.
Claude Desktop
Config: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"slatepad": {
"command": "npx",
"args": ["-y", "slate-mcp"]
}
}
}Restart Claude Desktop after editing.
Claude Code
Config: ~/.claude/settings.json
{
"mcpServers": {
"slatepad": {
"command": "npx",
"args": ["-y", "slate-mcp"]
}
}
}Restart Claude Code after editing.
Gemini CLI
Config: ~/.gemini/settings.json
{
"mcpServers": {
"slatepad": {
"command": "npx",
"args": ["-y", "slate-mcp"]
}
}
}Restart Gemini CLI after editing.
Codex CLI
Config: ~/.codex/config.toml
[mcp_servers.slatepad]
command = "npx"
args = ["-y", "slate-mcp"]Restart Codex CLI after editing.
Cursor
Go to Settings > Features > MCP > Add server:
- Name:
slatepad - Command:
npx -y slate-mcp
Restart Cursor after saving.
Tools exposed
| Tool | Description |
|---|---|
| slate.getDocument | Returns the full HTML of the document open in Slatepad. |
| slate.replaceDocument | Replaces the entire document with new HTML. |
| slate.ping | Health check. Returns ok if the browser tab is connected. |
| slate.listSlides | Lists all slides with their index, title, and eid. |
| slate.getSlide | Returns the HTML of a single slide by zero-based index. |
| slate.replaceSlide | Replaces a single slide by index. Supports Cmd+Z undo. |
| slate.moveSlide | Moves a slide from one index to another. Supports Cmd+Z undo. |
| slate.listEditableElements | Lists all elements with a data-eid attribute (eid, tagName, text snippet). |
| slate.editText | Replaces the text content of a single element by eid. Supports Cmd+Z undo. |
| slate.applyBold | Wraps or unwraps an element's content in <strong>. |
| slate.applyItalic | Wraps or unwraps an element's content in <em>. |
| slate.applyColor | Sets the inline text color of an element (hex value). |
| slate.applyAlign | Sets the text alignment of an element (left, center, right, justify). |
Status indicator
A small pill in the Slatepad header shows the connection state:
- AI off (gray): MCP server not running or browser tab not connected.
- AI connected (teal): Browser tab is connected; your AI can read and edit.
- AI is editing... (animated teal): A write operation just arrived.
Click the pill to see setup instructions for each AI client.
Privacy and security
- The MCP server only listens on
localhost:5175. No traffic leaves your machine via this package. slate.replaceDocumentand the slide/element write tools modify the document in the browser tab. The AI client drives these calls; Slatepad does not send requests unprompted.- No document content is logged or persisted by this package.
