Skip to content

Commit 51661f7

Browse files
committed
docs(mcp): fold spec into README and add endpoint env
1 parent 33b4a08 commit 51661f7

9 files changed

Lines changed: 140 additions & 634 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@transloadit/mcp-server": patch
3+
---
4+
5+
Add TRANSLOADIT_ENDPOINT support and align MCP auth docs with bearer-token signature bypass.
6+

README.md

Lines changed: 99 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
Monorepo for Transloadit SDKs, shared packages, and the MCP server.
1515

16-
For full SDK usage docs, see `packages/node/README.md`.
17-
1816
## Packages
1917

2018
- `@transloadit/node` — Node.js SDK + CLI. See `packages/node/README.md`.
@@ -50,21 +48,114 @@ const result = await client.createAssembly({
5048
### MCP server (local)
5149

5250
```bash
53-
corepack yarn workspace @transloadit/mcp-server build
54-
node packages/mcp-server/dist/cli.js http --host 127.0.0.1 --port 5723
51+
npx @transloadit/mcp-server stdio
52+
```
53+
54+
```bash
55+
npx @transloadit/mcp-server http --host 127.0.0.1 --port 5723
56+
```
57+
58+
## MCP server design
59+
60+
The MCP server is thin glue over `@transloadit/node` and shared libraries. It exposes a small,
61+
agent-friendly tool surface while delegating all heavy lifting (uploads, polling, linting, resumes)
62+
to the SDK.
63+
64+
### Transports
65+
66+
- Streamable HTTP at `/mcp`.
67+
- stdio transport for local execution.
68+
- No legacy SSE.
69+
70+
### Auth model
71+
72+
**Hosted (api2.transloadit.com/mcp)**
73+
74+
- Call `POST https://api2.transloadit.com/token` with Auth Key/Secret (HTTP Basic Auth).
75+
- Use `Authorization: Bearer <access_token>` on API2 requests.
76+
- Bearer tokens **satisfy signature auth**; signature checks are enforced only for key/secret
77+
requests.
78+
79+
**Self-hosted**
80+
81+
- stdio and localhost HTTP require no MCP auth by default.
82+
- Non-localhost HTTP requires `TRANSLOADIT_MCP_TOKEN`.
83+
- API calls use `TRANSLOADIT_KEY` + `TRANSLOADIT_SECRET`, or bearer tokens if provided.
84+
85+
### Configuration
86+
87+
Environment:
88+
89+
- `TRANSLOADIT_KEY`
90+
- `TRANSLOADIT_SECRET`
91+
- `TRANSLOADIT_MCP_TOKEN`
92+
- `TRANSLOADIT_ENDPOINT` (optional, default `https://api2.transloadit.com`)
93+
94+
CLI:
95+
96+
- `transloadit-mcp http --host 127.0.0.1 --port 5723 --endpoint https://api2.transloadit.com`
97+
- `transloadit-mcp http --config path/to/config.json`
98+
99+
### Input files
100+
101+
```ts
102+
export type InputFile =
103+
| { kind: 'path'; field: string; path: string }
104+
| {
105+
kind: 'base64'
106+
field: string
107+
base64: string
108+
filename: string
109+
contentType?: string
110+
}
111+
| {
112+
kind: 'url'
113+
field: string
114+
url: string
115+
filename?: string
116+
contentType?: string
117+
}
55118
```
56119
57-
See `docs/mcp-spec.md` for the MCP design and `docs/mcp-todo.md` for the remaining work.
120+
### Limits
121+
122+
- Hosted default request body limit: **1 MB** (JSON).
123+
- Hosted default `maxBase64Bytes`: **512_000** (decoded bytes).
124+
- Self-hosted default request body limit: **10 MB** (configurable).
125+
126+
### URL inputs
127+
128+
- By default URL files are **downloaded and uploaded via tus** (no instruction mutation).
129+
- If instructions already contain an `/http/import` step, the MCP server sets/overrides its `url`.
130+
- If multiple URLs and a single `/http/import` step exists, it supplies a `url` array.
131+
132+
### Resume behavior
133+
134+
If `assembly_url` is provided, the MCP server resumes uploads using Assembly status
135+
(`tus_uploads` + `uploads`). This requires stable, unique `field` names and file metadata
136+
(`filename` + `size`). Only **path-based** inputs resume; non-file inputs start fresh uploads.
137+
138+
### Tool surface
139+
140+
- `transloadit_create_assembly`
141+
- `transloadit_get_assembly_status`
142+
- `transloadit_wait_for_assembly`
143+
- `transloadit_validate_assembly`
144+
- `transloadit_list_robots`
145+
- `transloadit_get_robot_help`
146+
- `transloadit_list_golden_templates`
147+
148+
### Roadmap
149+
150+
- Next.js Claude Web flow to mint and hand off bearer tokens for MCP.
58151
59152
## Development
60153
61154
- Install: `corepack yarn`
62155
- Checks + unit tests: `corepack yarn check`
63156
- Node SDK unit tests: `corepack yarn workspace @transloadit/node test:unit`
64157
65-
See `CONTRIBUTING.md` for full guidelines.
66-
67158
## Repo notes
68159
69-
- Docs live under `docs/`.
160+
- Docs live under `docs/` (non-MCP).
70161
- The `transloadit` package is prepared via `scripts/prepare-transloadit.ts`.

0 commit comments

Comments
 (0)