mcp-indesign-agent

mcp-indesign-agent

MCP server for editing Adobe InDesign via natural language in Cursor. It bridges to InDesign through AppleScript and ExtendScript, providing semantic tools for batch operations, styles, assets, and layout fixes.

Category
Visit Server

README

MCP InDesign Agent

MCP server para editar Adobe InDesign via linguagem natural no Cursor.

Cursor Agent → MCP (stdio) → Bridge local (AppleScript + dispatcher.jsx) → InDesign

v0.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 .indd ativo para scan/batch
  • Permissão de Automação (veja abaixo)

macOS Automation

Na primeira chamada (npm run doctor ou o MCP no Cursor), o macOS pode pedir permissão para controlar o InDesign.

  1. System Settings → Privacy & Security → Automation
  2. Garanta que o app que lança o MCP (Cursor, Terminal, etc.) pode controlar Adobe InDesign
  3. 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 doctor

doctor 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 doctor

Nomes típicos: Adobe InDesign 2026, Adobe InDesign 2025 (veja /Applications).

Connect to Cursor

  1. npm run build
  2. Adicione em ~/.cursor/mcp.json (ou .cursor/mcp.json do 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"
      }
    }
  }
}
  1. Substitua o path absoluto e o INDESIGN_APP_NAME pelo resultado do doctor
  2. Recarregue os MCP servers no Cursor
  3. 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)
  → execute_batch | layout_assistant fix
  → summarize_changes

Meta: pedido editorial típico em ≤ 3 round-trips MCP (scan → batch → summarize).

Exemplos:

Pedido Sequência
“Aumenta o espaço entre os títulos” scan → analyze_page → execute_batch com stack em {role:"Header"} → summarize_changes
“Textos sobrepostos” scan → layout_assistant diagnose → preview → fix
“Aplica Heading 1 no título” scan → analyze_page → apply_style / batch applyStyle
“Relinka a imagem missing” scan → check_missing_links → relink_asset

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 ping_indesign, scan_document, refresh_document, get_document_model, get_selection
Semântica analyze_page
Batch / snapshots snapshot, preview_batch, execute_batch, summarize_changes
Conveniência (thin) execute_operation, layout_operation
Layout assist layout_assistant (diagnose | preview | fix)
Styles list_styles, apply_style, create_style, update_style
Assets list_assets, check_missing_links, relink_asset, replace_asset, embed_asset

Preferir sempre execute_batch para mutações multi-passo. Thin tools existem para 1 op.

Ops de execute_batch

move, resize, delete, duplicate, setText, replaceText, setFont, setFill, align, distribute, center, stack, applyMargins, applyStyle, createStyle, updateStyle, relinkAsset, replaceAsset, embedAsset.

Env

Var Default
INDESIGN_APP_NAME auto (maior ano em /Applications)
INDESIGN_SCRIPT_TIMEOUT_SEC 300
INDESIGN_TEMP_DIR tmpdir/mcp-indesign-agent
INDESIGN_BRIDGE applescript

Scripts

Script Uso
npm run build Compila dist/
npm start Sobe o MCP (node dist/index.js)
npm run dev MCP via tsx (dev)
npm run doctor Probe bridge + smoke
npm run typecheck tsc --noEmit

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, semantic
  commands/                   # Zod schema, planner, batch
  tools/                      # Tools MCP registradas
  lib/                        # geometry + text-layout (pts) + layout-assistant

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured