跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt

Use this file to discover all available pages before exploring further.

MCP(Model Context Protocol) 是由 Anthropic 推出的模型上下文协议,允许 AI 模型(如 Claude、GPT 等)通过标准化接口调用外部工具。通过 AceData Cloud 提供的 Luma MCP Server,你可以在 Claude Desktop、VS Code、Cursor 等 AI 客户端中直接生成 AI 视频。

功能概览

Luma MCP Server 提供以下核心功能:
  • 文本生成视频 — 通过文本提示词生成高质量视频
  • 图片生成视频 — 以图片为起点或终点生成视频
  • 视频续写 — 从已有视频的最后一帧继续生成
  • 多种画面比例 — 支持 16:9、9:16、1:1 等多种比例
  • 画面增强 — 可选的视觉质量增强功能
  • 任务查询 — 监控生成进度并获取结果

前置准备

使用前,你需要获取 AceData Cloud API Token:
  1. 注册或登录 AceData Cloud 平台
  2. 前往 Luma Videos API 页面
  3. 点击「Acquire」获取 API Token(首次申请赠送免费额度)

安装配置

方式一:pip 安装(推荐)

pip install mcp-luma

方式二:源码安装

git clone https://github.com/AceDataCloud/MCPLuma.git
cd MCPLuma
pip install -e .
安装完成后,即可使用 mcp-luma 命令启动服务。

在 Claude Desktop 中使用

编辑 Claude Desktop 配置文件:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{
  "mcpServers": {
    "luma": {
      "command": "mcp-luma",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}
如果使用 uvx(无需提前安装包):
{
  "mcpServers": {
    "luma": {
      "command": "uvx",
      "args": ["mcp-luma"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}
保存配置后重启 Claude Desktop,即可在对话中使用 Luma 相关工具。

在 VS Code / Cursor 中使用

在项目根目录创建 .vscode/mcp.json
{
  "servers": {
    "luma": {
      "command": "mcp-luma",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}
或者使用 uvx
{
  "servers": {
    "luma": {
      "command": "uvx",
      "args": ["mcp-luma"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}

可用工具列表

工具名说明
luma_generate_video通过文本提示词生成视频
luma_generate_video_from_image从图片生成视频
luma_extend_video续写已有视频
luma_extend_video_from_url从 URL 指定视频进行续写
luma_get_task查询单个任务状态
luma_get_tasks_batch批量查询任务状态

使用示例

配置完成后,你可以在 AI 客户端中直接用自然语言调用这些功能,例如:
  • 「帮我生成一段日落海边的视频」
  • 「用这张照片作为第一帧,生成一段 5 秒的视频」
  • 「续写这个视频,再延长一段」
  • 「生成一段竖屏的视频,比例 9:16」

更多信息