@transloadit/mcp-server 0.4.2 → 0.5.1

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.
Files changed (58) hide show
  1. package/README.md +256 -80
  2. package/dist/cli.js +52 -2
  3. package/dist/cli.js.map +1 -1
  4. package/dist/express.d.ts.map +1 -1
  5. package/dist/express.js +25 -12
  6. package/dist/express.js.map +1 -1
  7. package/dist/http-helpers.d.ts +90 -0
  8. package/dist/http-helpers.d.ts.map +1 -1
  9. package/dist/http-helpers.js +193 -3
  10. package/dist/http-helpers.js.map +1 -1
  11. package/dist/http-request-handler.d.ts +1 -0
  12. package/dist/http-request-handler.d.ts.map +1 -1
  13. package/dist/http-request-handler.js +9 -19
  14. package/dist/http-request-handler.js.map +1 -1
  15. package/dist/http.d.ts +2 -0
  16. package/dist/http.d.ts.map +1 -1
  17. package/dist/http.js +25 -49
  18. package/dist/http.js.map +1 -1
  19. package/dist/json.d.ts +5 -0
  20. package/dist/json.d.ts.map +1 -0
  21. package/dist/json.js +14 -0
  22. package/dist/json.js.map +1 -0
  23. package/dist/logger.d.ts.map +1 -1
  24. package/dist/logger.js +4 -1
  25. package/dist/logger.js.map +1 -1
  26. package/dist/options.d.ts +12 -0
  27. package/dist/options.d.ts.map +1 -0
  28. package/dist/options.js +34 -0
  29. package/dist/options.js.map +1 -0
  30. package/dist/request-transport.d.ts +21 -0
  31. package/dist/request-transport.d.ts.map +1 -0
  32. package/dist/request-transport.js +129 -0
  33. package/dist/request-transport.js.map +1 -0
  34. package/dist/server-card.d.ts +20 -7
  35. package/dist/server-card.d.ts.map +1 -1
  36. package/dist/server-card.js +41 -16
  37. package/dist/server-card.js.map +1 -1
  38. package/dist/server.d.ts +45 -0
  39. package/dist/server.d.ts.map +1 -1
  40. package/dist/server.js +423 -81
  41. package/dist/server.js.map +1 -1
  42. package/dist/tool-list.d.ts +9 -0
  43. package/dist/tool-list.d.ts.map +1 -0
  44. package/dist/tool-list.js +44 -0
  45. package/dist/tool-list.js.map +1 -0
  46. package/dist/tool-metadata.d.ts +53 -0
  47. package/dist/tool-metadata.d.ts.map +1 -0
  48. package/dist/tool-metadata.js +147 -0
  49. package/dist/tool-metadata.js.map +1 -0
  50. package/dist/ui/assembly-result-widget.d.ts +47 -0
  51. package/dist/ui/assembly-result-widget.d.ts.map +1 -0
  52. package/dist/ui/assembly-result-widget.js +449 -0
  53. package/dist/ui/assembly-result-widget.js.map +1 -0
  54. package/dist/upload-instructions.d.ts +29 -0
  55. package/dist/upload-instructions.d.ts.map +1 -0
  56. package/dist/upload-instructions.js +60 -0
  57. package/dist/upload-instructions.js.map +1 -0
  58. package/package.json +3 -2
package/README.md CHANGED
@@ -2,23 +2,134 @@
2
2
 
3
3
  Transloadit MCP Server (Streamable HTTP + stdio), built on top of `@transloadit/node`.
4
4
 
5
- ## Install
5
+ ## Connect by URL (recommended)
6
+
7
+ The hosted server lives at:
8
+
9
+ ```text
10
+ https://api2.transloadit.com/mcp
11
+ ```
12
+
13
+ Add it to your MCP client by URL. The client discovers API2 as the OAuth authorization server,
14
+ opens a browser consent page in the Transloadit Console, and keeps a short-lived token plus refresh
15
+ token for you. No API keys leave your Workspace.
16
+
17
+ The hosted endpoint asks you to sign in before any tool runs, Robot docs and linting included,
18
+ because MCP clients only start OAuth when the endpoint challenges them. Robot docs and linting ask
19
+ for no scopes. To use them without an account, run the server yourself (see Self-hosted).
20
+
21
+ ### Claude Code
6
22
 
7
23
  ```bash
8
- npm install @transloadit/mcp-server
24
+ claude mcp add --transport http transloadit https://api2.transloadit.com/mcp
25
+ claude mcp login transloadit
26
+ ```
27
+
28
+ For non-interactive runs (for example `claude -p`), explicitly allow MCP tools:
29
+
30
+ ```bash
31
+ claude -p "List templates" \
32
+ --allowedTools mcp__transloadit__* \
33
+ --output-format json
9
34
  ```
10
35
 
11
- ## Quick start (self-hosted, recommended)
36
+ ### Claude.ai and Claude Desktop
37
+
38
+ Settings → Connectors → Add custom connector → enter `https://api2.transloadit.com/mcp`. Claude
39
+ registers itself with API2 and opens the consent page.
40
+
41
+ ### ChatGPT
12
42
 
13
- For most teams, self-hosted MCP is the simplest happy path: run the server where your agent runs,
14
- set `TRANSLOADIT_KEY` and `TRANSLOADIT_SECRET`, and the server handles API auth automatically.
43
+ Settings → Apps & Connectors → Advanced → Developer mode → Create, then enter the URL above with
44
+ authentication set to OAuth. Files you attach in the chat are handed to
45
+ `transloadit_create_assembly` as `attachments`; results render in the Assembly result widget.
15
46
 
16
- ### Stdio (recommended)
47
+ The plugin manifest for the ChatGPT and Codex catalog (`plugin.json`, `mcp.json` and the
48
+ `.codex-plugin/plugin.json` fallback) lives in this package directory. It points at the hosted
49
+ server and at the Agent Skills catalog at `https://transloadit.com/.well-known/skills/index.json`
50
+ instead of bundling skill files.
51
+
52
+ ### Codex
53
+
54
+ ```bash
55
+ codex mcp add transloadit --url https://api2.transloadit.com/mcp
56
+ ```
57
+
58
+ Codex opens the consent page right away. To sign in again later, run
59
+ `codex mcp login transloadit`.
60
+
61
+ Or in `~/.codex/config.toml`:
62
+
63
+ ```toml
64
+ [mcp_servers.transloadit]
65
+ url = "https://api2.transloadit.com/mcp"
66
+ ```
67
+
68
+ ### Cursor
69
+
70
+ `~/.cursor/mcp.json`:
71
+
72
+ ```json
73
+ {
74
+ "mcpServers": {
75
+ "transloadit": {
76
+ "url": "https://api2.transloadit.com/mcp"
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ ### MCP Inspector
83
+
84
+ ```bash
85
+ npx @modelcontextprotocol/inspector --cli https://api2.transloadit.com/mcp
86
+ ```
87
+
88
+ ## CI and headless agents
89
+
90
+ Where no browser is available, mint a bearer token from an Auth Key and pass it as
91
+ `Authorization: Bearer <token>`:
92
+
93
+ ```bash
94
+ npx -y @transloadit/node auth token --aud mcp
95
+ ```
96
+
97
+ Generate this token in a trusted environment (backend, CI, or local shell), then hand it to the
98
+ agent runtime. You can mint it via:
99
+
100
+ - CLI: `npx -y @transloadit/node auth token --aud mcp`
101
+ - API: `POST https://api2.transloadit.com/token` (HTTP Basic Auth with key/secret)
102
+ - Node SDK: instantiate `Transloadit` with `authKey` + `authSecret`, then call
103
+ `client.mintBearerToken({ aud: 'mcp' })`
104
+
105
+ Interactive CLI sessions can also run `npx -y @transloadit/node auth login` (device flow) and reuse
106
+ the stored credentials.
107
+
108
+ Bearer tokens satisfy signature auth on API2 requests; signature checks apply to key/secret
109
+ requests.
110
+
111
+ ## Self-hosted
112
+
113
+ Run the server where your agent runs, set `TRANSLOADIT_KEY` and `TRANSLOADIT_SECRET`, and the server
114
+ handles API auth automatically.
115
+
116
+ ### Install
117
+
118
+ ```bash
119
+ npm install @transloadit/mcp-server
120
+ ```
121
+
122
+ ### Stdio
17
123
 
18
124
  ```bash
19
125
  TRANSLOADIT_KEY=MY_AUTH_KEY TRANSLOADIT_SECRET=MY_SECRET_KEY npx -y @transloadit/mcp-server stdio
20
126
  ```
21
127
 
128
+ Auth Keys sign with one HMAC algorithm. Keys created in the Console with "Allow signing Smart CDN
129
+ URLs" (the default) require `sha256`, so add `TRANSLOADIT_SIGNATURE_ALGORITHM=sha256`, as the
130
+ Console's snippet for the key shows. Other keys use the default `sha384`. A mismatch fails with
131
+ `mcp_invalid_signature`, and its hint names the algorithm the key requires.
132
+
22
133
  ### HTTP
23
134
 
24
135
  ```bash
@@ -26,7 +137,8 @@ TRANSLOADIT_KEY=MY_AUTH_KEY TRANSLOADIT_SECRET=MY_SECRET_KEY \
26
137
  npx -y @transloadit/mcp-server http --host 127.0.0.1 --port 5723
27
138
  ```
28
139
 
29
- When binding HTTP mode to non-localhost hosts, `TRANSLOADIT_MCP_TOKEN` is required.
140
+ When binding HTTP mode to non-localhost hosts, `TRANSLOADIT_MCP_TOKEN` (or the hosted-mode
141
+ `TRANSLOADIT_MCP_RESOURCE_METADATA_URL`) is required.
30
142
 
31
143
  ### Docker
32
144
 
@@ -37,15 +149,19 @@ docker run -i --rm \
37
149
  ghcr.io/transloadit/mcp-server:latest
38
150
  ```
39
151
 
40
- For HTTP mode via Docker, expose the port:
152
+ For HTTP mode via Docker, override the `stdio` entrypoint, expose the port, and set a transport
153
+ token, which binding to `0.0.0.0` requires:
41
154
 
42
155
  ```bash
156
+ export TRANSLOADIT_MCP_TOKEN="$(openssl rand -hex 32)"
43
157
  docker run --rm \
44
158
  -e TRANSLOADIT_KEY=MY_AUTH_KEY \
45
159
  -e TRANSLOADIT_SECRET=MY_SECRET_KEY \
160
+ -e TRANSLOADIT_MCP_TOKEN \
46
161
  -p 5723:5723 \
162
+ --entrypoint transloadit-mcp \
47
163
  ghcr.io/transloadit/mcp-server:latest \
48
- transloadit-mcp http --host 0.0.0.0 --port 5723
164
+ http --host 0.0.0.0 --port 5723
49
165
  ```
50
166
 
51
167
  ### `TRANSLOADIT_MCP_TOKEN` explained
@@ -65,36 +181,11 @@ export TRANSLOADIT_MCP_TOKEN="$(openssl rand -hex 32)"
65
181
  npx -y @transloadit/mcp-server http --host 0.0.0.0 --port 5723
66
182
  ```
67
183
 
68
- ## Hosted endpoint
184
+ ### Self-hosted client setup
69
185
 
70
- If you cannot run `npx` where the agent runs, use the hosted endpoint:
186
+ Most self-hosted users add the server to their MCP client and let the client start it via stdio.
71
187
 
72
- ```text
73
- https://api2.transloadit.com/mcp
74
- ```
75
-
76
- Use `Authorization: Bearer <token>`. Mint a token with:
77
-
78
- ```bash
79
- npx -y @transloadit/node auth token --aud mcp
80
- ```
81
-
82
- Generate this token in a trusted environment (backend, CI, or local shell), then hand it to the
83
- agent runtime. You can mint it via:
84
-
85
- - CLI: `npx -y @transloadit/node auth token --aud mcp`
86
- - API: `POST https://api2.transloadit.com/token` (HTTP Basic Auth with key/secret)
87
- - Node SDK: instantiate `Transloadit` with `authKey` + `authSecret`, then call
88
- `client.mintBearerToken({ aud: 'mcp' })`
89
-
90
- Bearer tokens satisfy signature auth on API2 requests; signature checks apply to key/secret
91
- requests.
92
-
93
- ## Agent client setup
94
-
95
- Most users add the server to their MCP client and let the client start it automatically via stdio.
96
-
97
- ### Claude Code
188
+ #### Claude Code
98
189
 
99
190
  ```bash
100
191
  claude mcp add --transport stdio transloadit \
@@ -103,15 +194,7 @@ claude mcp add --transport stdio transloadit \
103
194
  -- npx -y @transloadit/mcp-server stdio
104
195
  ```
105
196
 
106
- For non-interactive runs (for example `claude -p`), explicitly allow MCP tools:
107
-
108
- ```bash
109
- claude -p "List templates" \
110
- --allowedTools mcp__transloadit__* \
111
- --output-format json
112
- ```
113
-
114
- ### Codex CLI
197
+ #### Codex CLI
115
198
 
116
199
  ```bash
117
200
  codex mcp add transloadit \
@@ -129,7 +212,7 @@ args = ["-y", "@transloadit/mcp-server", "stdio"]
129
212
  enabled_tools = ["transloadit_list_templates"]
130
213
  ```
131
214
 
132
- ### Gemini CLI
215
+ #### Gemini CLI
133
216
 
134
217
  ```bash
135
218
  gemini mcp add --scope user transloadit npx -y @transloadit/mcp-server stdio \
@@ -155,7 +238,7 @@ Allowlist tools in `~/.gemini/settings.json`:
155
238
  }
156
239
  ```
157
240
 
158
- ### Cursor
241
+ #### Cursor
159
242
 
160
243
  `~/.cursor/mcp.json`:
161
244
 
@@ -174,7 +257,7 @@ Allowlist tools in `~/.gemini/settings.json`:
174
257
  }
175
258
  ```
176
259
 
177
- ### OpenCode
260
+ #### OpenCode
178
261
 
179
262
  `~/.config/opencode/opencode.json`:
180
263
 
@@ -193,27 +276,31 @@ Allowlist tools in `~/.gemini/settings.json`:
193
276
  }
194
277
  ```
195
278
 
196
- ## Run the server manually
197
-
198
- HTTP:
199
-
200
- ```bash
201
- npx -y @transloadit/mcp-server http --host 127.0.0.1 --port 5723
202
- ```
203
-
204
- Stdio:
205
-
206
- ```bash
207
- npx -y @transloadit/mcp-server stdio
208
- ```
209
-
210
279
  ## Auth model
211
280
 
212
281
  ### Hosted (`https://api2.transloadit.com/mcp`)
213
282
 
214
- - Mint token via `POST https://api2.transloadit.com/token`.
215
- - Send `Authorization: Bearer <access_token>`.
216
- - Bearer auth satisfies signature auth; signature checks apply to key/secret requests.
283
+ - Requests without a bearer token get `401` with
284
+ `WWW-Authenticate: Bearer resource_metadata="https://api2.transloadit.com/.well-known/oauth-protected-resource/mcp"`.
285
+ MCP clients follow that document to API2's authorization server (authorization code + PKCE,
286
+ Dynamic Client Registration or Client ID Metadata Documents).
287
+ - This includes a bare `GET /mcp`, because some clients (Codex) discover the authorization server
288
+ from that probe. Directory health checks therefore see `401` instead of `200`; the JSON body
289
+ still carries `name`, `status` and `docs`. Self-hosted and unauthenticated deployments keep
290
+ answering the bare `GET` with `200`.
291
+ - Bearer tokens (OAuth or minted with `--aud mcp`) are forwarded to API2, which verifies them on
292
+ every call. A rejected or expired token yields a tool result with `isError` and
293
+ `_meta["mcp/www_authenticate"]`, so ChatGPT and Claude prompt you to reconnect.
294
+ - Each tool declares `securitySchemes` (top level and in `_meta`). Because the hosted endpoint
295
+ challenges every unauthenticated request, all tools declare `oauth2` there; the Robot docs and
296
+ linting tools ask for no scopes.
297
+ - A rejected or expired key/secret on a self-hosted server is reported as
298
+ `mcp_credentials_rejected` without an OAuth challenge, since only an operator can fix it.
299
+ - Browser requests must come from ChatGPT, Claude, Transloadit or loopback origins; requests without
300
+ an `Origin` header (CLIs, servers) are not restricted. Set `allowedOrigins` to change the list.
301
+ - `TRANSLOADIT_MCP_UPSTREAM_SECRET` is set by Transloadit's own deployment so API2 can tell that a
302
+ relayed `aud=mcp` token arrives from the hosted service; it is not needed for self-hosting.
303
+ Hosted mode refuses to start without it, because every authenticated call would fail.
217
304
 
218
305
  ### Self-hosted
219
306
 
@@ -229,7 +316,20 @@ npx -y @transloadit/mcp-server stdio
229
316
 
230
317
  - `TRANSLOADIT_KEY`
231
318
  - `TRANSLOADIT_SECRET`
319
+ - `TRANSLOADIT_SIGNATURE_ALGORITHM` (optional, `sha1`, `sha256` or `sha384`, default `sha384`;
320
+ must match the Auth Key)
232
321
  - `TRANSLOADIT_MCP_TOKEN`
322
+ - `TRANSLOADIT_MCP_RESOURCE_METADATA_URL` (hosted mode: protected-resource metadata URL to
323
+ advertise in `401` challenges)
324
+ - `TRANSLOADIT_MCP_UPSTREAM_SECRET` (hosted mode only, set by Transloadit's deployment; sent to
325
+ API2 as `Transloadit-Mcp-Upstream` next to forwarded bearer tokens)
326
+ - `TRANSLOADIT_MCP_RESULT_DOMAINS` (optional, comma-separated origins the result widget may load
327
+ previews from and link to, either exact such as `https://tmp-us-east-1.transloadit.net` or with a
328
+ wildcard host; default `https://*.transloadit.com,https://*.transloadit.net,https://*.r2.dev`)
329
+ - `TRANSLOADIT_MCP_WIDGET_DOMAIN` (optional, default `https://transloadit.com`; the origin ChatGPT
330
+ serves the result widget from, sent as `_meta["openai/widgetDomain"]`)
331
+ - `TRANSLOADIT_MCP_CONSOLE_URL` (optional, default `https://transloadit.com`; Console origin for
332
+ widget deep links)
233
333
  - `TRANSLOADIT_ENDPOINT` (optional, default `https://api2.transloadit.com`)
234
334
  - `TRANSLOADIT_MCP_METRICS_PATH` (optional, default `/metrics`)
235
335
  - `TRANSLOADIT_MCP_METRICS_USER` (optional)
@@ -241,21 +341,57 @@ npx -y @transloadit/mcp-server stdio
241
341
  - `npx -y @transloadit/mcp-server http --endpoint https://api2.transloadit.com`
242
342
  - `npx -y @transloadit/mcp-server http --config path/to/config.json`
243
343
 
344
+ The JSON config accepts the same keys as `createTransloaditMcpHttpHandler()`, including
345
+ `allowedOrigins`, `resourceMetadataUrl`, `signatureAlgorithm`, `resultDomains`, `widgetDomain` and
346
+ `consoleUrl`.
347
+
244
348
  ## Tool surface
245
349
 
246
- - `transloadit_lint_assembly_instructions`
247
- - `transloadit_create_assembly`
248
- - `transloadit_get_assembly_status`
249
- - `transloadit_wait_for_assembly`
250
- - `transloadit_list_robots`
251
- - `transloadit_get_robot_help`
252
- - `transloadit_list_templates`
350
+ | Tool | Account | OAuth scopes | Notes |
351
+ | ---------------------------------------- | ------- | ------------------------------------ | ----------------------------------------------- |
352
+ | `transloadit_lint_assembly_instructions` | no | none | read-only |
353
+ | `transloadit_list_robots` | no | none | read-only |
354
+ | `transloadit_get_robot_help` | no | none | read-only |
355
+ | `transloadit_create_assembly` | yes | `assemblies:write`, `templates:read` | destructive, open-world (URL imports), widget |
356
+ | `transloadit_get_assembly_status` | yes | `assemblies:read` | read-only |
357
+ | `transloadit_wait_for_assembly` | yes | `assemblies:read` | read-only, result widget |
358
+ | `transloadit_list_templates` | yes | `templates:read` | read-only |
359
+ | `transloadit_get_profile` | yes | `assemblies:read`, `templates:read` | read-only, `_meta["openai/profile"]` |
360
+
361
+ Every tool carries `title`, `readOnlyHint`, `destructiveHint`, `idempotentHint` and
362
+ `openWorldHint` annotations. `transloadit_create_assembly` is the only destructive one: export
363
+ Robots such as `/s3/store` can overwrite files at their destination, so hosts should confirm it.
364
+
365
+ `securitySchemes` depend on how the server runs: hosted (`TRANSLOADIT_MCP_RESOURCE_METADATA_URL`)
366
+ declares `oauth2` with the scopes above for every tool; a server holding `TRANSLOADIT_KEY` and
367
+ `TRANSLOADIT_SECRET` declares `noauth` everywhere; otherwise the account tools declare `oauth2` and
368
+ the others `noauth`. `TRANSLOADIT_MCP_TOKEN` and `TRANSLOADIT_MCP_RESOURCE_METADATA_URL` cannot be
369
+ combined.
253
370
 
254
371
  `transloadit_list_templates` supports:
255
372
 
256
373
  - `include_builtin`: `all`, `latest`, `exclusively-all`, `exclusively-latest`
257
374
  - `include_content`: include parsed `steps` in each template item
258
375
 
376
+ `transloadit_get_profile` returns `{ id, name?, nickname? }` for the Workspace behind the current
377
+ credentials, derived from the Workspace's own Assemblies or Templates.
378
+
379
+ ### Result widget
380
+
381
+ `transloadit_create_assembly` and `transloadit_wait_for_assembly` link the MCP Apps resource
382
+ `ui://transloadit/assembly-result` (`_meta.ui.resourceUri`, also `_meta["openai/outputTemplate"]`).
383
+ Hosts that support MCP Apps render each Step's results with image, video and audio previews,
384
+ download links, an "Open in Console" link and a "Save as Template" shortcut. It speaks the MCP Apps
385
+ `2026-01-26` protocol (`ui/initialize` with `appInfo`) and also reads ChatGPT's `window.openai`.
386
+ Its CSP allows `https://*.transloadit.com`, `https://*.transloadit.net` and `https://*.r2.dev`
387
+ (result buckets); override the list with `TRANSLOADIT_MCP_RESULT_DOMAINS` or `resultDomains`.
388
+ ChatGPT asks for the exact hosts a widget uses, so a deployment that knows its result buckets
389
+ should list them as origins instead of wildcards. ChatGPT also needs `redirect_domains` to open
390
+ links from the widget: the server sends the result origins plus the Console origin there. ChatGPT
391
+ serves the widget from the origin in `_meta["openai/widgetDomain"]`
392
+ (`TRANSLOADIT_MCP_WIDGET_DOMAIN`). `ui.domain` stays unset, because Claude derives that value from
393
+ the server URL and rejects any other.
394
+
259
395
  ## Input files
260
396
 
261
397
  ```ts
@@ -276,14 +412,57 @@ export type InputFile =
276
412
  }
277
413
  ```
278
414
 
415
+ Hosts that attach chat files (ChatGPT) pass them under `attachments` instead, as declared by
416
+ `_meta["openai/fileParams"]`:
417
+
418
+ ```ts
419
+ type Attachment = {
420
+ download_url: string
421
+ file_id: string
422
+ mime_type?: string
423
+ file_name?: string
424
+ }
425
+ ```
426
+
427
+ Each attachment becomes a URL input (`attachment_1`, `attachment_2`, …) and follows the URL rules
428
+ below.
429
+
430
+ ### Files that exist only locally or in your sandbox
431
+
432
+ If the file exists only locally or in your sandbox, call `transloadit_create_assembly` with
433
+ `expected_uploads` and run the returned `upload_instructions`; this needs outbound HTTPS from the
434
+ sandbox to Transloadit (Claude.ai: Settings → code execution network access must allow it). Hosts
435
+ such as Claude.ai do not hand chat attachments to connector tools, and base64 in tool arguments is
436
+ impractical for anything but tiny files, so the agent uploads the file itself:
437
+
438
+ 1. Call `transloadit_create_assembly` with your instructions and `expected_uploads: 1` (one per
439
+ file, at most 100 per call). The call returns right away, even with `wait_for_completion: true`,
440
+ because the Assembly now waits for those uploads.
441
+ 2. Each `upload_instructions` entry has the tus endpoint, the tus metadata (`assembly_url`,
442
+ `fieldname`) and a ready-to-run `curl` command. Set `FILE` to the file's path and run it in a
443
+ bash shell; it prints `201` once the file is uploaded (tus creation-with-upload, one request).
444
+ 3. Call `transloadit_wait_for_assembly` with the Assembly URL.
445
+
446
+ The commands contain no credentials: the Assembly URL is the only capability, and it lets the holder
447
+ add files to that one Assembly while it waits for uploads.
448
+
279
449
  ## Limits
280
450
 
281
451
  These limits apply to inline JSON/base64 payloads. For larger files, use a public URL or upload from
282
452
  your own machine with `npx -y @transloadit/node upload`.
283
453
 
284
- - Hosted default request body limit: **1 MB**
454
+ - Hosted default request body limit: **1 MiB**
285
455
  - Hosted `maxBase64Bytes`: **512,000** decoded bytes
286
- - Self-hosted default request body limit: **10 MB** (configurable)
456
+ - Self-hosted default request body limit: **10 MiB**
457
+
458
+ Set `maxRequestBodyBytes` (handler option or JSON config key) to change the body limit; larger
459
+ requests get HTTP 413 and are not buffered. Express apps that install their own body parser set
460
+ its limit there.
461
+
462
+ URL inputs that the server downloads (for templates that expect uploads) are capped at 1 GiB in
463
+ total per call and 10 minutes per download, redirects included; set `maxUrlDownloadBytes` and
464
+ `urlDownloadTimeoutMs` to change that. On the hosted
465
+ endpoint the caller's token is checked with API2 before anything is downloaded.
287
466
 
288
467
  ## URL inputs and template behavior
289
468
 
@@ -329,7 +508,8 @@ but this does not enable private-network URL file downloads.
329
508
  - Disable via `metricsPath: false`.
330
509
  - Optional metrics basic auth via `TRANSLOADIT_MCP_METRICS_USER` +
331
510
  `TRANSLOADIT_MCP_METRICS_PASSWORD` or `metricsAuth`.
332
- - Public discovery endpoint at `/.well-known/mcp/server-card.json`.
511
+ - Public discovery endpoint at `/.well-known/mcp/server-card.json`, listing every tool with its
512
+ annotations and security schemes and, in hosted mode, the OAuth resource metadata URL.
333
513
 
334
514
  ## MCP vs skills/CLI
335
515
 
@@ -388,7 +568,3 @@ corepack yarn --cwd packages/mcp-server test:e2e
388
568
  - Add or update tests with behavior changes.
389
569
  - Keep README and website docs aligned for user-facing behavior.
390
570
  - Open a PR in `transloadit/node-sdk`.
391
-
392
- ### Roadmap
393
-
394
- - Next.js Claude Web flow to mint and hand off bearer tokens for MCP.
package/dist/cli.js CHANGED
@@ -4,6 +4,7 @@ import { createServer } from 'node:http';
4
4
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
5
5
  import { createTransloaditMcpHttpHandler, createTransloaditMcpServer } from "./index.js";
6
6
  import { buildRedactor, getLogger } from "./logger.js";
7
+ import { signatureAlgorithmSchema } from "./server.js";
7
8
  const printHelp = () => {
8
9
  process.stdout.write(`transloadit-mcp
9
10
 
@@ -14,7 +15,13 @@ Usage:
14
15
  Environment:
15
16
  TRANSLOADIT_KEY
16
17
  TRANSLOADIT_SECRET
18
+ TRANSLOADIT_SIGNATURE_ALGORITHM (sha1, sha256 or sha384; must match the Auth Key)
17
19
  TRANSLOADIT_MCP_TOKEN
20
+ TRANSLOADIT_MCP_RESOURCE_METADATA_URL
21
+ TRANSLOADIT_MCP_UPSTREAM_SECRET
22
+ TRANSLOADIT_MCP_RESULT_DOMAINS (comma-separated origins for result previews)
23
+ TRANSLOADIT_MCP_WIDGET_DOMAIN (origin ChatGPT serves the result widget from)
24
+ TRANSLOADIT_MCP_CONSOLE_URL
18
25
  TRANSLOADIT_ENDPOINT
19
26
  TRANSLOADIT_MCP_METRICS_PATH
20
27
  TRANSLOADIT_MCP_METRICS_USER
@@ -66,6 +73,25 @@ const parseArgs = (args) => {
66
73
  }
67
74
  return { command, config };
68
75
  };
76
+ /** Reads the key/secret signature algorithm; an unknown value would only fail later per call. */
77
+ const parseSignatureAlgorithm = (value) => {
78
+ if (value === undefined || value === '')
79
+ return undefined;
80
+ const parsed = signatureAlgorithmSchema.safeParse(value);
81
+ if (!parsed.success) {
82
+ throw new Error('TRANSLOADIT_SIGNATURE_ALGORITHM must be one of sha1, sha256 or sha384.');
83
+ }
84
+ return parsed.data;
85
+ };
86
+ /** Accepts a JSON array (config file) or a comma-separated string (environment). */
87
+ const parseResultDomains = (value) => {
88
+ const entries = Array.isArray(value) ? value : typeof value === 'string' ? value.split(',') : [];
89
+ const domains = entries
90
+ .filter((entry) => typeof entry === 'string')
91
+ .map((entry) => entry.trim())
92
+ .filter(Boolean);
93
+ return domains.length > 0 ? domains : undefined;
94
+ };
69
95
  const isLocalHost = (host) => host === '127.0.0.1' || host === 'localhost' || host === '::1';
70
96
  const loadConfig = async (configPath) => {
71
97
  if (!configPath) {
@@ -100,9 +126,18 @@ const main = async () => {
100
126
  process.env.TRANSLOADIT_MCP_METRICS_PASSWORD);
101
127
  const endpoint = (config.endpoint ?? fileConfig.endpoint ?? process.env.TRANSLOADIT_ENDPOINT);
102
128
  const mcpToken = (fileConfig.mcpToken ?? process.env.TRANSLOADIT_MCP_TOKEN);
129
+ const resourceMetadataUrl = (fileConfig.resourceMetadataUrl ??
130
+ process.env.TRANSLOADIT_MCP_RESOURCE_METADATA_URL);
131
+ const upstreamSecret = (fileConfig.upstreamSecret ??
132
+ process.env.TRANSLOADIT_MCP_UPSTREAM_SECRET);
133
+ const consoleUrl = (fileConfig.consoleUrl ?? process.env.TRANSLOADIT_MCP_CONSOLE_URL);
134
+ const signatureAlgorithm = parseSignatureAlgorithm(fileConfig.signatureAlgorithm ?? process.env.TRANSLOADIT_SIGNATURE_ALGORITHM);
135
+ const resultDomains = parseResultDomains(fileConfig.resultDomains ?? process.env.TRANSLOADIT_MCP_RESULT_DOMAINS);
136
+ const widgetDomain = (fileConfig.widgetDomain ?? process.env.TRANSLOADIT_MCP_WIDGET_DOMAIN);
103
137
  const clientSuffix = process.env.TRANSLOADIT_CLIENT_SUFFIX;
104
- if (!isLocalHost(host) && !mcpToken) {
105
- throw new Error('TRANSLOADIT_MCP_TOKEN is required when binding to non-localhost host.');
138
+ // Hosted mode delegates token checks to API2, so it may bind publicly without a static token.
139
+ if (!isLocalHost(host) && !mcpToken && !resourceMetadataUrl) {
140
+ throw new Error('TRANSLOADIT_MCP_TOKEN or TRANSLOADIT_MCP_RESOURCE_METADATA_URL is required when binding to a non-localhost host.');
106
141
  }
107
142
  const handler = await createTransloaditMcpHttpHandler({
108
143
  authKey: (fileConfig.authKey ?? process.env.TRANSLOADIT_KEY),
@@ -110,6 +145,16 @@ const main = async () => {
110
145
  endpoint,
111
146
  clientSuffix,
112
147
  mcpToken,
148
+ resourceMetadataUrl,
149
+ upstreamSecret,
150
+ // Validated by the handler, which refuses anything but positive integers.
151
+ maxRequestBodyBytes: fileConfig.maxRequestBodyBytes,
152
+ maxUrlDownloadBytes: fileConfig.maxUrlDownloadBytes,
153
+ urlDownloadTimeoutMs: fileConfig.urlDownloadTimeoutMs,
154
+ signatureAlgorithm,
155
+ resultDomains,
156
+ widgetDomain,
157
+ consoleUrl,
113
158
  allowedOrigins: fileConfig.allowedOrigins,
114
159
  allowedHosts: fileConfig.allowedHosts,
115
160
  enableDnsRebindingProtection: fileConfig.enableDnsRebindingProtection,
@@ -136,7 +181,11 @@ const main = async () => {
136
181
  const server = createTransloaditMcpServer({
137
182
  authKey: process.env.TRANSLOADIT_KEY,
138
183
  authSecret: process.env.TRANSLOADIT_SECRET,
184
+ signatureAlgorithm: parseSignatureAlgorithm(process.env.TRANSLOADIT_SIGNATURE_ALGORITHM),
185
+ resultDomains: parseResultDomains(process.env.TRANSLOADIT_MCP_RESULT_DOMAINS),
186
+ widgetDomain: process.env.TRANSLOADIT_MCP_WIDGET_DOMAIN,
139
187
  endpoint: process.env.TRANSLOADIT_ENDPOINT,
188
+ consoleUrl: process.env.TRANSLOADIT_MCP_CONSOLE_URL,
140
189
  clientSuffix: process.env.TRANSLOADIT_CLIENT_SUFFIX,
141
190
  });
142
191
  const transport = new StdioServerTransport();
@@ -148,6 +197,7 @@ main().catch((err) => {
148
197
  process.env.TRANSLOADIT_KEY,
149
198
  process.env.TRANSLOADIT_SECRET,
150
199
  process.env.TRANSLOADIT_MCP_TOKEN,
200
+ process.env.TRANSLOADIT_MCP_UPSTREAM_SECRET,
151
201
  ]);
152
202
  logger.err('MCP server failed: %s', redact(err));
153
203
  process.exit(1);
package/dist/cli.js.map CHANGED
@@ -1 +1 @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BAAoB,EAAE,CAAA;IAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AACjC,CAAC,CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,aAAa,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,eAAe;QAC3B,OAAO,CAAC,GAAG,CAAC,kBAAkB;QAC9B,OAAO,CAAC,GAAG,CAAC,qBAAqB;QACjC,OAAO,CAAC,GAAG,CAAC,+BAA+B;KAC5C,CAAC,CAAA;IACF,MAAM,CAAC,GAAG,CAAC,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../src/express.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AAU1D,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,GAAG;IACrE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,iCAAiC,CAAC,OAAO,GAAE,4BAAiC,8CA4F3F"}
1
+ {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../src/express.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AAiB1D,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,GAAG;IACrE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,iCAAiC,CAAC,OAAO,GAAE,4BAAiC,8CAmG3F"}