@avclabs.ai/media-mcp 0.2.0 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"video-enhancement.js","sourceRoot":"","sources":["../src/video-enhancement.ts"],"names":[],"mappings":"AACA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,UAAU;AACV,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC7E,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAClF,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;CACrG,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;CACrC,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC7E,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CA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M,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC;IACpC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAChE,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;QAChD,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;YACvB,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,YAAY;gBACpB,OAAO,EAAE,MAAM;gBACf,OAAO,EAAE,oCAAoC,OAAO,4DAA4D;gBAChH,IAAI,EAAE,wGAAwG;aAC/G,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@avclabs.ai/media-mcp",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "description": "MCP Server for video enhancement and image segmentation (SAM3)",
6
6
  "mcpName": "io.github.avclabs/media-mcp",
7
7
  "main": "dist/server.js",
@@ -14,7 +14,7 @@
14
14
  "config.json",
15
15
  "LICENSE",
16
16
  "README.md",
17
- "README_EN.md"
17
+ "README_CN.md"
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "tsc",
package/README_EN.md DELETED
@@ -1,419 +0,0 @@
1
- # media-mcp (Node.js)
2
-
3
- [中文](https://github.com/avclabs/media-mcp/blob/main/README.md) | English
4
-
5
- [![npm version](https://img.shields.io/npm/v/@avclabs.ai/media-mcp)](https://www.npmjs.com/package/@avclabs.ai/media-mcp)
6
- [![Node.js >=18](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org/)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
-
9
- A video enhancement and image segmentation service based on the MCP protocol, acting as an MCP Client-Server to interact with backend HTTP Servers.
10
-
11
- ## Features
12
-
13
- Provides the following MCP Tools:
14
-
15
- **Video Enhancement**
16
- - `create_task` - Create a video enhancement task (supports URL or local file upload)
17
- - `get_task_status` - Query task status
18
- - `enhance_video_sync` - Synchronously enhance video (blocking wait, truncated at ~50s by default)
19
-
20
- **Image Segmentation (SAM3)**
21
- - `sam3_predict` - SAM3 image segmentation (supports local path, URL, or Base64 image)
22
-
23
- ## Prerequisites
24
-
25
- - **Node.js >= 18** (check: `node --version`)
26
- - **API Key** (required for authentication)
27
-
28
- ## Lazy Install (Recommended)
29
-
30
- If your AI Agent has a known MCP config path, just copy the line below and send it to your AI:
31
-
32
- ```
33
- Install the npm package @avclabs.ai/media-mcp as an MCP server. My API Key is: sk-xxxxxxxx.
34
- ```
35
-
36
- The AI will automatically:
37
- 1. Detect your MCP client
38
- 2. Find the config file path
39
- 3. Write the correct configuration
40
- 4. Prompt you to restart the client
41
-
42
- ## Manual Install
43
-
44
- No installation needed. Use `npx` directly in your MCP client config.
45
-
46
- ### 1. Claude Code (CLI)
47
-
48
- Run in Claude Code:
49
-
50
- ```
51
- /mcp
52
- ```
53
-
54
- Check the output for the **"User MCPs"** section to find the config file path, then edit that file.
55
-
56
- Common paths (if `/mcp` is unavailable):
57
- - **Windows**: `%USERPROFILE%\.claude.json`
58
- - **macOS**: `~/.claude.json`
59
- - **Linux**: `~/.claude.json`
60
- - **Legacy/Alternative**: `~/.claude/mcp.json`
61
-
62
- Paste this (replace `your-api-key`):
63
-
64
- ```json
65
- {
66
- "mcpServers": {
67
- "video-enhancement": {
68
- "command": "npx",
69
- "args": ["-y", "@avclabs.ai/media-mcp@latest"],
70
- "env": {
71
- "API_KEY": "your-api-key"
72
- }
73
- }
74
- }
75
- }
76
- ```
77
-
78
- Save and run `/mcp` to verify it's loaded.
79
-
80
- ### 2. Cursor
81
-
82
- Go to **Settings > Tools & MCPs > Add New MCP Server**:
83
-
84
- - **Name**: `video-enhancement`
85
- - **Type**: `command`
86
- - **Command**:
87
- ```bash
88
- env API_KEY=your-api-key npx -y @avclabs.ai/media-mcp@latest
89
- ```
90
-
91
- Or edit `~/.cursor/mcp.json`:
92
-
93
- ```json
94
- {
95
- "mcpServers": {
96
- "video-enhancement": {
97
- "command": "npx",
98
- "args": ["-y", "@avclabs.ai/media-mcp@latest"],
99
- "env": {
100
- "API_KEY": "your-api-key"
101
- }
102
- }
103
- }
104
- }
105
- ```
106
-
107
- ## Verify Installation
108
-
109
- After restarting your client, check if the tools are available:
110
-
111
- 1. Or ask: "What tools do you have available?"
112
- 2. You should see: `create_task`, `get_task_status`, `enhance_video_sync`, `sam3_predict`
113
-
114
- ## Configuration Options
115
-
116
- | Variable | Required | Default | Description |
117
- |---|---|---|---|
118
- | `API_KEY` | **Yes** | - | API authentication key (shared by video enhancement and SAM3) |
119
- | `HTTP_API_BASE_URL` | No | `https://mcp.avc.ai/enhance` | Video enhancement service endpoint |
120
- | `SAM3_API_BASE_URL` | No | `https://mcp.avc.ai/sam` | SAM3 service endpoint |
121
- | `SAM3_POLL_INTERVAL` | No | `2000` | SAM3 polling interval (milliseconds) |
122
- | `SAM3_POLL_MAX_ATTEMPTS` | No | `25` | SAM3 maximum polling attempts |
123
-
124
- ### Custom Endpoint
125
-
126
- ```json
127
- {
128
- "env": {
129
- "HTTP_API_BASE_URL": "https://your-endpoint.com",
130
- "API_KEY": "your-api-key",
131
- "SAM3_API_BASE_URL": "https://your-sam3-endpoint.com"
132
- }
133
- }
134
- ```
135
-
136
- Or via CLI args:
137
- ```bash
138
- npx -y @avclabs.ai/media-mcp@latest --base-url https://your-endpoint.com --api-key your-api-key --sam3-base-url https://your-sam3-endpoint.com
139
- ```
140
-
141
- ## Recommended Workflow
142
-
143
- This project provides both **synchronous** and **asynchronous** modes.
144
-
145
- **Because MCP Agents typically enforce a ~60-second timeout per tool call**, tasks with longer processing times (video enhancement) are strongly recommended to use **asynchronous mode**:
146
-
147
- ### Asynchronous Mode (Recommended)
148
-
149
- **Video Enhancement:**
150
- 1. Call `create_task` to create a task → immediately get `task_id`
151
- 2. Wait a few seconds, then call `get_task_status` to query the status
152
- 3. If `status` is `processing`, continue waiting and repeat step 2
153
- 4. If `status` is `completed`, the task is done and the result contains `video_url`
154
- 5. If `status` is `failed`, the task failed and the result contains `error_message`
155
-
156
- ### Synchronous Mode (Simple Scenarios)
157
-
158
- **Video Enhancement:**
159
- - Call `enhance_video_sync` → the server polls internally
160
- - Defaults to a maximum wait of 50 seconds
161
- - If completed within 50 seconds, returns the result directly
162
- - If not completed within 50 seconds, returns `task_id` and instructions for the Agent to switch to `get_task_status`
163
-
164
- **Image Segmentation (SAM3):**
165
- - Call `sam3_predict` → the server polls internally
166
- - Defaults to a maximum wait of 50 seconds (25 attempts × 2-second polling interval)
167
- - If completed within 50 seconds, returns the segmentation result directly
168
- - If not completed within 50 seconds, returns a truncation notice indicating the task is still processing
169
-
170
- ## Usage Examples
171
-
172
- Once configured, ask your AI agent naturally:
173
-
174
- > "Enhance this video to 1080p: https://example.com/video.mp4"
175
-
176
- > "Improve the quality of /Users/me/Desktop/video.mp4 to 2k"
177
-
178
- > "Analyze this image and find all objects: C:\\Users\\xxx\\photo.png"
179
-
180
- > "Use SAM3 to segment this image, prompt: 'find all cars'"
181
-
182
- The agent will automatically choose sync or async tools based on task complexity.
183
-
184
- ## Provided Tools
185
-
186
- ### Video Enhancement
187
-
188
- #### create_task
189
-
190
- Create an asynchronous video enhancement task.
191
-
192
- > **Recommended for most use cases.** Ideal for longer videos (over 10 seconds) to avoid timeouts and blocking the connection.
193
-
194
- | Parameter | Type | Required | Default | Description |
195
- |---|---|---|---|---|
196
- | `video_source` | string | Yes | - | Video URL or local file path (URL must be publicly accessible, links requiring login or signatures are not supported) |
197
- | `type` | string | No | `url` | `url` or `local` |
198
- | `resolution` | string | No | `720p` | `480p`, `540p`, `720p`, `1080p`, `2k` |
199
-
200
- **Returns:**
201
- ```json
202
- {
203
- "success": true,
204
- "task_id": "xxx",
205
- "status": "processing"
206
- }
207
- ```
208
-
209
- #### get_task_status
210
-
211
- Query video enhancement task status.
212
-
213
- > The returned `status` field can be: `processing`, `completed`, or `failed`. If `status` is `processing`, you need to wait a few seconds and call this tool again.
214
-
215
- | Parameter | Type | Required |
216
- |---|---|---|
217
- | `task_id` | string | Yes |
218
-
219
- **Returns:**
220
- ```json
221
- {
222
- "success": true,
223
- "task_id": "xxx",
224
- "status": "completed",
225
- "progress": 100,
226
- "video_url": "https://...",
227
- "message": "任务仍在处理中,请稍后再查询"
228
- }
229
- ```
230
-
231
- The `message` field only appears when `status` is `processing`, prompting the Agent to continue waiting.
232
-
233
- #### enhance_video_sync
234
-
235
- Synchronously enhance video (blocks until completion).
236
-
237
- > **Best for short videos (estimated processing time < 1 minute).** If the task is not completed within 50 seconds, the tool returns early with a `task_id`, and you need to use `get_task_status` to continue querying.
238
-
239
- | Parameter | Type | Required | Default | Description |
240
- |---|---|---|---|---|
241
- | `video_source` | string | Yes | - | Video URL or local file path |
242
- | `type` | string | No | `url` | `url` or `local` |
243
- | `resolution` | string | No | `720p` | Target resolution |
244
- | `poll_interval` | number | No | `5` | Poll interval (seconds) |
245
- | `timeout` | number | No | `50` | Sync wait timeout (seconds), returns early when exceeded |
246
-
247
- **Truncated return example (not completed within 50s):**
248
- ```json
249
- {
250
- "success": true,
251
- "status": "processing",
252
- "task_id": "xxx",
253
- "message": "任务仍在处理中(已等待 50 秒)。请使用 get_task_status 工具继续查询此任务状态。",
254
- "note": "此工具对长任务的同步等待已被截断,请切换到 get_task_status 轮询模式。"
255
- }
256
- ```
257
-
258
- ### Image Segmentation (SAM3)
259
-
260
- #### sam3_predict
261
-
262
- Analyze an image using the SAM3 segmentation API to generate inference results (masks, boxes, scores).
263
-
264
- **Parameters:**
265
-
266
- Image input (choose one, must provide exactly one):
267
-
268
- - `imagePath` (string): Absolute path of a local image file. Supports common formats (PNG, JPG, JPEG).
269
- - Example: `"C:\\Users\\xxx\\photo.png"`, `"/home/user/images/cat.jpg"`
270
- - Use when: The user explicitly provides a local file path
271
-
272
- - `imageUrl` (string): Publicly accessible URL of the image.
273
- - Example: `"https://example.com/photo.jpg"`
274
- - Use when: The image is already online and the user provides a link
275
- - Note: The URL must be publicly accessible. Links requiring login or signatures are not supported
276
-
277
- - `imageBase64` (string): Base64-encoded image data.
278
- - Example: `"iVBORw0KGgoAAAANSUhEUgAA..."`
279
- - Use when: The user drags or uploads an image attachment, and the Agent encodes it as base64
280
- - Note: Large images will produce very large base64 strings, which may slow transmission
281
-
282
- Other parameters:
283
-
284
- - `prompt` (string, required): English text prompt specifying the target object to segment. Since the SAM3 model only accepts English prompts, provide an English description. If the user provides Chinese or other non-English text, the Agent will automatically translate it before calling the tool.
285
-
286
- **Normal completion return:**
287
-
288
- After inference completes, returns a JSON string containing three fields:
289
-
290
- - **`masks`**: 2D array. Each element is a binary mask (values 0 or 1) with the same dimensions as the input image, marking the pixel-level location of detected objects. The i-th mask corresponds to the i-th detected object instance.
291
- - **`boxes`**: 2D array. Each element is a bounding box in `[x1, y1, x2, y2]` format, representing the rectangular region of the detected object. `x1`, `y1` are the top-left coordinates; `x2`, `y2` are the bottom-right coordinates.
292
-
293
- Coordinate system: The top-left corner of the image is the origin `(0, 0)`. The x-axis increases to the right, and the y-axis increases downward, in pixels. For example, `[120, 80, 300, 450]` means the region starts 120px from the left edge and 80px from the top edge, extending to 300px from the left and 450px from the top. Width = `x2 - x1 = 180px`, Height = `y2 - y1 = 370px`.
294
- - **`scores`**: 1D array. Each element is a confidence score for the corresponding detection result, ranging from 0 to 1. Higher scores indicate greater model confidence.
295
-
296
- Example result JSON:
297
-
298
- ```json
299
- {
300
- "masks": [
301
- [[0, 0, 1, ...], [0, 1, 1, ...], ...],
302
- [[0, 0, 0, ...], [0, 0, 1, ...], ...]
303
- ],
304
- "boxes": [
305
- [120, 80, 300, 450],
306
- [400, 200, 600, 500]
307
- ],
308
- "scores": [0.95, 0.87]
309
- }
310
- ```
311
-
312
- **Truncated return example (not completed within 50s):**
313
- ```json
314
- {
315
- "success": true,
316
- "status": "processing",
317
- "task_id": "xxx",
318
- "message": "Task is still processing (waited about 50 seconds). Please retry later or record this task_id for manual follow-up.",
319
- "note": "The synchronous wait for this long-running task has been truncated."
320
- }
321
- ```
322
-
323
- ## FAQ
324
-
325
- ### Agent reports timeout when calling tools?
326
-
327
- This is the primary issue this project addresses. MCP Agents (such as Claude, Cursor) typically enforce a ~60-second timeout per tool call. If task processing exceeds this limit, the Agent will error and disconnect.
328
-
329
- **Solutions:**
330
-
331
- 1. **Prefer asynchronous tools**: For video enhancement and other time-consuming tasks, always use `create_task` + `get_task_status`. These tools return instantly on each call and will not trigger timeouts.
332
-
333
- 2. **Sync tool truncation mechanism**: `enhance_video_sync` has an internal 50-second truncation limit. If the task is not completed within 50 seconds, the tool proactively returns a `task_id` and instructs the Agent to use `get_task_status` to follow up.
334
-
335
- 3. **SAM3 truncation mechanism**: `sam3_predict` defaults to 25 polling attempts (~50 seconds). If the task is not completed, it returns a truncation notice indicating the task is still processing.
336
-
337
- 4. **Adjust SAM3 polling parameters** (advanced): If you are confident that SAM3 tasks are usually fast (e.g., under 10 seconds), you can increase polling attempts via environment variable:
338
- ```bash
339
- SAM3_POLL_MAX_ATTEMPTS=60
340
- ```
341
- But ensure the total wait time does not exceed your Agent's timeout limit.
342
-
343
- ### Drag-and-drop attachment says file not found?
344
-
345
- This is a known limitation of stdio MCP. When dragging or uploading an attachment through the Agent interface, the file path is usually not automatically passed to the MCP Server.
346
-
347
- **Solutions:**
348
-
349
- 1. **Provide the path simultaneously** (recommended): After dragging the image, add the local absolute path in your message:
350
- > "Please analyze this image `D:\\photos\\cat.jpg` and find the cat"
351
-
352
- 2. **Wait for auto-encoding**: Claude may automatically encode the image as base64. If successful, no extra action is needed.
353
-
354
- 3. **Reply to path inquiry**: If Claude asks for the image path, simply reply with the local absolute path.
355
-
356
- ### Is there a priority among the three input methods?
357
-
358
- There is no strict priority. Claude will automatically choose the most appropriate method based on conversation context:
359
-
360
- - You provided a local path → uses `imagePath`
361
- - You provided a web link → uses `imageUrl`
362
- - You dragged an attachment without a path → tries `imageBase64`
363
-
364
- ### What image formats are supported?
365
-
366
- Common formats: PNG, JPG, JPEG, BMP, WebP, etc. PNG or JPG is recommended.
367
-
368
- ### What if URL image download fails?
369
-
370
- Ensure the URL is **publicly accessible**, requiring no login, cookies, or signatures. If the image is on a service requiring authentication (e.g., private S3 Bucket, login-required image host), download it locally first and use `imagePath`.
371
-
372
- ### What if the base64 image is too large?
373
-
374
- If the image is very large (e.g., 4K resolution), the base64-encoded data will be very large and may slow transmission. Suggestions:
375
-
376
- 1. Use `imagePath` instead
377
- 2. Or compress the image before encoding
378
-
379
- ## File Upload Notes
380
-
381
- When `type` is `"local"`:
382
- 1. File is read locally by the MCP Server
383
- 2. Uploaded directly to TOS object storage via pre-signed URL
384
- 3. **Max file size: 100MB**
385
-
386
- ## Troubleshooting
387
-
388
- ### "command not found: npx"
389
-
390
- Install Node.js >= 18: https://nodejs.org/
391
-
392
- ### "Error: 需要提供 --api-key 或设置 API_KEY"
393
-
394
- Your API Key is missing. Double-check the `env.API_KEY` in your config.
395
-
396
- ### MCP Server shows red/error in client
397
-
398
- Check logs:
399
- - **Claude Desktop macOS**: `~/Library/Logs/Claude/mcp*.log`
400
- - **Claude Desktop Windows**: `%APPDATA%\Claude\logs\mcp*.log`
401
- - **Cursor**: Output panel > MCP
402
-
403
- ### "TOS upload failed"
404
-
405
- Usually a signature mismatch. Ensure your `HTTP_API_BASE_URL` and `API_KEY` are correct and active.
406
-
407
- ## Global Install (Alternative)
408
-
409
- If you prefer not using `npx` every time:
410
-
411
- ```bash
412
- npm install -g @avclabs.ai/media-mcp
413
- ```
414
-
415
- Then use `"command": "media-mcp"` with `"args": ["--api-key", "your-api-key"]` in your config.
416
-
417
- ## License
418
-
419
- MIT License - See [LICENSE](LICENSE) file for details