mcp-indesign-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-indesign-agent Aumenta o espaço entre os títulos"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP InDesign Agent
MCP server para editar Adobe InDesign via linguagem natural no Cursor.
Cursor Agent → MCP (stdio) → Bridge local (AppleScript + dispatcher.jsx) → InDesignv0.1.0 — Document Model em cache, UUIDs persistentes (mcp:<uuid>), ~22 tools semânticas e operações em lote. Plano: PLAN.md.
Prerequisites
macOS (bridge v1 = AppleScript + ExtendScript)
Node.js 20+
Adobe InDesign instalado e aberto, com um
.inddativo para scan/batchPermissão de Automação (veja abaixo)
Related MCP server: Illustrator MCP
macOS Automation
Na primeira chamada (npm run doctor ou o MCP no Cursor), o macOS pode pedir permissão para controlar o InDesign.
System Settings → Privacy & Security → Automation
Garanta que o app que lança o MCP (Cursor, Terminal, etc.) pode controlar Adobe InDesign
Se o bridge falhar com timeout / Apple Event errors: reabra o InDesign, confirme o nome do app com
npm run doctor, e aceite o diálogo de Automação de novo
O script não usa UI scripting frágil: envia JSON ao extendscript/dispatcher.jsx via do script.
Install & build
npm install
npm run build
npm run doctordoctor imprime apps detectados, versão, doc ativo e smoke de UUID / batch / styles / analyze.
Defina o nome do app se a detecção automática não bater:
INDESIGN_APP_NAME="Adobe InDesign 2026" npm run doctorNomes típicos: Adobe InDesign 2026, Adobe InDesign 2025 (veja /Applications).
Connect to Cursor
npm run buildAdicione em
~/.cursor/mcp.json(ou.cursor/mcp.jsondo projeto):
{
"mcpServers": {
"mcp-indesign-agent": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/mcp-indesign-agent/dist/index.js"],
"env": {
"INDESIGN_APP_NAME": "Adobe InDesign 2026",
"INDESIGN_BRIDGE": "applescript"
}
}
}
}Substitua o path absoluto e o
INDESIGN_APP_NAMEpelo resultado dodoctorRecarregue os MCP servers no Cursor
Teste: “Ping InDesign e faça scan do documento ativo”
Fluxo do agent (obrigatório na prática)
ping_indesign
→ scan_document # cache + snapshot before
→ analyze_page # roles (Header, Body…)
→ preview_batch | layout_assistant (opcional)
→ checkpoint # cópia .indd em disco (automática, ver abaixo)
→ execute_batch | layout_assistant fix
→ summarize_changesMeta: pedido editorial típico em ≤ 3 round-trips MCP (scan → batch → summarize).
Checkpoint: a rede que o snapshot não é
Em 11/08/2026, 18 scripts de patch ad-hoc em ~20 minutos destruíram a p.8 de um
livro em produção. Não havia como voltar: snapshot guarda só bounds,
paragraphStyle e um textPreview truncado, e não tem restore; nenhum
script usava transação, então cada um virava várias entradas de undo.
O servidor agora recusa mutação sem rede:
op: "checkpoint"—doc.saveACopy()para<pasta do .indd>/_checkpoints/com nome<base>-<tag>-<YYYYMMDD-HHMMSS>.indd, mantendo oskeepmais recentes (default 12). Disponível emexecute_operatione como comando deexecute_batch. Roda antes e fora da transação — a cópia precisa sobreviver ao rollback que ela existe para permitir.Gate no
execute_batch— todo batch mutante exige um checkpoint da geração atual do documento (meta.generation). Por default o servidor tira a cópia sozinho (INDESIGN_CHECKPOINT_MODE=auto) e recusa o batch se osaveACopyfalhar.skipCheckpoint: trueé a saída deliberada.Uma transação por pedido — todo batch mutante roda dentro de
app.doScript(…, UndoModes.ENTIRE_SCRIPT, "<nome>"). Um Cmd+Z desfaz o pedido inteiro e uma exceção no meio reverte tudo. O nome do undo é forçado a ASCII.
Criar/apagar frames muda a geração e invalida o checkpoint anterior; editar texto não muda, então uma cópia cobre uma sequência de edições de texto.
Exemplos:
Pedido | Sequência |
“Aumenta o espaço entre os títulos” |
|
“Textos sobrepostos” |
|
“Aplica Heading 1 no título” |
|
“Relinka a imagem missing” |
|
Targets: uuid | { uuid } | { role, pageIndex? } | { selection: true }.
Nunca use pageIndex:itemIndex como identidade. Geometria em points.
Tools (teto ~25)
Novas capacidades entram como op no dispatcher + comando de batch, não como tool MCP nova — salvo superfície semântica clara (analyze_page, layout_assistant).
Grupo | Tools |
Sessão |
|
Semântica |
|
Batch / snapshots |
|
Conveniência (thin) |
|
Layout assist |
|
Styles |
|
Assets |
|
Preferir sempre execute_batch para mutações multi-passo. Thin tools existem para 1 op.
Ops de execute_batch
checkpoint, move, resize, delete, duplicate, createTextFrame, setText, replaceText, setFont, setFill, align, distribute, center, stack, applyMargins, applyStyle, createStyle, updateStyle, relinkAsset, replaceAsset, embedAsset.
checkpoint é a única que não muta o documento.
Env
Var | Default |
| auto (maior ano em |
|
|
|
|
|
|
|
|
|
|
|
|
Scripts
Script | Uso |
| Compila |
| Sobe o MCP ( |
| MCP via |
| Probe bridge + smoke |
|
|
| Gate de checkpoint + transação ( |
Layout do repo
extendscript/dispatcher.jsx # Único script de runtime no InDesign
src/
index.ts # Entry MCP + agent instructions
agent-instructions.ts # Orientação scan→batch para o client
bridge/ # BridgeAdapter (AppleScript v1)
session/ # Document Model, cache, snapshots, checkpoints, semantic
commands/ # Zod schema, planner, batch, checkpoint gate, mutations
tools/ # Tools MCP registradas
lib/ # geometry + text-layout (pts) + layout-assistant + ascii
tests/ # Gate + transação (fake bridge, não abre o InDesign)License
MIT
Available Tools
22 toolsanalyze_pageA
Classify page items into semantic roles (Header, Subtitle, Body, Caption, Image, Background, Logo, Decorative, Unknown) and store them on the Document Model. Call after scan_document so batch targets like {role:"Header"} work. Typical flow: scan → analyze_page → execute_batch → summarize_changes.
Inputs: pageIndex (required), persist.
apply_styleA
Apply a paragraph, character, or object style to target item(s). Prefer execute_batch when combining with other ops.
Inputs: style (required), target (required), styleKind, timeoutSec.
check_missing_linksB
Report missing / inaccessible / out-of-date links in the active document.
Inputs: timeoutSec.
create_styleB
Create a paragraph/character/object style (from selection item, basedOn, and/or font size spec).
Inputs: name (required), spec, basedOn, styleKind, +2 more.
embed_assetB
Embed a linked asset into the document (unlink from disk).
Inputs: name, linkId, timeoutSec.
execute_batchA
Preferred mutation path: resolve targets → checkpoint gate → one dispatcher round-trip inside a single ENTIRE_SCRIPT undo transaction → modelPatch on cache. ALWAYS prefer this over execute_operation / layout_operation when combining ops. Mutating batches need an on-disk checkpoint for the current generation; the server takes one automatically and refuses the batch if saving it fails. Typical flow: scan_document → (analyze_page) → execute_batch → summarize_changes.
Inputs: commands (required), timeoutSec, checkpointTag, skipCheckpoint, +2 more.
execute_operationA
Thin single-op wrapper around execute_batch (checkpoint/move/resize/delete/duplicate/setText/replaceText/setFont/setFill/applyStyle). op=checkpoint saves an .indd copy to _checkpoints/ next to the document and needs no target — run it before a risky sequence of edits. Prefer execute_batch when issuing two or more ops.
Inputs: op (required), x, y, dx, +18 more.
get_document_modelA
Return a summary of the cached Document Model without rescanning InDesign (unless forceRefresh or cache empty).
Inputs: maxAgeMs, timeoutSec, forceRefresh, includeItems.
get_selectionB
Read the current InDesign selection as stable UUIDs and sync them into the session cache.
Inputs: timeoutSec, writeUuids.
layout_assistantA
Diagnose or fix page layout (overlapping/tight text, items outside margins). Modes: diagnose | preview | fix. Prefer after scan_document (+ analyze_page for title roles). Units are points. fix applies via execute_batch.
Inputs: mode (required), pageIndex (required), uuids, marginPt, +4 more.
layout_operationA
Layout helpers: align | distribute | center | stack | applyMargins. Thin wrapper — prefer execute_batch when combining with other ops. Requires scan_document; role targets need analyze_page.
Inputs: op (required), target (required), axis, align, +4 more.
list_assetsA
List placed links/assets (path, status, page) from cache or refresh from InDesign.
Inputs: status, refresh, timeoutSec.
list_stylesA
List paragraph / character / object styles from the Document Model cache (or refresh from InDesign). Prefer after scan_document; use apply_style / execute_batch applyStyle to apply.
Inputs: refresh, styleKind, timeoutSec.
ping_indesignA
Check if Adobe InDesign is reachable (app open, version, active document). Call first in a session before scan_document.
Inputs: timeoutSec.
preview_batchA
Dry-run a batch against the cached Document Model (no InDesign writes). Call after scan_document. Prefer preview_batch before a large execute_batch.
Inputs: commands (required).
refresh_documentA
Invalidate and reload the Document Model from InDesign. Use only after manual edits in InDesign or when the cache may be stale — not before every mutation.
Inputs: depth, pages, timeoutSec, writeUuids.
relink_assetB
Relink a placed asset to a new file path on disk.
Inputs: filePath (required), name, linkId, timeoutSec.
replace_assetB
Replace a placed asset with another file (same as relink_asset).
Inputs: filePath (required), name, linkId, timeoutSec.
scan_documentA
Scan the active InDesign document into the session Document Model cache and write stable mcp: labels. Call ONCE per session before planning edits; then use execute_batch (not repeated scans).
Inputs: depth, timeoutSec, writeUuids, captureSnapshot.
snapshotA
Capture or inspect Document Model snapshots. Modes: before | after | list | diff. Capture uses the current session cache (run scan_document first).
Inputs: mode (required), label, afterId, beforeId.
summarize_changesA
Diff snapshot before vs after into agent-readable summary. Call after execute_batch (or layout_assistant fix). Defaults to the last before/after pair from scan_document + batch.
Inputs: afterId, beforeId.
update_styleB
Update an existing style definition (spec, basedOn, rename, or copy from an item).
Inputs: style (required), spec, basedOn, newName, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Several tools have unclear boundaries: execute_operation, layout_operation, and execute_batch overlap significantly with execute_batch being the preferred path; relink_asset and replace_asset are explicitly described as the same. This creates risk of selecting the wrong tool for a task.
Most tools follow a verb_noun pattern (ping_indesign, scan_document, execute_batch), but there are outliers like snapshot (verb/noun), layout_assistant (noun_noun), and check_missing_links (verb_adjective_noun). The mix of styles at least remains readable and skake_case is consistent.
At 22 tools, the server is on the heavier side but still within a reasonable range for a feature-rich InDesign automation server. The count is slightly inflated by redundant wrappers and aliases, but each tool has some justification.
The tool surface covers a broad workflow: session setup (ping, scan, get model), analysis (analyze_page), mutations (execute_batch, style/layout operations), and asset management (list, check, relink, embed). Missing features like document creation/export are notable but likely outside the intended scope.
Maintenance
Related MCP Connectors
Marketo MCP server for AI. 130 tools to operate Marketo from Claude, Cursor, or ChatGPT.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseCqualityCmaintenanceA Model Context Protocol (MCP) server that gives AI assistants direct, native control over Adobe InDesign via a UXP plugin bridge, with ~130 tools covering documents, pages, text, graphics, styles, master spreads, books, and export.10050 npm110MIT
- AlicenseAqualityCmaintenanceAn MCP server that lets AI assistants like Claude control Adobe Illustrator through natural language by executing ExtendScript code and providing document state inspection.127MIT
- FlicenseNot gradedqualityDmaintenanceA custom MCP server that lets Claude Code read, search, and manipulate Adobe InDesign documents. macOS only.-
- AlicenseCqualityDmaintenanceEnables AI assistants to control Adobe InDesign for automated publishing workflows, document creation, and layout tasks across macOS and Windows.363MIT