InDesign MCP
# InDesign MCP
**Turn a design brief into an editable InDesign document.**
An unofficial, local Model Context Protocol (MCP) server for Adobe InDesign on Windows. Connect a compatible AI client, describe the layout you want, and let InDesign build a real document you can continue editing.
[English](README.md) · [Türkçe](README.tr.md)

## What it can do
- Turn a structured design request into a new, editable INDD document.
- Create single-page or multi-page layouts with text, colored backgrounds, rectangles, and ellipses.
- Place images from files already on your computer.
- Save the INDD document and optionally export a PDF in the same request.
- Open an existing InDesign document, add text to the active document, save it, or export it to PDF.
The server exposes fixed document tools and does not accept arbitrary inline code. An optional trusted-script tool can run a user-approved `.jsx` file from one explicitly configured folder.
## How it works
1. Describe the design in your AI client, including its content, size, style, and output location.
2. The AI client turns that brief into page measurements, colors, text, and element positions.
3. The local MCP server validates the request and sends it to the InDesign desktop application through Windows COM automation.
4. InDesign creates the document. The server saves an editable INDD file and can also export a PDF.
5. The optional dockable UXP panel can expose document inspection and text-frame tools through a fixed local action queue, and can run an approved JSX through the local MCP API.
Coordinates in the COM layout tools use points measured from each page's top-left corner. The server sets the document's measurement units and ruler origin before placing those objects, so those layouts do not depend on the user's ruler preferences. UXP frame creation passes point bounds directly to InDesign relative to its current ruler zero point, as described in Adobe's [measurements guide](https://developer.adobe.com/indesign/uxp/resources/fundamentals/measurements-and-positioning/); that path has not been host-verified.
## Tested status
The MCP-to-InDesign workflow has been verified on Windows with Adobe InDesign 2027 (version 22.0.0.104): a live MCP client queried InDesign, created a one-page document, exported a PDF, and confirmed that the saved document was open in InDesign.
Other InDesign versions and the individual AI client integrations have not been verified end to end. This is an early community project; review generated layouts before using them in production or for print.
The new UXP document tools have not been verified end to end inside InDesign. In particular, visually confirm new-frame placement because the UXP path does not normalize InDesign's current ruler zero point. The existing COM verification does not cover these UXP tools.
## Requirements
- Windows 10 or 11
- Node.js 22 or newer and npm
- Windows PowerShell 5.1
- Adobe InDesign desktop for Windows with COM automation available
macOS, Linux, and InDesign Server are not supported by this implementation.
## Install
Clone the repository and install its locked dependencies:
git clone https://github.com/TechnoDiance23/indesign-mcp.git
cd indesign-mcp
npm ci
Then add the local stdio server to your AI client's MCP settings and restart or reload the client. Client-specific examples are in [docs/client-setup.md](docs/client-setup.md).
Set INDESIGN_LAUNCH_IF_NEEDED to true in the MCP server's environment if you want the bridge to activate InDesign through COM when it cannot find an active COM object. This can start InDesign when a tool is first called. Leave the setting out to connect only to an already active COM object.
## Trusted JSX and the InDesign panel
JSX execution is disabled unless `INDESIGN_TRUSTED_SCRIPT_DIR` points to a folder you have chosen. The MCP tool accepts only relative `.jsx` paths under that folder. It rejects absolute paths, traversal, and links that resolve outside the folder. The source is passed to InDesign with a fixed `$.evalFile` wrapper; a request cannot include inline JavaScript. The JSX tool never starts a new InDesign instance, even when `INDESIGN_LAUNCH_IF_NEEDED=true` is set for other tools.
JSX is full InDesign code, not a sandbox. It can change documents, files, and preferences or show dialogs. Inspect a specific script and ask the user to approve that script before running it. The MCP tool requires explicit confirmation; the UXP panel also requires the user to check its approval box.
The dockable UXP panel is optional and off by default. Set `INDESIGN_PANEL_HTTP_ENABLED=true` to opt in. It creates a random 256-bit bearer token in memory when the local API starts. The API listens only on `127.0.0.1:4318`; pairing requires a POST from the exact panel origin, and status, script listing, and execution require the paired bearer token. The panel keeps that token in JavaScript memory only. A port conflict or panel configuration error is logged and does not stop the stdio MCP server.
The panel's UXP WebView and network permissions allow only `http://127.0.0.1:4318`; no remote service or `domains: "all"` permission is used. Load `uxp-panel/manifest.json` with UXP Developer Tool to develop or install the panel. See [Client setup](docs/client-setup.md) for configuration. The panel source has not been loaded into InDesign as part of this release work.
The UXP document tools require `INDESIGN_PANEL_HTTP_ENABLED=true`, a running MCP panel API, and the InDesign MCP UXP panel loaded and connected in InDesign. They do not fall back to COM or launch InDesign; the existing COM tools keep their current behavior. See the [UXP bridge guide](docs/uxp-bridge.md) for the tool actions, identifier and text limits, queue timeout, and coordinate caveat.
## Try it
Ask your AI client for something like:
> Create a one-page A4 coffee-event poster with a warm cream background, a deep green title, a short description, and the date and venue. Save a new editable INDD file and a PDF in a temporary folder. Do not overwrite existing files.
Choose an output folder you trust, then review the resulting INDD document in InDesign.
## Available tools
| Tool | What it does |
| --- | --- |
| indesign_status | Reports the InDesign version and metadata for open documents. |
| indesign_run_trusted_script | Runs a user-approved relative `.jsx` file under the configured trusted folder. |
| indesign_create_layout | Creates a new layout, saves an INDD file, and optionally exports a PDF. |
| indesign_open_document | Opens a document from a supplied Windows path. |
| indesign_create_document | Creates a new, unsaved document. |
| indesign_add_text_frame | Adds text to a page in the active document. |
| indesign_save_active_document | Saves the active document to its current or a new path. |
| indesign_export_pdf | Exports the active or selected document to PDF. |
| indesign_uxp_status | Reports local UXP API/panel connection state and, when connected, active-document metadata. |
| indesign_uxp_inspect_document | Reads document, page, and text-frame metadata, overflow/locked state, and link health. |
| indesign_uxp_read_text_frame | Reads text from an explicitly identified frame, up to 50,000 characters. |
| indesign_uxp_set_text_frame | Replaces the full contents of an explicitly identified, unlocked frame. |
| indesign_uxp_create_text_frame | Creates a frame on an explicitly identified page using point bounds and supplied text. |
| indesign_uxp_list_paragraph_styles | Lists paragraph styles and group paths for an identified document. |
| indesign_uxp_apply_paragraph_style | Applies a listed paragraph style to a frame or one paragraph, preserving overrides. |
## Limits
- A layout request supports up to 20 pages, 120 elements total, 30 elements per page, 5,000 text characters, and 12 local images.
- The current text controls are font size, color, and alignment. Tables, master pages, advanced typography, custom font selection, and print preflight are not implemented.
- Images must already exist as local files. The server does not download or generate images.
- PDF export uses InDesign's current export settings.
- Editing tools can change the active document. PDF overwrite requires an explicit option; review paths and overwrite settings before a tool call.
- UXP tools accept optional `timeout_ms` from 1,000 to 120,000, defaulting to 30,000. A timed-out write may still complete, so inspect the document before retrying; a frame-creation retry can create a duplicate. Frame creation uses InDesign's current ruler zero point; verify placement visually. See the [UXP bridge guide](docs/uxp-bridge.md).
## Privacy and data flow
- The MCP server communicates with the AI client over local stdio. Existing document tools use local Windows COM automation; the opt-in UXP tools use the local InDesign panel over loopback HTTP. This repository contains no project-operated remote service or document-upload endpoint.
- The optional UXP panel API is disabled by default, binds only to IPv4 loopback, and requires exact-origin pairing plus a bearer token for API data and script execution. These controls do not authenticate against a malicious process running as the same Windows user; treat same-user local processes as trusted.
- The trusted-script folder is disabled by default. Its scripts run with InDesign's full local permissions and are not sandboxed; review them before use.
- The AI client and its provider still process prompts and tool results under their own policies. This project cannot change those policies.
- indesign_status may return open document names, full local paths, and page counts. Other tools can open files or create and modify files at paths supplied in a request.
- The server runs with the Windows permissions of the account that starts it. Use it only with files you intend the AI client to handle.
- This server requires no API key. npm ci connects to the npm registry to install dependencies.
## AI client setup
The server uses local stdio, so each AI host needs its own configuration. There is no universal setting that connects every AI product. Setup instructions include a Claude Desktop extension package and local stdio examples for Codex, Claude Code, Google Antigravity, Gemini CLI, Visual Studio Code, OpenCode, and Windsurf/Devin Local. Other MCP hosts may also work if they support local stdio servers. These host integrations have not all been verified end to end.
To build the Claude Desktop extension from source, install the project dependencies and package the repository with the official MCPB tool:
npm ci
npx --yes @anthropic-ai/mcpb pack . indesign-mcp.mcpb
Then install the `.mcpb` file in Claude Desktop under **Settings → Desktop app → Manage extensions → Advanced settings → Extension Developer → Install Extension…**. The bundle can start InDesign through COM when needed; this behavior can be disabled in the extension settings. See the [client setup guide](docs/client-setup.md) and [Claude's Desktop Extensions guide](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop).
Claude.ai in a browser does not run a local stdio server; this project does not provide a remote MCP endpoint. See the [client setup guide](docs/client-setup.md) for configuration examples.
## Contributing
Issues and pull requests are welcome. Maintainers review contributions periodically; there is no guaranteed response time. Please keep reports reproducible and never include private documents, PDFs, credentials, personal screenshots, local config backups, or unredacted machine paths. See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
## License and references
Released under the MIT License; see [LICENSE](LICENSE).
- [Adobe InDesign developer resources](https://developer.adobe.com/indesign/)
- [Adobe measurements and positioning](https://developer.adobe.com/indesign/uxp/resources/fundamentals/measurements-and-positioning/)
- [Adobe document measurement settings](https://developer.adobe.com/indesign/uxp/resources/recipes/document-changes/)
- [Model Context Protocol](https://modelcontextprotocol.io/)
TDQS
Scored across 15 tools
Two parallel transports (COM/classic vs UXP bridge) create genuinely overlapping tools: indesign_add_text_frame vs indesign_uxp_create_text_frame do the same job, and indesign_status vs indesign_uxp_status both report state. The descriptions do explain prerequisites and warn about unverified UXP paths, so an agent can choose, but indesign_create_layout also subsumes indesign_create_document + text/shape insertion, leaving boundary decisions to the reader.
All tools share the indesign_ prefix and snake_case verb_noun structure, with a consistent uxp_ infix marking the bridge-based variants. Minor deviations exist where the same operation uses different verbs (add_text_frame vs uxp_create_text_frame) and where a composite tool is named create_layout rather than create_document.
15 tools is within a reasonable range for a document-automation server and each maps to a recognizable operation. The count is somewhat inflated by the duplicated COM/UXP pairs (status, text-frame creation, inspection), which could be consolidated into transport-parameterized tools.
The core lifecycle is covered: create document/layout, open, inspect, add/read/replace text frames, list/apply paragraph styles, save, and export PDF, plus a trusted-script escape hatch. Gaps remain for item-level deletion (frames, pages), adding shapes or images to an existing document outside create_layout, and closing documents.