keynote-mcp
Local macOS MCP server that reads, edits, and exports Apple Keynote presentations via JXA. Enables Claude to visually analyze slides, apply design changes, and iterate on presentations directly.
README
keynote-mcp
Local macOS MCP server that reads, edits, and exports Apple Keynote presentations via JXA (JavaScript for Automation). Enables Claude to visually analyze slides, apply design changes, and iterate on presentations directly — without any third-party tools.
Requirements
- macOS with Apple Keynote installed
- Node.js 20+
- Keynote must be running with at least one document open
Installation
git clone https://github.com/tszaks/keynote-mcp
cd keynote-mcp
npm install && npm run build
Add to ~/.mcp.json:
{
"mcpServers": {
"keynote-mcp": {
"type": "stdio",
"command": "/opt/homebrew/bin/node",
"args": ["/path/to/keynote-mcp/dist/index.js"]
}
}
}
Restart Claude Code. Tools appear as mcp__keynote-mcp__keynote_*.
Tools Reference
All tools accept doc_index (0-based, defaults to 0 = frontmost document). Elements are addressed by slide_index (0-based) + element_type (textItem, imageItem, shapeItem) + element_index (0-based within that collection). Colors are [r, g, b] with values 0–255. Slide coordinates are in points; standard Keynote slide is 1920×1080 pts.
Discovery
keynote_list_presentations
List all open Keynote documents.
Input: {}
Output: [{ index, name, slideCount, modified, filePath }]
keynote_get_presentation_info
Get slide count and available master slide names. Call this first before redesigning — you need master names to call keynote_apply_master.
Input: { doc_index? }
Output: { name, slideCount, masterSlides: string[], filePath, modified }
keynote_get_slide
Get the full element tree for one slide: all text boxes, images, and shapes with position, size, font, font size, and color.
Input: { doc_index?, slide_index }
Output: {
slideIndex, masterSlide, skipped, elementCount,
elements: [{
type: "textItem" | "imageItem" | "shapeItem",
index,
text?, // textItem only
font?, // textItem only
fontSize?, // textItem only
color?, // textItem only — [r,g,b] 0-255
fillColor?, // shapeItem only — [r,g,b] 0-255
fileName?, // imageItem only
position: { x, y },
size: { w, h }
}]
}
Export (Visual Analysis)
keynote_export_slide_image
Export a single slide as PNG. Returns the file path — use the Read tool on that path to see the slide visually.
Input: { doc_index?, slide_index }
Output: { filePath, slideIndex, exportDir }
keynote_export_all_slides
Export all slides as PNG to ~/Library/Caches/keynote-mcp/<doc>/. Returns array of file paths.
Input: { doc_index? }
Output: { exportDir, slideCount, files: string[] }
keynote_get_design_snapshot
Best starting point for redesign. One call that exports all slides as PNG AND returns the full element tree for every slide.
Input: { doc_index? }
Output: {
presentationName, slideCount, exportDir,
slideImages: string[], // PNG file paths — Read these for visual analysis
slides: SlideData[] // full element trees
}
Text & Font
keynote_set_text
Replace the text content of a text element. Preserves existing font styling.
Input: { doc_index?, slide_index, element_type: "textItem", element_index, text }
keynote_set_font
Set font family, size, and/or color on a text element. Omit any field to leave it unchanged.
Input: {
doc_index?, slide_index,
element_type: "textItem", element_index,
font_name?, // e.g. "SF Pro Display", "Helvetica Neue", "Didot"
font_size?, // points
color? // [r,g,b] 0-255
}
Layout
keynote_set_element_position
Move an element. x = distance from left edge, y = distance from top edge, both in points.
Input: { doc_index?, slide_index, element_type, element_index, x, y }
keynote_set_element_size
Resize an element.
Input: { doc_index?, slide_index, element_type, element_index, width, height }
Color & Fill
keynote_set_slide_background
Set slide background to a solid color. May fail if the slide's master has a locked background — apply a blank master first with keynote_apply_master.
Input: { doc_index?, slide_index, color: [r,g,b] }
keynote_set_element_fill_color
Set the fill color of a shape element.
Input: { doc_index?, slide_index, element_type: "shapeItem", element_index, color: [r,g,b] }
Add & Delete Elements
keynote_add_text_box
Add a new text box to a slide.
Input: { doc_index?, slide_index, text?, x?, y?, width?, height? }
Output: { added, slideIndex, newElementIndex }
keynote_add_shape
Add a rectangle or oval shape, with optional fill color.
Input: { doc_index?, slide_index, x?, y?, width?, height?, fill_color?: [r,g,b] }
Output: { added, slideIndex, newElementIndex }
keynote_delete_element
Remove an element from a slide. Keynote undo (Cmd+Z) still works in the app.
Input: { doc_index?, slide_index, element_type, element_index }
Slides
keynote_apply_master
Apply a master slide to one slide or all slides. Get valid master names from keynote_get_presentation_info.
Input: { doc_index?, master_name, slide_index? }
// Omit slide_index to apply to all slides
keynote_add_slide
Append a new blank slide at the end.
Input: { doc_index? }
Output: { added, newSlideIndex, slideCount }
keynote_delete_slide
Delete a slide.
Input: { doc_index?, slide_index }
keynote_duplicate_slide
Duplicate a slide. The copy is inserted immediately after the original.
Input: { doc_index?, slide_index }
Workflow Patterns
Visual Design Review
1. keynote_get_design_snapshot → get all slide images + element trees
2. Read(slideImages[0]) → see slide 0 visually
3. Read(slideImages[1]) → see slide 1 visually
...
4. Identify issues: inconsistent fonts, low contrast, crowded layouts
5. Apply fixes with set_font / set_element_position / set_slide_background
6. keynote_export_slide_image → verify the result visually
Enforce Typography Consistency
1. keynote_get_slide for each slide → collect all font names and sizes
2. Identify the dominant font family
3. keynote_set_font on outliers to match
Redesign a Single Slide
1. keynote_export_slide_image → see current state
2. keynote_get_slide → get element positions and sizes
3. Apply repositions, resizes, font changes
4. keynote_export_slide_image → verify result
Known Limitations
- Export requires a saved file — if
filePathis empty inlist_presentations, save the document first (Cmd+S). Export will fail on unsaved presentations. - Element positions return 0,0 for some Keynote layouts — this is a JXA limitation with certain master/layout combinations. Text content and font data are unaffected.
- Background color changes may be blocked by master slide locks. Use
keynote_apply_masterwith a blank master first. - No animation access — JXA does not expose Keynote transition or build animation properties.
- Image content is not readable —
imageItemelements return file name and dimensions only, not pixel data.
Architecture
TypeScript MCP server using the @modelcontextprotocol/sdk. All Keynote interaction goes through JXA (JavaScript for Automation) via osascript -l JavaScript. Operations and payloads are passed as environment variables; results return as a JSON envelope { ok: boolean, result? | error? } on stdout.
Follows the same pattern as reminders-mcp, safari-mcp, and other local macOS MCP servers in the same ecosystem.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。