Adobe MCP for macOS
Control Adobe Creative Cloud from AI agents via the Model Context Protocol
Quick Start • Features • Dashboard • Tools • Themes • Importers • Configuration
______________________________________________________________________
允许Claude(或任何兼容MCP的AI)驱动的MCP服务器 InDesign, Photoshop,以及 插画师 在macOS上,通过本机AppleScript桥使用ExtendScript。从Notion、Google Docs、Word或PDF导入内容,然后一次性生成专业排版的电子书、文档和创意资产。
快速开始
先决条件
| 要求 | 版本 |
|---|---|
| macOS | 12+(蒙特利或更高版本) |
| Python | 3.11+ |
| Adobe Creative Cloud | 已安装InDesign、Photoshop和/或Illustrator |
安装
# Clone the repo
git clone https://github.com/YOUR_USERNAME/adobe-mcp.git
cd adobe-mcp
# Install with all optional dependencies
pip install -e ".[all,dev]"或者只安装您需要的东西:
pip install -e "." # Core (InDesign, Photoshop, Illustrator)
pip install -e ".[notion]" # + Notion imports
pip install -e ".[google]" # + Google Docs imports
pip install -e ".[dev]" # + pytest for running tests授予macOS权限
首次使用时,macOS将提示输入自动化权限:
系统设置→ 隐私和安全→ 自动化
授予您的终端应用程序(终端、iTerm、VS Code、Claude Desktop等)控制每个Adobe应用程序的权限。
联系克劳德
克劳德代码CLI --添加到您的项目 .mcp.json:
{
"mcpServers": {
"adobe-mcp-macos": {
"command": "python",
"args": ["-m", "adobe_mcp_macos"],
"env": {}
}
}
}克劳德桌面 --合并到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"adobe-mcp-macos": {
"command": "python",
"args": ["-m", "adobe_mcp_macos"],
"env": {}
}
}
}然后重启克劳德。Adobe工具将自动显示。
______________________________________________________________________
特性
一键式书籍创作
给克劳德一个简单的指示,比如 *“导入我的Notion页面并创建专业排版的电子书”* 它将:
- 从Notion(或谷歌文档、Word、PDF)获取内容
- 应用设计主题(排版、颜色、页面布局)
- 使用章节开头符、TOC和流动文本创建InDesign文档
- 导出两者a 可打印PDF (CMYK、裁剪痕迹、出血)和 数字PDF (RGB,优化)
Web仪表板
无需Claude即可创建电子书的独立浏览器UI:
adobe-mcp-dashboard
# → http://localhost:5050仪表板提供:
- 内容导入 --粘贴Notion URL或上传DOCX/PDF
- 主题选择 --从内置主题中选择或创建自定义主题
- 实时进度 --SSE流媒体显示了书籍构建过程中的每个步骤
- 保存的导入 --重复使用以前导入的内容
多应用程序控制
三个Adobe应用程序中的40+MCP工具:
| 应用程序 | 功能 |
|---|---|
| InDesign | 文档、段落样式、母版页、文本流、图像、目录、页码、PDF导出 |
| Photoshop | 文档、文本层、过滤器、图像大小调整、PNG/JPEG导出 |
| 插画师 | 文档、矩形、文本框、PNG/SVG导出 |
______________________________________________________________________
工具参考
共享工具
| 工具 | 说明 |
|---|---|
adobe_list_running_apps | 列出当前打开的Adobe应用程序 |
adobe_open_file | 在指定的Adobe应用程序中打开文件 |
adobe_get_active_document | 获取所有应用程序中活动文档的名称/路径 |
InDesign工具
图书创作(高级)
| 工具 | 说明 |
|---|---|
id_create_book | 从BookManifest JSON创建单张完整书籍 |
文档管理
| 工具 | 说明 |
|---|---|
id_create_document | 创建新的主题InDesign文档 |
id_open_document | 打开现有 .indd 文件 |
id_save_document | 保存活动文档 |
id_close_document | 关闭活动文档 |
布局和造型
| 工具 | 说明 |
|---|---|
id_setup_master_pages | 从主题创建A-Body和B-Chapter母版页 |
id_setup_paragraph_styles | 从主题创建所有段落样式 |
id_apply_theme | 将主题应用于活动文档 |
内容
| 工具 | 说明 |
|---|---|
id_add_chapter | 添加一章(首页+正文) |
id_flow_text | 自动创建页面的流文本 |
id_add_text_frame | 在精确的毫米坐标处添加文本框 |
id_add_pull_quote | 添加风格化的引语 |
id_add_sidebar | 添加侧边栏文本框 |
导航
| 工具 | 说明 |
|---|---|
id_add_table_of_contents | 生成带有点引线的TOC页面 |
id_add_page_numbers | 设置页码(阿拉伯语或罗马语) |
图像
| 工具 | 说明 |
|---|---|
id_place_image | 放置带有试穿选项的图像 |
id_add_full_bleed_image | 将全出血图像放置在文档边缘 |
id_add_caption | 在图像下方添加标题 |
主题
| 工具 | 说明 |
|---|---|
id_list_themes | 列出所有可用主题 |
id_create_theme | 根据文本描述生成新主题 |
id_get_theme | 获取主题的完整JSON配置 |
出口
| 工具 | 说明 |
|---|---|
id_export_pdf_print | 导出打印就绪的PDF(CMYK、出血、裁剪标记) |
id_export_pdf_digital | 导出屏幕优化的数字PDF(RGB) |
高级
| 工具 | 说明 |
|---|---|
id_execute_jsx | 在InDesign中执行原始ExtendScript |
Photoshop工具
| 工具 | 说明 |
|---|---|
ps_create_document | 创建新文档(RGB、CMYK或灰度) |
ps_add_text | 添加文本层 |
ps_export_png | 导出为PNG |
ps_export_jpg | 使用质量设置导出为JPEG |
ps_resize_image | 调整图像大小 |
ps_apply_filter_blur | 应用高斯模糊 |
ps_flatten | 压平所有层 |
ps_list_layers | 列出所有图层 |
ps_execute_jsx | 执行原始ExtendScript |
插画工具
| 工具 | 说明 |
|---|---|
ai_create_document | 创建新文档 |
ai_add_rectangle | 绘制一个矩形 |
ai_add_text | 添加文本框 |
ai_export_png | 导出为PNG |
ai_export_svg | 导出为SVG |
ai_list_layers | 列出所有图层 |
ai_select_all | 选择所有对象 |
ai_execute_jsx | 执行原始ExtendScript |
______________________________________________________________________
主题系统
主题控制着文档设计的各个方面——排版、颜色、页面尺寸、边距、母版页和导出设置。
内置主题
| 主题 | 描述 | 页面大小 | 正文字体 | 标题字体 |
|---|---|---|---|---|
| 禅 | 整洁、简约的书籍布局 | 6“×9” | Palatino 12pt | Optima |
| 商业 | 专业文件 | 信件 | Garamond 13pt | 新Helvetica |
| 现代 | 平衡的现代设计 | 6英寸×9英寸 | Palatino 12pt | 新Helvetica |
创建自定义主题
通过克劳德:
"Create a theme called 'Memoir' with Georgia body text,
large chapter numbers, and warm earth-tone colors"通过仪表板: 从主题下拉列表中选择“自定义”并描述您的风格。
手动: 在中创建JSON文件 ~/.adobe-mcp/themes/:
{
"name": "My Theme",
"page": {
"width_mm": 152.4,
"height_mm": 228.6,
"margins": { "top": 25.4, "bottom": 25.4, "inside": 19.05, "outside": 15.875 },
"columns": 1
},
"typography": {
"body": { "family": "Palatino", "font_style": "Regular", "size": 12, "leading": 18 },
"h1": { "family": "Optima", "font_style": "Bold", "size": 28, "leading": 34 },
"h2": { "family": "Optima", "font_style": "Regular", "size": 18, "leading": 24 }
},
"colors": {
"body_text": "#1a1a1a",
"heading": "#000000",
"accent": "#4a7c59"
}
}主题使用Pydantic进行验证——缺少的字段将恢复为合理的默认值。
InDesign模板
主题可以参考 .indt InDesign模板文件,用于JSON无法表达的高级布局。将模板放置在 src/adobe_mcp_macos/themes/templates/.
______________________________________________________________________
内容导入器
将多个来源的内容导入到结构化格式中,以便创建书籍。
| 来源 | 方式 | 要求 |
|---|---|---|
| 概念 | 页面URL或ID | NOTION_API_TOKEN env 是 。 |
| 谷歌文件 | 文档ID | GOOGLE_SERVICE_ACCOUNT_JSON env 是 。 |
| 微软Word | .docx 文件路径 | 无 |
.pdf 文件路径 | 无 |
富文本支持
Notion导入程序保留源文档的格式:
- 加粗, *斜体*,以及其他内联样式
- 颜色注释
- 这些样式作为字符级别替代传递到InDesign输出
通用进口
这 id_import_to_book 工具是最简单的路径——提供任何一个源代码,并返回一个现成的BookManifest:
"Import my Notion page https://notion.so/My-Book-abc123
and create an ebook using the Zen theme"______________________________________________________________________
配置
环境变量
| 变量 | 必需 | 目的 |
|---|---|---|
NOTION_API_TOKEN | 对于Notion导入 | 来自的内部集成令牌 notion.so/my集成 |
GOOGLE_SERVICE_ACCOUNT_JSON | 对于Google Docs导入 | 服务帐户密钥JSON文件的路径 |
将这些设置为 .env 在项目根目录中创建文件,或在MCP服务器配置中传递它们:
{
"mcpServers": {
"adobe-mcp-macos": {
"command": "python",
"args": ["-m", "adobe_mcp_macos"],
"env": {
"NOTION_API_TOKEN": "ntn_your_token_here"
}
}
}
}概念设置
- 首选 notion.so/my集成
- 创建新的内部集成
- 复制令牌(以开头
ntn_) - 在Notion中,打开要导入的页面→ ⋯ → 连接 → 添加您的集成
谷歌文档设置
- 在中创建服务帐户 谷歌云控制台
- 启用Google Docs API
- 下载JSON密钥文件
- 使用服务帐户电子邮件地址共享您的谷歌文档
- 集
GOOGLE_SERVICE_ACCOUNT_JSON到密钥文件的路径
______________________________________________________________________
运行测试
# All unit tests (no Adobe apps needed)
pytest tests/ --ignore=tests/integration -v
# Integration tests (requires running Adobe apps)
pytest tests/integration/ -v
# Quick check
pytest tests/ -q______________________________________________________________________
建筑
adobe-mcp-macos/
├── src/adobe_mcp_macos/
│ ├── server.py # MCP server entry point (FastMCP)
│ ├── executor.py # AppleScript bridge → ExtendScript execution
│ ├── tools/
│ │ ├── indesign.py # InDesign MCP tools (high-level)
│ │ ├── indesign_jsx.py # JSX code generators (low-level)
│ │ ├── photoshop.py # Photoshop MCP tools
│ │ ├── illustrator.py # Illustrator MCP tools
│ │ ├── shared.py # Cross-app utilities
│ │ └── importers.py # Content import tools
│ ├── importers/
│ │ ├── notion.py # Notion API client
│ │ ├── google_docs.py # Google Docs API client
│ │ ├── docx_parser.py # Word document parser
│ │ ├── pdf_parser.py # PDF parser (font-size heuristics)
│ │ └── rich_text.py # Rich text markup handling
│ ├── themes/
│ │ ├── manager.py # Theme loading, saving, listing
│ │ ├── validator.py # Pydantic models for theme validation
│ │ ├── builtin/ # Built-in theme JSON files
│ │ └── templates/ # InDesign .indt template files
│ ├── models/ # Pydantic input models for all tools
│ └── dashboard/
│ ├── app.py # Starlette web server
│ └── index.html # Single-page dashboard UI
├── tests/ # 250+ unit tests
├── docs/plans/ # Design documents
└── pyproject.toml运作原理
Claude / Dashboard
│
▼
MCP Server (FastMCP)
│
▼
Tool Functions (Python)
│
▼
JSX Code Generators
│
▼
executor.py → osascript → AppleScript
│
▼
Adobe App (ExtendScript engine)- Claude调用MCP工具(例如。,
id_create_book) - Python生成ExtendScript(JSX)代码
- 执行器将JSX写入临时文件,并通过以下方式调用它
osascript - Adobe的ExtendScript引擎在应用程序内运行代码
- 结果通过stdout返回Python
______________________________________________________________________
已知限制
- ExtendScript同步运行——非常长的操作可能会超时(默认60秒)
- 这
execute_jsx工具在Adobe应用程序中运行任意代码;谨慎使用 - 自定义主题生成使用现有主题作为基础;编辑JSON以实现完全控制
- Premiere Pro和After Effects尚不支持
- 需要macOS(由于AppleScript依赖性,不支持Windows/Linux)
许可证
麻省理工学院
