Skip to main content
Glama
mcp-lumiclip

mcp-lumiclip

Official
by lumiclip

@lumiclip/mcp-server

将 YouTube 视频转换为短视频片段 — 适用于 Claude、Cursor 或任何支持 MCP 的 AI 助手。

只需提供一个 YouTube 链接。它会自动寻找最佳片段、重构为竖屏视频 (9:16)、添加字幕,并返回可直接下载的短视频。

Lumiclip MCP server

快速开始

  1. 在 app.lumiclip.ai/developers 获取 API 密钥

  2. 运行:

LUMICLIP_API_KEY=sk_live_... npx @lumiclip/mcp-server

Related MCP server: Image Metadata AI MCP

设置

Claude Desktop / Cursor

添加到您的配置文件中 — Claude 使用 claude_desktop_config.json,Cursor 使用 .cursor/mcp.json:

{
  "mcpServers": {
    "lumiclip": {
      "command": "npx",
      "args": ["@lumiclip/mcp-server"],
      "env": {
        "LUMICLIP_API_KEY": "sk_live_..."
      }
    }
  }
}

Cursor 目录

在 Cursor 中安装

Smithery

npx @smithery/cli mcp add lumiclip/lumiclip-mcp-server

远程 (Streamable HTTP)

对于 n8n、自定义集成或任何支持远程 MCP 的客户端:

  • 端点: https://mcp.lumiclip.ai/mcp

  • 认证: Authorization: Bearer sk_live_...

  • 传输: Streamable HTTP (POST)

工具

工具

功能描述

generate_clips

从 YouTube URL 开始生成短视频。立即返回 project_id。

get_project_status

检查进度并在完成后获取短视频。短视频按评分排序(最佳在前)。

list_projects

列出您的项目及其状态和短视频数量。

get_clip

获取单个短视频的详细信息。

check_usage

查看您的套餐、剩余额度和使用情况。

工作原理

  1. 使用 YouTube URL 调用 generate_clips

  2. 立即获得 project_id

  3. 每 10–15 秒轮询一次 get_project_status(或传入 callback_url 以使用 Webhook)

  4. 完成后,短视频将按评分排序(最佳在前),每个短视频都有一个 download_url

状态

项目: pending → processing → completed (或 completed_no_clips / failed)

处理步骤: queued → DOWNLOADING_VIDEO → EXTRACTING_AUDIO → TRANSCRIBING → DETECTING_HIGHLIGHTS → CUTTING_CLIPS → EXPORTING_CLIPS → done

短视频: pending → exporting → completed (或 failed)。当 clip_status 为 completed 时,download_url 可用。

API 参考

generate_clips

从 YouTube 视频开始生成短视频。

字段

类型

必填

描述

url

string

是

完整的 YouTube 视频 URL

start_time

number

否

开始时间(秒)(仅处理片段)

end_time

number

否

结束时间(秒)(仅处理片段)

callback_url

string

否

完成后接收结果的 Webhook URL

{
  "project_id": "43dbe622-8ac6-4579-9625-0ad7f0f9db0b",
  "status": "processing",
  "poll_url": "/api/v1/projects/43dbe622-8ac6-4579-9625-0ad7f0f9db0b",
  "estimated_minutes": 5,
  "message": "Processing started. Poll with get_project_status every 10-15 seconds until status is 'completed'."
}

get_project_status

检查进度并获取短视频。

字段

类型

必填

描述

project_id

string

是

来自 generate_clips 的项目 ID

{
  "id": "43dbe622-...",
  "name": "Video Title",
  "status": "completed",
  "step": "done",
  "error": null,
  "expected_clips": 9,
  "duration": 639,
  "created_at": "2026-03-15T02:21:46.226Z",
  "clips": [
    {
      "id": "32538b9c-...",
      "title": "One Dating Theory Leads to Chaos",
      "duration": 41.83,
      "score": 90,
      "reason": "Sharp universal joke that hooks instantly with strong reactions.",
      "clip_status": "completed",
      "download_url": "https://cdn.lumiclip.ai/exports/premium/.../clip-32538b9c-....mp4",
      "quality": "1080p",
      "thumbnail_url": "https://cdn.lumiclip.ai/exports/premium/.../clip-32538b9c-...-thumb.jpg",
      "created_at": "2026-03-15T02:29:10.954Z",
      "updated_at": "2026-03-15T02:30:43.907Z"
    }
  ]
}

短视频按 score(最高分在前)排序。

list_projects

字段

类型

必填

描述

limit

number

否

返回的最大项目数。默认 20,最大 100。

status

string

否

筛选条件:pending, processing, completed, completed_no_clips, failed

{
  "projects": [
    {
      "id": "43dbe622-...",
      "name": "Video Title",
      "status": "completed",
      "step": "done",
      "expected_clips": 9,
      "clips_count": 8,
      "duration": 639,
      "created_at": "2026-03-15T02:21:46.226Z"
    }
  ],
  "total": 1,
  "limit": 20,
  "offset": 0
}

get_clip

字段

类型

必填

描述

clip_id

string

是

来自项目短视频数组的短视频 ID

{
  "id": "32538b9c-...",
  "project_id": "43dbe622-...",
  "title": "One Dating Theory Leads to Chaos",
  "duration": 41.83,
  "score": 90,
  "reason": "Sharp universal joke that hooks instantly.",
  "export_status": "completed",
  "export_quality": "1080p",
  "is_exported": true,
  "video_url": "https://cdn.lumiclip.ai/...",
  "video_url_720p": "https://cdn.lumiclip.ai/...",
  "video_url_1080p": "https://cdn.lumiclip.ai/...",
  "thumbnail_url": "https://cdn.lumiclip.ai/...",
  "created_at": "2026-03-15T02:29:10.954Z",
  "updated_at": "2026-03-15T02:30:43.907Z"
}

check_usage

无需输入。

{
  "plan": "pro",
  "credits_remaining": 450,
  "credits_total": 500,
  "period_start": "2026-03-01T00:00:00.000Z",
  "period_end": "2026-04-01T00:00:00.000Z"
}

错误

HTTP 状态

错误

处理建议

400

无效的 YouTube URL

检查 URL 格式

401

未授权

检查您的 API 密钥

402

额度不足

购买更多额度或使用较短的视频

429

超出速率限制

等待片刻后重试

500

内部服务器错误

稍后重试

Webhooks

在调用 generate_clips 时传入 callback_url,以便在所有短视频准备就绪时接收 POST 请求。

已完成:

{
  "event": "project.completed",
  "project_id": "43dbe622-...",
  "status": "completed",
  "source_url": "https://www.youtube.com/watch?v=H51iLa1leOU",
  "clips": [
    {
      "id": "32538b9c-...",
      "title": "One Dating Theory Leads to Chaos",
      "duration": 41.83,
      "score": 90,
      "download_url": "https://cdn.lumiclip.ai/exports/premium/.../clip-32538b9c-....mp4",
      "thumbnail_url": "https://cdn.lumiclip.ai/exports/premium/.../clip-32538b9c-...-thumb.jpg",
      "quality": "1080p"
    }
  ]
}

失败:

{
  "event": "project.failed",
  "project_id": "43dbe622-...",
  "status": "failed",
  "error": "YouTube video is unavailable",
  "clips": []
}

短视频按评分(最高分在前)排序。如果您的服务器没有响应,我们将重试最多 3 次。

签名验证(可选): 每个回调都包含一个 X-Lumiclip-Signature 请求头。使用 SHA-256(your_api_key) 作为签名密钥计算请求体的 HMAC-SHA256。将其与请求头的值 (sha256=<hex>) 进行比较。

在 n8n 中使用

选项 A — Webhook(推荐):

  1. 创建一个带有 Webhook 触发节点的工作流。复制其 URL。

  2. 添加一个 HTTP Request 节点:POST https://api.lumiclip.ai/api/v1/clips/generate,使用 Header Auth (Authorization: Bearer sk_live_...) 和请求体:

    {
      "url": "https://www.youtube.com/watch?v=...",
      "callback_url": "https://your-n8n.com/webhook/abc123"
    }
  3. 当短视频准备好时,Webhook 节点将接收到有效载荷。

  4. 最佳短视频:{{ $json.clips[0].download_url }}

选项 B — 轮询循环:

  1. POST 生成短视频(同上,不带 callback_url)。

  2. 等待 15 秒 → GET https://api.lumiclip.ai/api/v1/projects/{{ $json.project_id }} → 如果状态不是 completed,则循环回到等待。

REST API

对于不使用 MCP 的直接 HTTP 调用:

方法

端点

描述

POST

/api/v1/clips/generate

开始生成短视频

GET

/api/v1/projects/:id

获取项目状态和短视频

GET

/api/v1/projects

列出项目

GET

/api/v1/clips/:id

获取单个短视频详情

GET

/api/v1/account/usage

检查额度和套餐

基础 URL:https://api.lumiclip.ai — 所有端点都需要 Authorization: Bearer sk_live_...

环境变量

变量

必填

默认值

LUMICLIP_API_KEY

是

—

LUMICLIP_API_URL

否

https://api.lumiclip.ai

链接

许可证

MIT

Available Tools

5 tools
check_usageA
Read-onlyIdempotent

Returns a JSON object with plan (string), credits_remaining (number), credits_total (number), period_start (ISO date), and period_end (ISO date). Call this before generate_clips to confirm the user has enough credits.

Inputs: no named parameters.

generate_clipsA

Start AI clip generation from a YouTube video. Returns a JSON object with project_id (string), status ('processing'), poll_url (string), and estimated_minutes (number). Processing is async -- use get_project_status to poll every 10-15 seconds, or provide a callback_url to receive a webhook POST when all clips are exported with download URLs.

Inputs: url (required), start_time, end_time, callback_url.

get_clipA
Read-onlyIdempotent

Returns a JSON object with full clip details: id, project_id, title, duration, score, reason, export_status, export_quality (720p/1080p), is_exported, video_url, video_url_720p, video_url_1080p, thumbnail_url, created_at, updated_at.

Inputs: clip_id (required).

get_project_statusA
Read-onlyIdempotent

Returns a JSON object with id, name, status (pending/processing/completed/completed_no_clips/failed), step, error, expected_clips, duration, created_at, and a clips array. Clips are sorted by score (highest first). Each clip has: id, title, duration, score, reason, clip_status (pending/exporting/completed/failed), download_url (string or null), quality, thumbnail_url, created_at, updated_at. The download_url is only available when clip_status is 'completed'. Poll every 10-15 seconds until project status is 'completed'.

Inputs: project_id (required).

list_projectsA
Read-onlyIdempotent

Returns a JSON object with projects (array), total, limit, and offset. Each project has: id, name, status, step, expected_clips, clips_count, duration, created_at. Use the status filter to find only completed or failed projects.

Inputs: limit, status.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct purpose: check_usage for credits, generate_clips for initiating generation, get_clip for retrieving a specific clip, get_project_status for polling progress, and list_projects for enumerating projects. No functional overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., generate_clips, get_project_status), making them predictable and intuitive.

    Tool Count5/5

    Five tools is well-scoped for the server's purpose: credit checking, generation initiation, status polling, single clip retrieval, and project listing. Each tool serves a necessary function without excess.

    Completeness4/5

    Core workflow (check credits, generate, poll results, retrieve clips) is covered. Minor gaps like missing cancel operation or webhook management are present but not critical for basic usage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers