idml-mcp
Enables AI agents to parse, summarize, and safely edit Adobe InDesign IDML files without requiring InDesign.
README
idmlkit
The AI-native toolkit for Adobe InDesign files (IDML) — parse, summarize, and safely write back. No InDesign required.
AI tools have transformed how we write code and build web pages, but print and layout designers have largely been left out: the InDesign ecosystem has no AI-ready open interface. Existing InDesign MCP servers all remote-control a running InDesign instance — which means a license, a desktop, and an open app for every operation.
idmlkit takes the other road: it works directly on .idml files (InDesign's open, XML-based interchange format). That means it runs anywhere Node.js runs — servers, CI pipelines, Linux, a designer's laptop — with nothing from Adobe installed.
JSON data in ──► idmlkit ──► perfectly laid-out IDML out ──► open in InDesign / print
Design philosophy: the AI never touches the XML
LLMs are great at understanding a document and deciding what should change, and terrible at hand-editing 5,000 lines of layout XML without breaking it. So idmlkit splits the work:
- Deterministic code parses the package and produces a compact, LLM-friendly summary (pages, frames, stories as indexed text runs, image links, styles) — a few hundred tokens instead of megabytes of XML.
- Write-back is surgical: replacing a text run or relinking an image rewrites only that one element via targeted string surgery. Everything else — geometry, styles, the XML formatting itself — is preserved byte-for-byte (enforced by tests). The AI physically cannot corrupt your layout.
Validated against real InDesign 2025 exports: on Adobe's official Flex Layout sample (14.5 MB, with a single 20 MB spread), summarize runs in under half a second and a text edit changes exactly one zip entry — every other entry verified byte-identical by CRC.
Packages
| Package | What it is |
|---|---|
idmlkit |
Core library + CLI: open, summarize, safe text/image write-back |
idml-mcp |
MCP server exposing those abilities to Claude and any MCP-capable agent |
Quick start
npm install
npm run build
node scripts/make-sample-idml.mjs # generates examples/sample.idml
CLI
$ node packages/idmlkit/dist/cli.js summary examples/sample.idml
Pages: 1 Spreads: 1
Story u123 (11 words, 2 runs): Spring Catalog 2026 Fresh arrivals for the new season…
Image link u202: file:/images/hero.jpg
Paragraph styles: $ID/NormalParagraphStyle, Headline, Body
$ node packages/idmlkit/dist/cli.js set-text examples/sample.idml u123 0 "Summer Sale 2026" -o out.idml
$ node packages/idmlkit/dist/cli.js relink out.idml u202 "file:/images/summer.jpg"
MCP server (Claude Code / Claude Desktop)
{
"mcpServers": {
"idml": {
"command": "node",
"args": ["<repo>/packages/idml-mcp/dist/server.js"]
}
}
}
Then ask Claude things like "Summarize catalog.idml and replace every 2025 date with 2026" — it will use these tools:
| Tool | Purpose |
|---|---|
idml_summarize |
Structured summary of pages, frames, stories, images, styles |
idml_get_story |
One story's plain text + indexed runs with styles |
idml_set_text |
Replace one run's text (layout untouched, byte-for-byte) |
idml_relink_image |
Point an image link at a new file (geometry untouched) |
Library
import { IdmlDocument, summarizeDocument, setStoryRunText } from "idmlkit";
const doc = await IdmlDocument.open("catalog.idml");
console.log(summarizeDocument(doc)); // LLM-friendly JSON
setStoryRunText(doc, "u123", 0, "New headline");
await doc.save("catalog-updated.idml");
Use cases
- Database publishing: fill a designed template with product data — thousands of catalog pages, price lists, or menus without opening InDesign once.
- Localization: extract every text run with its styles, translate, write back safely.
- Agent workflows: let Claude read a layout, reason about its content, and apply text/image updates as part of a larger pipeline.
Roadmap
- [x] Read IDML packages, LLM-friendly summaries
- [x] Safe text run replacement and image relinking
- [x] MCP server (stdio)
- [ ] Page → frame mapping with geometry (which frame is where)
- [ ] Template fill: apply a JSON data object to a tagged template in one call
- [ ] Story-level structured diff (what changed between two IDML files)
- [ ] Overflow heuristics (warn when new text likely won't fit its frame)
- [ ] Real-world IDML corpus tests (CC 2018–2026 exports)
Development
npm install
npm run build # tsc project references
npm test # vitest — includes byte-for-byte preservation tests
License
MIT. Not affiliated with or endorsed by Adobe. "Adobe" and "InDesign" are trademarks of Adobe Inc., used here only to describe compatibility.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。