slideshot-mcp
slideshot
将 AI 生成的 HTML 轮播图转换为高分辨率的 PNG、WebP、PDF 和 PPTX —— 支持 CLI、Web 应用、MCP 服务器 或 REST API。
Web 应用 · npm CLI · npm MCP · API 规范
架构
slideshot/
packages/
cli/ ← Core Puppeteer rendering engine + CLI
mcp-server/ ← MCP stdio server for AI tools
webapp/ ← Next.js web app with live preview
prompts/
generic.md ← Clean minimal
branded.md ← Ketan Slides design system
instagram-carousel.md ← Bold vibrant IG style
infographic.md ← Data-heavy charts
pitch-deck.md ← Professional presentations
dark-modern.md ← Neon glassmorphism
editorial.md ← Magazine serifRelated MCP server: cardnews-mcp-server
快速开始
CLI
npx slideshot ./my-carousel.html --formats png,webp,pdf --scale 4选项:
标志 | 默认值 | 描述 |
|
| 幻灯片元素的 CSS 选择器 |
|
| 幻灯片宽度 (CSS px) |
|
| 幻灯片高度 (CSS px) |
|
| 设备缩放比例 (4x = 2160x2700) |
|
| 输出格式 (png, webp, pdf, pptx) |
|
| WebP 质量 (0-100) |
|
| 输出目录 |
Web 应用
在线访问: slideshot.vercel.app
或在本地运行:
cd packages/webapp && npm install && npm run dev打开 http://localhost:3000 —— 粘贴 HTML,预览并导出。
MCP 服务器
添加到 Claude Desktop 或 Cursor 配置中:
{
"mcpServers": {
"slideshot": {
"command": "npx",
"args": ["-y", "slideshot-mcp"]
}
}
}工具:
create_slides— 引导式创建工作流,包含 7 种主题和输出预设render_html_to_images— 将 HTML 渲染为 PNG/WebP/PDF/PPTXget_slide_prompt— 获取任意主题变体的 AI 提示词模板health_check— 验证 Puppeteer/Chromium 可用性
提示词(7 种主题):
generic-slides— 简洁极简风格branded-slides— Ketan Slides 设计系统instagram-carousel-slides— 大胆鲜艳的 IG 风格infographic-slides— 数据密集型图表和统计信息pitch-deck-slides— 专业演示文稿dark-modern-slides— 霓虹玻璃拟态风格editorial-slides— 带有金色点缀的杂志衬线风格
REST API (ChatGPT Actions / OpenWebUI)
该 Web 应用在 https://slideshot.vercel.app 提供兼容 OpenAPI 的 REST API。
端点:
方法 | 路径 | 描述 |
|
| 将 HTML 幻灯片渲染为 PNG/WebP/PDF (返回 ZIP) |
|
| 获取 AI 提示词模板 |
|
| OpenAPI 3.1.0 规范 |
平台支持:
平台 | 方法 | 设置 |
Cursor | MCP | 在 |
Claude Desktop | MCP | 在配置文件中使用 |
ChatGPT | OpenAPI Action | 导入 |
OpenWebUI | OpenAPI Tool | 导入 |
AI 提示词模板
prompts/ 目录下有 7 种提示词变体 —— 可直接复制粘贴或通过 get_slide_prompt 工具使用:
变体 | 文件 | 风格 |
Generic |
| 简洁极简,Inter 字体 |
Branded |
| Space Mono 字体,青色/珊瑚色点缀 |
| 大胆渐变,Poppins 字体 | |
Infographic |
| DM Sans 字体,统计卡片 |
Pitch Deck |
| 专业,KPI 卡片 |
Dark Modern |
| 霓虹,玻璃拟态 |
Editorial |
| Playfair Display 字体,金色 |
构建所有内容
npm install # from root — installs all workspaces
npm run build # builds cli → mcp-server
cd packages/webapp && npm run build # builds webapp separately链接
界面 | URL |
Web 应用 | |
npm CLI | |
npm MCP | |
GitHub | |
API 规范 |
许可证
MIT
Available Tools
6 toolscreate_slidesAIdempotent
Create slides. IMPORTANT: Use mode=default unless the user explicitly chose token_saver. mode=default = AI writes full HTML (best quality). mode=token_saver = AI sends JSON, server uses basic templates. REQUIRES discover_themes first AND user must have confirmed the data outline. After this tool saves the HTML, you MUST show the htmlPath as a code preview artifact. Then STOP and ask the user to confirm. DO NOT call render_slides until the user explicitly confirms.
Inputs: mode (required), theme (required), orientation, width, +4 more.
discover_themesARead-onlyIdempotent
MANDATORY first step — all other tools REJECT until this is called. Returns themes, orientation presets, token-usage modes, and output formats. Use ONLY the native selector prompts from the "ask" array — DO NOT render themes as a separate markdown list. DO NOT ask how many slides (you decide based on topic). After user picks options, show a data outline of proposed slides and WAIT for confirmation before calling create_slides.
Inputs: no named parameters.
edit_slidesA
Token-efficient partial edits on a previously-generated HTML deck. Use this INSTEAD of regenerating the whole deck for small changes — it saves 60-90% tokens vs a full rewrite. Operations: replace_slide (swap one slide block by 1-indexed slideIndex), patch_css (append CSS rules to ), swap_token (replace a CSS variable's value, e.g. {"--coral": "#FF0000"}), patch_class (add/remove a class on a specific slide, e.g. {"add": "dark"}). Reads from cache or htmlPath; saves the updated HTML and returns the new htmlPath. After editing, show the htmlPath as a preview artifact and STOP — do NOT call render_slides until the user confirms.
Inputs: operation (required), payload (required), htmlPath, slideIndex.
health_checkARead-onlyIdempotent
Verify Puppeteer/Chromium can launch. Use when render fails.
Inputs: no named parameters.
list_themesARead-onlyIdempotent
Idempotent read-only listing of all available themes (8+). Unlike discover_themes, this does NOT start a slide-creation workflow — call it any time the user asks "what themes are there?" mid-conversation. Returns the same tiered theme catalog (primary/secondary). Models MUST present every theme returned, never truncate.
Inputs: no named parameters.
render_slidesAIdempotent
Final render to PDF/WebP/PNG/PPTX. Accepts html string OR htmlPath. Supports width, height, selector, scale, webpQuality, orientation, pptxMode, pptxFilename, slideRange. NEVER call render_slides in the same turn as create_slides. When the user provides an existing HTML file path, pass it as htmlPath and call this tool directly — no discover_themes or create_slides needed. For the full slide-creation workflow, REQUIRES both discover_themes AND create_slides first, and ONLY call AFTER user confirms the preview. Returns file paths on disk.
Inputs: htmlPath, html, selector, width, +10 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
All tools have distinct responsibilities, but discover_themes and list_themes both surface the theme catalog and could be confused if an agent only glances at names; the descriptions do clarify that one is a mandatory workflow bootstrap and the other is a read-only listing. create_slides, edit_slides, and render_slides are otherwise cleanly separated by operation.
Most names follow the verb_noun snake_case pattern consistently: discover_themes, create_slides, render_slides, list_themes, edit_slides. health_check breaks the pattern slightly by being a noun phrase rather than a verb-first command, though it remains simple and readable.
Six tools is a well-scoped count for a slide-generation and rendering server: health check, theme discovery, theme listing, create, render, and edit. Each tool has a clear role, and none feels like unnecessary surface area.
The core lifecycle is covered: discover themes, create slides, render to output formats, and apply token-efficient partial edits. Minor gaps exist, like no explicit slide deletion or no tool to inspect a previously generated deck's structure, but most workflows can be completed without them.
Maintenance
Related MCP Connectors
Turn a URL, YouTube video or text into a branded LinkedIn/Instagram carousel PDF. No key needed.
Generate images and PDFs from HTML/CSS, live websites, and reusable templates.
Carousel assistant: your AI writes the slides, Karou renders Instagram, LinkedIn, TikTok carousels.
Finished TikTok/Instagram carousels from a topic, photos or video. Edit any layer, export PSD/SVG.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides screenshot and OCR capabilities for macOS.127 npm23MIT
- AlicenseAqualityDmaintenanceConverts subtitles or text into a single 1080×1620 infographic card (HTML+PNG) using LLM to generate content and Puppeteer for rendering.3MIT
- FlicenseNot gradedqualityDmaintenanceConverts slide-oriented HTML into editable PowerPoint files via an MCP server, using Chromium for layout measurement and supporting editable text, shapes, images, and raster fallbacks.-
- AlicenseAqualityBmaintenanceEnables creating PowerPoint presentations by rendering HTML/CSS slides as full-slide images and exporting them to .pptx files, with a preview tool for visual checking before finalizing.212 npmMIT