layoutbridge-spm 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +171 -0
- package/LICENSE +26 -0
- package/README.de.md +318 -0
- package/README.md +304 -4
- package/THIRD-PARTY-NOTICES.md +2878 -0
- package/dist/src/mcp/config.js +125 -0
- package/dist/src/mcp/dispatch.js +123 -0
- package/dist/src/mcp/license/free-tools.js +16 -0
- package/dist/src/mcp/license/gate.js +209 -0
- package/dist/src/mcp/license/index.js +96 -0
- package/dist/src/mcp/license/instance-name.js +56 -0
- package/dist/src/mcp/license/key-source.js +58 -0
- package/dist/src/mcp/license/lemonsqueezy-verifier.js +207 -0
- package/dist/src/mcp/license/placeholder-verifier.js +10 -0
- package/dist/src/mcp/license/polar-ids.js +63 -0
- package/dist/src/mcp/license/polar-verifier.js +265 -0
- package/dist/src/mcp/license/product-ids.js +72 -0
- package/dist/src/mcp/license/state-store.js +91 -0
- package/dist/src/mcp/license/types.js +11 -0
- package/dist/src/mcp/logging.js +270 -0
- package/dist/src/mcp/product-info.js +48 -0
- package/dist/src/mcp/server.js +250 -0
- package/dist/src/mcp/setup.js +608 -0
- package/dist/src/mcp/start.cjs +95 -0
- package/dist/src/mcp/tool-definition.js +2 -0
- package/dist/src/mcp/tools.js +2004 -0
- package/dist/src/mcp/typography-rules.js +70 -0
- package/dist/src/transport/com.js +250 -0
- package/dist/src/transport/osascript.js +171 -0
- package/dist/src/transport/queue.js +19 -0
- package/dist/src/transport/script-bundle.js +92 -0
- package/dist/src/transport/transport.js +30 -0
- package/indesign/commands/10-app.js +6 -0
- package/indesign/commands/20-documents.js +513 -0
- package/indesign/commands/22-document-setup.js +118 -0
- package/indesign/commands/23-save-package.js +255 -0
- package/indesign/commands/25-export.js +379 -0
- package/indesign/commands/26-export-image.js +197 -0
- package/indesign/commands/27-textdefaults.js +151 -0
- package/indesign/commands/28-selection.js +174 -0
- package/indesign/commands/30-pages.js +1032 -0
- package/indesign/commands/31-view.js +210 -0
- package/indesign/commands/32-sections.js +203 -0
- package/indesign/commands/35-parents.js +428 -0
- package/indesign/commands/37-layout.js +760 -0
- package/indesign/commands/40-frames.js +836 -0
- package/indesign/commands/41-shapes.js +505 -0
- package/indesign/commands/42-groups.js +117 -0
- package/indesign/commands/43-layers.js +291 -0
- package/indesign/commands/44-effects.js +274 -0
- package/indesign/commands/45-frame-options.js +247 -0
- package/indesign/commands/47-anchored.js +287 -0
- package/indesign/commands/50-modify.js +781 -0
- package/indesign/commands/52-align.js +139 -0
- package/indesign/commands/55-fit.js +106 -0
- package/indesign/commands/60-images.js +771 -0
- package/indesign/commands/62-embed.js +120 -0
- package/indesign/commands/69-placeholders.js +127 -0
- package/indesign/commands/70-text.js +567 -0
- package/indesign/commands/71-outlines.js +92 -0
- package/indesign/commands/72-place-text.js +366 -0
- package/indesign/commands/74-stories.js +116 -0
- package/indesign/commands/75-tables.js +676 -0
- package/indesign/commands/76-text-variables.js +260 -0
- package/indesign/commands/77-story-options.js +86 -0
- package/indesign/commands/78-frame-lines.js +304 -0
- package/indesign/commands/79-check-typography.js +303 -0
- package/indesign/commands/80-styles.js +1620 -0
- package/indesign/commands/81-composition.js +355 -0
- package/indesign/commands/82-object-styles.js +263 -0
- package/indesign/commands/83-indents-tabs.js +237 -0
- package/indesign/commands/84-import-styles.js +142 -0
- package/indesign/commands/85-swatches.js +112 -0
- package/indesign/commands/86-gradients.js +185 -0
- package/indesign/commands/87-replace-swatch.js +180 -0
- package/indesign/commands/88-replace-font.js +217 -0
- package/indesign/interpreter.js +758 -0
- package/package.json +55 -6
- package/rules/typography-rules.json +31 -0
package/README.md
CHANGED
|
@@ -1,7 +1,307 @@
|
|
|
1
|
-
#
|
|
1
|
+
# LayoutBridge for Adobe InDesign®
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deutsche Fassung: [README.de.md](README.de.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**LayoutBridge for Adobe InDesign®** – MCP server for Adobe® InDesign®
|
|
6
|
+
(npm package `layoutbridge-spm`) by MCP Interfaces. It provides typesetting
|
|
7
|
+
in Adobe InDesign as tools that any MCP-capable AI can call: documents and
|
|
8
|
+
pages, layout grid and guides, frames, images and links, text, styles,
|
|
9
|
+
tables, swatches, typography checks, preflight and export.
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
Product page: https://mcp-interfaces.com/layoutbridge/ (German:
|
|
12
|
+
https://mcp-schnittstellen.de/layoutbridge/).
|
|
13
|
+
Step-by-step installation guide:
|
|
14
|
+
https://mcp-interfaces.com/layoutbridge/installation.html (German:
|
|
15
|
+
https://mcp-schnittstellen.de/layoutbridge/installation.html).
|
|
16
|
+
|
|
17
|
+
Adobe and InDesign are either registered trademarks or trademarks of Adobe in
|
|
18
|
+
the United States and/or other countries.
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- Adobe® InDesign®, installed and running – Mac or Windows (Windows 10/11
|
|
23
|
+
x64; tested with InDesign® 21.5.1.73 on Windows 11)
|
|
24
|
+
- Windows: Windows PowerShell 5.1 (`powershell.exe`, included in Windows)
|
|
25
|
+
- Your licence key from the purchase receipt e-mail – one key per
|
|
26
|
+
workstation
|
|
27
|
+
- A network connection for the licence check on the first call
|
|
28
|
+
- **Node.js version 20 or newer – only for the npm package** (entry in the
|
|
29
|
+
configuration file, `--setup`, `--deactivate`) **and for other MCP
|
|
30
|
+
clients.** With the installation package (`.mcpb`) no separate Node.js
|
|
31
|
+
installation is needed – Claude Desktop comes with Node.js (switch “Use
|
|
32
|
+
built-in Node.js for MCP” under “Advanced settings”, on by default).
|
|
33
|
+
|
|
34
|
+
## Installation in Claude Desktop
|
|
35
|
+
|
|
36
|
+
There are two ways. Way A is the shorter one; Way B is the same entry that
|
|
37
|
+
other MCP clients receive. The installation guide linked above shows every
|
|
38
|
+
step with Mac and Windows details.
|
|
39
|
+
|
|
40
|
+
**Way A – installation package (bundle file `.mcpb`)**
|
|
41
|
+
|
|
42
|
+
1. Download the file `layoutbridge-spm-<version>.mcpb` from the product
|
|
43
|
+
page.
|
|
44
|
+
2. In Claude Desktop, open Settings › Desktop app › Extensions and drag the
|
|
45
|
+
file into that window – it says “Drag .MCPB or .DXT files here to
|
|
46
|
+
install”. On Mac you can open the file by double-clicking it instead. On
|
|
47
|
+
Windows, double-clicking does not open Claude Desktop – Windows asks
|
|
48
|
+
which app to use; drag the file into the window, or choose “Advanced
|
|
49
|
+
settings” › “Install extension” and select the file. Confirm the
|
|
50
|
+
installation dialog with “Install”.
|
|
51
|
+
3. Enter your licence key in the field “Licence key” and click “Save”. The
|
|
52
|
+
key is stored by Claude Desktop on your computer.
|
|
53
|
+
4. **Switch the extension on.** After installation, “LayoutBridge for
|
|
54
|
+
Adobe InDesign®” is listed under Settings › Extensions as “Disabled”.
|
|
55
|
+
Switch it to enabled – otherwise no tools appear.
|
|
56
|
+
|
|
57
|
+
**Way B – npm package (Node.js version 20 or newer)**
|
|
58
|
+
|
|
59
|
+
Setup command – run in Terminal (Mac) or PowerShell (Windows):
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
npx layoutbridge-spm --setup
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The command adds the server to the Claude Desktop configuration file and
|
|
66
|
+
stores the licence key in the default location (see “Licence key”). It
|
|
67
|
+
only runs when you call it. Before every change it shows the full path of
|
|
68
|
+
the file and the new entry verbatim and asks for confirmation (`y` for
|
|
69
|
+
yes, `n` for no). Before writing it creates a backup
|
|
70
|
+
`claude_desktop_config.json.bak-YYYY-MM-DD_HHMM` in the same folder; only
|
|
71
|
+
the entry `layoutbridge-spm` under `mcpServers` is changed, all other
|
|
72
|
+
entries stay unchanged. If the file is not valid JSON, it stops and names
|
|
73
|
+
line and column. The licence key is asked for without being shown and is
|
|
74
|
+
written only to `license.key`. No administrator rights, no network
|
|
75
|
+
connection.
|
|
76
|
+
|
|
77
|
+
- `--dry-run` shows the same and writes nothing.
|
|
78
|
+
- `--license-key-file <path>` reads the key from a file instead of asking
|
|
79
|
+
for it.
|
|
80
|
+
|
|
81
|
+
**By hand:** open the configuration file of Claude Desktop in a text
|
|
82
|
+
editor – Mac `~/Library/Application Support/Claude/claude_desktop_config.json`,
|
|
83
|
+
Windows `%APPDATA%\Claude\claude_desktop_config.json` (easier: Settings ›
|
|
84
|
+
Desktop app › Developer › “Edit Config” opens the folder containing the
|
|
85
|
+
file). If the file is empty or does not exist yet, its complete content is
|
|
86
|
+
this:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"layoutbridge-spm": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "layoutbridge-spm"]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If the file already lists other servers under `"mcpServers"`, insert only
|
|
100
|
+
the block `"layoutbridge-spm": { … }` there – with a comma between the
|
|
101
|
+
entries – and leave everything else unchanged. Then store the licence key
|
|
102
|
+
(see “Licence key”). On the first start, `npx` downloads the package
|
|
103
|
+
`layoutbridge-spm` from the npm registry; after that it starts from the
|
|
104
|
+
local cache.
|
|
105
|
+
|
|
106
|
+
**Then:** quit Claude Desktop completely – on Mac with ⌘ + Q, on Windows
|
|
107
|
+
via “Quit” in the application menu; closing the window is not enough –
|
|
108
|
+
and start it again. Start Adobe® InDesign® and ask in Claude Desktop:
|
|
109
|
+
“Which InDesign® version is running?” Claude calls the tool
|
|
110
|
+
`get_app_version` and reports the version. The tools appear under the
|
|
111
|
+
extension name “LayoutBridge for Adobe InDesign®” on Way A, and with the
|
|
112
|
+
prefix `layoutbridge-spm:` on Way B.
|
|
113
|
+
|
|
114
|
+
## Other MCP clients
|
|
115
|
+
|
|
116
|
+
Other MCP clients (Claude Code, Cursor, GitHub Copilot and others) register
|
|
117
|
+
the same server according to their own documentation. The command is
|
|
118
|
+
always
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
npx -y layoutbridge-spm
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
and requires Node.js version 20 or newer. The licence key is found in the
|
|
125
|
+
same places as described under “Licence key”.
|
|
126
|
+
|
|
127
|
+
## Licence key
|
|
128
|
+
|
|
129
|
+
The key is in the purchase receipt e-mail and is valid for exactly one
|
|
130
|
+
workstation; several workstations need several keys.
|
|
131
|
+
|
|
132
|
+
**Where LayoutBridge looks for the key, in this order:**
|
|
133
|
+
|
|
134
|
+
1. the environment variable `LAYOUTBRIDGE_SPM_LICENSE_KEY` – the
|
|
135
|
+
installation package sets it from the field “Licence key”; on Way B it
|
|
136
|
+
can go into the server entry as `"env": { "LAYOUTBRIDGE_SPM_LICENSE_KEY":
|
|
137
|
+
"YOUR-LICENCE-KEY" }`,
|
|
138
|
+
2. the file named in the environment variable `LAYOUTBRIDGE_SPM_LICENSE_FILE`,
|
|
139
|
+
3. the file `license.key` at the default location – the key only, no other
|
|
140
|
+
text:
|
|
141
|
+
- Mac: `~/Library/Application Support/layoutbridge-spm/license.key`
|
|
142
|
+
- Windows: `%USERPROFILE%\.layoutbridge-spm\license.key`
|
|
143
|
+
|
|
144
|
+
Create the folder `layoutbridge-spm` or `.layoutbridge-spm` if it does not
|
|
145
|
+
exist. A key added or changed later takes effect without a restart.
|
|
146
|
+
|
|
147
|
+
**Check:** on the first tool call LayoutBridge verifies the key online;
|
|
148
|
+
after that at most once every 24 hours. If the service cannot be reached,
|
|
149
|
+
LayoutBridge keeps working for 14 days from the last valid check and
|
|
150
|
+
appends a warning to every response; after that, or if no valid check has
|
|
151
|
+
ever taken place, the tools are locked until the key can be verified
|
|
152
|
+
again.
|
|
153
|
+
|
|
154
|
+
**Without a valid key** every tool answers with `ok: false` and
|
|
155
|
+
`error.kind: "license"`. The message says in plain words whether the key is
|
|
156
|
+
missing, expired, invalid, for another product or cannot be verified right
|
|
157
|
+
now, and names the location where the key was expected; `error.details`
|
|
158
|
+
adds the support address and the licence terms. InDesign® is not
|
|
159
|
+
contacted.
|
|
160
|
+
|
|
161
|
+
**What is stored and transmitted:** the result of the last check is stored
|
|
162
|
+
in `license-state.json` next to `license.key` – with a fingerprint of the
|
|
163
|
+
key, never the key itself, and without customer data. For the check, the
|
|
164
|
+
licence key and an identifier of this workstation go to the payment service
|
|
165
|
+
Polar (`api.polar.sh`, USA). The identifier is a random
|
|
166
|
+
name of the form `layoutbridge-<8 characters>`, created the first time and
|
|
167
|
+
stored in `instance-name` next to `license.key`; the computer name is not
|
|
168
|
+
used. Anyone who wants a readable name in the merchant account sets
|
|
169
|
+
`LAYOUTBRIDGE_SPM_INSTANCE_NAME`. Document contents, file paths and tool
|
|
170
|
+
calls are never transmitted.
|
|
171
|
+
|
|
172
|
+
## Changing computers
|
|
173
|
+
|
|
174
|
+
A licence is active on one workstation. Release it on the old computer
|
|
175
|
+
before entering the key on the new one – no InDesign®, no Claude Desktop
|
|
176
|
+
needed, but Node.js version 20 or newer:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
npx layoutbridge-spm --deactivate
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The command reports in plain text whether the release worked and deletes
|
|
183
|
+
the local check result. It reads the key from the same places as the
|
|
184
|
+
server (see “Licence key”); with the installation package the key is kept
|
|
185
|
+
by Claude Desktop, so put it into `license.key` first or write to support.
|
|
186
|
+
If you have no Node.js because you only use the installation package, or
|
|
187
|
+
if the old computer is no longer available, you can release the activation
|
|
188
|
+
yourself in the Polar customer portal or write to support; they release
|
|
189
|
+
the activation.
|
|
190
|
+
|
|
191
|
+
## Server configuration
|
|
192
|
+
|
|
193
|
+
Defaults that differ from workplace to workplace can be set in a JSON file
|
|
194
|
+
that the server reads at start: path from the environment variable
|
|
195
|
+
`LAYOUTBRIDGE_SPM_CONFIG`, otherwise on the Mac
|
|
196
|
+
`~/Library/Application Support/layoutbridge-spm/config.json`, on Windows
|
|
197
|
+
`%USERPROFILE%\.layoutbridge-spm\config.json`. If the file is missing, the
|
|
198
|
+
neutral defaults apply. All keys are optional; a parameter in the call
|
|
199
|
+
always takes precedence.
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"tracking_warn_beyond": 20,
|
|
204
|
+
"min_ppi": 300,
|
|
205
|
+
"export_pdf": {
|
|
206
|
+
"preset": "Name of the PDF preset",
|
|
207
|
+
"fallback_preset": "Name of the fallback preset",
|
|
208
|
+
"fallback_over_bytes": 4194304
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
| Key | Effect |
|
|
214
|
+
|---|---|
|
|
215
|
+
| `tracking_warn_beyond` | `apply_character_format_to_range` warns if the absolute tracking value exceeds it. Without an entry, no warning. |
|
|
216
|
+
| `min_ppi` | Default for the parameter `min_ppi` of `place_image`, `scale_image_in_frame` and `fit_frame` (warning below this effective resolution). Without an entry 300. |
|
|
217
|
+
| `export_pdf.preset` | Default for `preset` of `export_pdf`. Without an entry the localised “High Quality Print”. |
|
|
218
|
+
| `export_pdf.fallback_preset`, `export_pdf.fallback_over_bytes` | Second pass with this preset if the file is larger. Without an entry no second pass. |
|
|
219
|
+
|
|
220
|
+
Unknown keys and wrong types are reported by the server at start on
|
|
221
|
+
standard error and ignored.
|
|
222
|
+
|
|
223
|
+
## Log
|
|
224
|
+
|
|
225
|
+
One line per call, one file per running instance:
|
|
226
|
+
`~/Library/Logs/layoutbridge-spm/` on the Mac,
|
|
227
|
+
`%USERPROFILE%\.layoutbridge-spm\logs\` on Windows; other location via the
|
|
228
|
+
environment variable `LAYOUTBRIDGE_SPM_LOG_DIR`. The log stays on your
|
|
229
|
+
computer; it is not sent anywhere.
|
|
230
|
+
|
|
231
|
+
**What the line contains (default `basic`):** timestamp, tool name,
|
|
232
|
+
duration, success, error kind and error text, warnings and the **names** of
|
|
233
|
+
the parameters passed. Values appear only where they are needed for
|
|
234
|
+
troubleshooting and harmless (numbers, identifiers, enumeration values,
|
|
235
|
+
file paths). Text that can be document content appears only as a length –
|
|
236
|
+
`"<Text, 248 Zeichen>"`. In paths your home folder is replaced by `~`. The
|
|
237
|
+
licence key is never logged.
|
|
238
|
+
|
|
239
|
+
**Setting the depth –** `LAYOUTBRIDGE_SPM_LOG_LEVEL`:
|
|
240
|
+
|
|
241
|
+
| Value | Meaning |
|
|
242
|
+
|---|---|
|
|
243
|
+
| `off` | no logging, no file is created |
|
|
244
|
+
| `basic` | **default**, filtered as described above |
|
|
245
|
+
| `full` | all parameters verbatim, paths with user name – only for troubleshooting, at the request of support |
|
|
246
|
+
|
|
247
|
+
When `full` is active, the first line of the log and the server's start
|
|
248
|
+
message say so. Afterwards switch back to `basic`.
|
|
249
|
+
|
|
250
|
+
**Retention:** at start the server deletes log files older than **30
|
|
251
|
+
days**. Other period via `LAYOUTBRIDGE_SPM_LOG_KEEP_DAYS` (number of days;
|
|
252
|
+
`0` switches deletion off).
|
|
253
|
+
|
|
254
|
+
## License terms
|
|
255
|
+
|
|
256
|
+
Use of LayoutBridge for Adobe InDesign® is governed by the
|
|
257
|
+
licence terms (EULA). The German version is authoritative.
|
|
258
|
+
|
|
259
|
+
- English: https://mcp-interfaces.com/layoutbridge/license.html
|
|
260
|
+
- Deutsch: https://mcp-schnittstellen.de/layoutbridge/lizenzbedingungen.html
|
|
261
|
+
|
|
262
|
+
The server names the address in its start line and in every response of the
|
|
263
|
+
error kind `license` (`error.details.license_terms`).
|
|
264
|
+
|
|
265
|
+
## Privacy Policy
|
|
266
|
+
|
|
267
|
+
Which data the server processes – licence check with the payment service,
|
|
268
|
+
log on your own computer, nothing else – is set out in the
|
|
269
|
+
product's privacy policy:
|
|
270
|
+
|
|
271
|
+
- English: https://mcp-interfaces.com/layoutbridge/privacy.html
|
|
272
|
+
- Deutsch: https://mcp-schnittstellen.de/layoutbridge/datenschutz.html
|
|
273
|
+
|
|
274
|
+
The licence check calls the payment service Polar; its
|
|
275
|
+
privacy policy: https://polar.sh/legal/privacy.
|
|
276
|
+
|
|
277
|
+
## Support
|
|
278
|
+
|
|
279
|
+
Questions and error reports to **kontakt@mcp-interfaces.com**. We answer
|
|
280
|
+
on working days, aiming for within two working days. Helpful are:
|
|
281
|
+
tool name, error text verbatim, time, InDesign version and
|
|
282
|
+
operating system. **Never send us your licence key.**
|
|
283
|
+
|
|
284
|
+
A copied error message may contain file names and the folder path below
|
|
285
|
+
your home folder as well as names from the document
|
|
286
|
+
(pages, frames, styles) – no user name, no
|
|
287
|
+
document text, no licence key. Bug fixes are implemented
|
|
288
|
+
as quickly as possible.
|
|
289
|
+
|
|
290
|
+
## Third-party notices
|
|
291
|
+
|
|
292
|
+
The package contains third-party software (runtime dependencies including
|
|
293
|
+
transitive packages). Name, version, licence, copyright line and full
|
|
294
|
+
licence text per package are in `THIRD-PARTY-NOTICES.md` (included in the
|
|
295
|
+
npm package and in the installation package).
|
|
296
|
+
|
|
297
|
+
## Versions and changelog
|
|
298
|
+
|
|
299
|
+
One release a month with a catalogue of new features; bug fixes are
|
|
300
|
+
implemented as quickly as possible, independently of that release cycle. All changes
|
|
301
|
+
are listed in `CHANGELOG.md` (included in the package). Within a
|
|
302
|
+
major version, tool names, parameters and return fields remain stable;
|
|
303
|
+
additions are additive.
|
|
304
|
+
|
|
305
|
+
## Licence
|
|
306
|
+
|
|
307
|
+
Proprietary, all rights reserved. See `LICENSE`.
|