@cutpro/mcp 1.0.1 → 1.0.2

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 (3) hide show
  1. package/README.md +172 -76
  2. package/dist/index.js +111 -111
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,121 +1,217 @@
1
- # @cutpro/mcp
1
+ ## CutPro MCP
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@cutpro/mcp?style=flat-square&color=7C3AED)](https://www.npmjs.com/package/@cutpro/mcp)
4
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.getcutpro%2Fcutpro-7C3AED?style=flat-square)](https://registry.modelcontextprotocol.io)
3
5
  [![smithery badge](https://smithery.ai/badge/contact-8lma/cutpro)](https://smithery.ai/servers/contact-8lma/cutpro)
4
6
 
5
- MCP server that exposes the public CutPro v1 API as tools, so AI clients can drive
6
- the full clipping flow: **analyze → submit → poll → list clips → render → download**,
7
- plus balance and templates.
7
+ A Model Context Protocol (MCP) server that turns long videos into viral clips with AI. It exposes the full [CutPro API](https://cut.pro/docs/api-reference) as tools, so an LLM can run the whole flow: analyze a video, clip the best moments, render the final MP4, and publish to TikTok, Instagram and YouTube.
8
8
 
9
- Built to work **everywhere** and to be **token-efficient**.
9
+ ### Key features
10
10
 
11
- ## Tools
12
-
13
- All 34 v1 endpoints are exposed, grouped by resource:
11
+ - **End to end**. All 34 v1 endpoints as tools: workspace, balance, videos, clipping, clips, templates, renders, posts and connections.
12
+ - **Token efficient**. Results are compact and projected to the fields that matter; `list_clips` is rating sorted, capped, and omits long signed URLs unless asked.
13
+ - **Runs everywhere**. stdio for local clients (Claude Code, Cursor, Claude Desktop, Windsurf, VS Code, Cline, Zed) and a hosted Streamable HTTP endpoint with OAuth for ChatGPT and Claude.ai.
14
14
 
15
- - **Workspace & balance**: `get_workspace`, `get_balance`, `get_balance_history`
16
- - **Videos & uploads**: `list_videos`, `delete_video`, `start_upload`, `complete_upload`
17
- - **Clipping**: `analyze_video`, `submit_clipping`, `list_submissions`, `get_submission`, `delete_submission`
18
- - **Clips**: `list_clips`, `apply_template`, `delete_clip`
19
- - **Templates**: `list_templates`
20
- - **Renders**: `render_clip`, `list_renders`, `get_render`, `get_render_download`, `cancel_render`, `get_render_limits`, `start_bulk_download`, `get_bulk_download`
21
- - **Posts (publishing)**: `create_post`, `list_posts`, `get_post`, `update_post`, `publish_post`, `retry_post_item`, `delete_post_item`, `delete_post`
22
- - **Connections**: `list_connections`, `get_connection`
15
+ ## Getting started
23
16
 
24
- Each tool carries read-only / write / destructive annotations so clients can plan calls.
17
+ ### Requirements
25
18
 
26
- ## Token efficiency
19
+ - Node.js 18 or newer.
20
+ - A CutPro account on the **Pro** plan and an API key. Generate one at [cut.pro/studio/me/api-keys](https://cut.pro/studio/me/api-keys).
21
+ - An MCP-compatible client.
27
22
 
28
- - Results are **compact JSON** (no pretty-print) and **projected** to the fields
29
- that matter, dropping null/empty values.
30
- - `list_clips` is **rating-sorted**, capped (`limit`, default 10), and **omits the
31
- long signed URLs** unless `include_urls: true`.
32
- - Tools carry read-only / open-world **annotations** so clients can plan calls.
23
+ ### Standard config
33
24
 
34
- ## Setup
25
+ Most clients use the same JSON. Add your API key under `env`:
35
26
 
36
- ```bash
37
- bun install
38
- cp .env.example .env # set CUTPRO_API_KEY
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "cutpro": {
31
+ "command": "npx",
32
+ "args": ["-y", "@cutpro/mcp"],
33
+ "env": { "CUTPRO_API_KEY": "<your-api-key>" }
34
+ }
35
+ }
36
+ }
39
37
  ```
40
38
 
41
- API access requires the **Pro** plan. Generate a key at
42
- [cut.pro/studio/me/api-keys](https://cut.pro/studio/me/api-keys).
39
+ ### Install
43
40
 
44
- ## Transports
41
+ [<img src="https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522cutpro%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540cutpro%252Fmcp%2522%255D%257D)
42
+ [<img src="https://img.shields.io/badge/Cursor-Install_Server-000000?style=flat-square&logo=cursor&logoColor=white" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=cutpro&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjdXRwcm8vbWNwIl19)
43
+ [<img src="https://img.shields.io/badge/LM_Studio-Install_Server-4A26C9?style=flat-square" alt="Install in LM Studio">](https://lmstudio.ai/install-mcp?name=cutpro&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjdXRwcm8vbWNwIl19)
44
+ [<img src="https://img.shields.io/badge/Goose-Install_Server-1A1A1A?style=flat-square" alt="Install in Goose">](goose://extension?cmd=npx&arg=-y&arg=%40cutpro%2Fmcp&id=cutpro&name=CutPro&description=AI%20video%20clipping%20via%20the%20CutPro%20API)
45
45
 
46
- ### stdio (default all local clients)
46
+ After installing via a button, add your `CUTPRO_API_KEY` to the server's `env`.
47
47
 
48
- Works with Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Cline, Zed, and
49
- any other local MCP client. The client launches the process; it speaks MCP over
50
- stdio. Set `CUTPRO_API_KEY` in the client's `env`.
51
-
52
- **Claude Code**
48
+ <details>
49
+ <summary>Claude Code</summary>
53
50
 
54
51
  ```bash
55
- claude mcp add cutpro --env CUTPRO_API_KEY=SUA_CHAVE -- npx -y @cutpro/mcp
52
+ claude mcp add cutpro --env CUTPRO_API_KEY=<your-api-key> -- npx -y @cutpro/mcp
56
53
  ```
54
+ </details>
55
+
56
+ <details>
57
+ <summary>Claude Desktop</summary>
57
58
 
58
- **Claude Desktop / Cursor / Windsurf / VS Code** (`mcpServers` config):
59
+ Add to `claude_desktop_config.json` (Settings, Developer, Edit Config):
59
60
 
60
61
  ```json
61
62
  {
62
- "mcpServers": {
63
- "cutpro": {
64
- "command": "npx",
65
- "args": ["-y", "@cutpro/mcp"],
66
- "env": { "CUTPRO_API_KEY": "SUA_CHAVE" }
67
- }
68
- }
63
+ "mcpServers": {
64
+ "cutpro": {
65
+ "command": "npx",
66
+ "args": ["-y", "@cutpro/mcp"],
67
+ "env": { "CUTPRO_API_KEY": "<your-api-key>" }
68
+ }
69
+ }
69
70
  }
70
71
  ```
72
+ </details>
71
73
 
72
- For local development against unpublished changes, replace `npx -y @cutpro/mcp`
73
- with `bun run /path/to/mcp/src/index.ts`.
74
+ <details>
75
+ <summary>Cursor / Windsurf / VS Code (manual)</summary>
74
76
 
75
- ### Streamable HTTP (remote / self-host)
77
+ Add the standard config above to the client's MCP settings (`mcp.json` / `mcpServers`).
78
+ </details>
76
79
 
77
- ```bash
78
- MCP_TRANSPORT=http PORT=8787 bun run src/index.ts # serves /mcp
79
- ```
80
+ <details>
81
+ <summary>Cline</summary>
80
82
 
81
- The endpoint is stateless. The key is read **per request** from
82
- `Authorization: Bearer <key>` or `X-Api-Key` (env key is the fallback), and
83
- `X-Workspace-Id` is honored, so one deployment can serve many users.
83
+ Open the MCP Servers panel, choose Configure, and add the standard config above.
84
+ </details>
84
85
 
85
- ### OAuth 2.1 (browser clients: ChatGPT, Claude.ai)
86
+ <details>
87
+ <summary>Gemini CLI</summary>
86
88
 
87
89
  ```bash
88
- MCP_TRANSPORT=http PORT=8787 MCP_OAUTH=1 MCP_PUBLIC_URL=https://mcp.cut.pro bun run src/index.ts
90
+ gemini mcp add cutpro npx -y @cutpro/mcp -e CUTPRO_API_KEY=<your-api-key>
89
91
  ```
92
+ </details>
90
93
 
91
- With `MCP_OAUTH=1` the server becomes a full OAuth 2.1 authorization server
92
- (metadata discovery, Dynamic Client Registration, PKCE, token + refresh,
93
- revocation) using the MCP SDK helpers. The flow:
94
+ <details>
95
+ <summary>Codex</summary>
94
96
 
95
- 1. The client (ChatGPT/Claude.ai) discovers the server via the `WWW-Authenticate`
96
- header on the `401` from `/mcp` and registers itself.
97
- 2. The user is sent to a **consent page** where they paste their CutPro API key.
98
- 3. The key is validated against the API; on success a code → access token is
99
- issued. The token maps server-side to that key.
100
- 4. `/mcp` is protected by bearer auth; each call uses the token's key.
97
+ Add to `~/.codex/config.toml`:
101
98
 
102
- `MCP_PUBLIC_URL` is the public endpoint (e.g. `https://mcp.cut.pro`); its origin
103
- becomes the OAuth issuer. Set `MCP_REDIS_URL` (e.g. `redis://127.0.0.1:6379`) to
104
- back the OAuth state (clients, codes, tokens) with **Redis** so it survives
105
- restarts and works across multiple instances. Without it, an in-memory store is
106
- used (single instance, state lost on restart).
99
+ ```toml
100
+ [mcp_servers.cutpro]
101
+ command = "npx"
102
+ args = ["-y", "@cutpro/mcp"]
103
+ env = { "CUTPRO_API_KEY" = "<your-api-key>" }
104
+ ```
105
+ </details>
106
+
107
+ <details>
108
+ <summary>ChatGPT and Claude.ai (hosted, no install)</summary>
107
109
 
108
- **Hosting**: run it on a dedicated host at the root and point a reverse proxy at it:
110
+ Use the hosted server. Add a custom connector pointing to:
109
111
 
110
112
  ```
111
- your-mcp-host { reverse_proxy localhost:8787 }
113
+ https://mcp.cut.pro
112
114
  ```
113
115
 
114
- To connect to the hosted instance: add `https://mcp.cut.pro` as a custom connector
115
- in ChatGPT or Claude.ai and complete the consent step.
116
+ You authorize with your CutPro API key on a consent page (OAuth), so no local setup is needed.
117
+ </details>
118
+
119
+ ## Configuration
116
120
 
117
- ## Build
121
+ The server is configured with environment variables.
122
+
123
+ | Variable | Description | Required |
124
+ | --- | --- | --- |
125
+ | `CUTPRO_API_KEY` | Your CutPro API key (Pro plan). | Yes (stdio) |
126
+ | `CUTPRO_WORKSPACE_ID` | Selects the workspace for multi-workspace keys. | No |
127
+ | `CUTPRO_API_URL` | Override the API base URL. Defaults to `https://api.cut.pro/api/v1`. | No |
128
+
129
+ <details>
130
+ <summary>Self-hosting the remote (Streamable HTTP + OAuth)</summary>
131
+
132
+ | Variable | Description |
133
+ | --- | --- |
134
+ | `MCP_TRANSPORT=http` / `PORT` | Serve Streamable HTTP at the root instead of stdio. |
135
+ | `MCP_OAUTH=1` | Enable the full OAuth 2.1 layer (discovery, DCR, PKCE) for browser clients. |
136
+ | `MCP_PUBLIC_URL` | Public endpoint, e.g. `https://mcp.cut.pro`. Its origin becomes the OAuth issuer. |
137
+ | `MCP_REDIS_URL` | Back OAuth state with Redis so it survives restarts and scales across instances. |
118
138
 
119
139
  ```bash
120
- bun run build # outputs dist/index.js
140
+ MCP_TRANSPORT=http PORT=8787 MCP_OAUTH=1 \
141
+ MCP_PUBLIC_URL=https://mcp.cut.pro MCP_REDIS_URL=redis://127.0.0.1:6379 \
142
+ npx -y @cutpro/mcp
121
143
  ```
144
+
145
+ In OAuth mode the user authorizes with their own API key on a consent page; the access token maps server side to that key. Without `MCP_REDIS_URL`, an in-memory store is used (single instance, state lost on restart).
146
+ </details>
147
+
148
+ ## Tools
149
+
150
+ <details>
151
+ <summary>Workspace and balance</summary>
152
+
153
+ - **get_workspace**: the workspace this key resolved to, with plan and role.
154
+ - **get_balance**: current credit balance.
155
+ - **get_balance_history**: ledger of credits added and consumed.
156
+ </details>
157
+
158
+ <details>
159
+ <summary>Videos and uploads</summary>
160
+
161
+ - **list_videos**: your source video library.
162
+ - **start_upload**: get a presigned URL to upload your own file (max 2 GB; .mp4/.mov/.webm/.mkv).
163
+ - **complete_upload**: register a finished upload and get its credit cost.
164
+ - **delete_video**: delete a source video and its submissions.
165
+ </details>
166
+
167
+ <details>
168
+ <summary>Clipping</summary>
169
+
170
+ - **analyze_video**: preview metadata and credit cost of a public URL (free).
171
+ - **submit_clipping**: start AI clipping (charges credits).
172
+ - **list_submissions**: clipping jobs for a video.
173
+ - **get_submission**: poll a submission until completed or failed.
174
+ - **delete_submission**: delete a submission and its clips.
175
+ </details>
176
+
177
+ <details>
178
+ <summary>Clips and templates</summary>
179
+
180
+ - **list_clips**: clips of a completed submission, rating sorted (URLs opt-in).
181
+ - **apply_template**: apply an editing template to clips in bulk.
182
+ - **delete_clip**: delete a single clip.
183
+ - **list_templates**: editing templates to apply to clips.
184
+ </details>
185
+
186
+ <details>
187
+ <summary>Renders</summary>
188
+
189
+ - **render_clip**: render a clip to a final MP4.
190
+ - **get_render**: poll a render until completed.
191
+ - **get_render_download**: signed download URL of a completed render.
192
+ - **cancel_render**: cancel or delete a render.
193
+ - **get_render_limits**: render quota for the workspace.
194
+ - **start_bulk_download** / **get_bulk_download**: bundle several renders into one download.
195
+ </details>
196
+
197
+ <details>
198
+ <summary>Posts and connections</summary>
199
+
200
+ - **create_post**: publish rendered clips to connected accounts (immediate or scheduled).
201
+ - **list_posts** / **get_post** / **update_post** / **delete_post**: manage posts.
202
+ - **publish_post**: trigger publishing now.
203
+ - **retry_post_item** / **delete_post_item**: handle individual targets.
204
+ - **list_connections** / **get_connection**: connected social accounts.
205
+ </details>
206
+
207
+ Each tool carries read-only / write / destructive annotations so clients can plan calls.
208
+
209
+ ## Links
210
+
211
+ - Docs: [cut.pro/docs/api-reference/mcp](https://cut.pro/docs/api-reference/mcp)
212
+ - npm: [@cutpro/mcp](https://www.npmjs.com/package/@cutpro/mcp)
213
+ - MCP Registry: `io.github.getcutpro/cutpro`
214
+
215
+ ## License
216
+
217
+ MIT