Skip to main content
Glama

Luma MCP 服务器

提供 Luma AI 视频生成 API 作为模型上下文协议 (MCP) 的服务器

🌟 概述

Luma MCP Server 作为 MCP 服务器提供 Luma AI 的视频生成功能。它具有从文本和图像生成视频以及增强和插入现有视频的能力。

🏗️ 项目结构

src/ ├── types/ - 型定義 │ ├── schemas.ts - 入力スキーマ │ └── types.ts - 共通型定義 ├── services/ - ビジネスロジック ├── handlers/ - リクエストハンドラー │ └── tool-handlers.ts ├── clients/ - 外部APIクライアント │ └── luma-client.ts ├── utils/ - ユーティリティ │ └── error-handler.ts ├── config/ - 設定 │ └── server-config.ts └── index.ts - エントリーポイント

📦安装

npm install @sunwood-ai-labs/luma-mcp-server

⚙️ 偏好设置

  1. 获取 Luma API 密钥

  2. 设置环境变量

    export LUMA_API_KEY=your_api_key_here

🛠️ 可用工具

生成视频

根据文本提示生成视频。

{ name: 'generate_video', arguments: { prompt: "A teddy bear in sunglasses playing electric guitar and dancing", loop: true, // オプション callback_url: "https://your-callback-url.com" // オプション } }

从图像生成视频

使用图像作为起始帧生成视频。

{ name: 'generate_video_from_image', arguments: { prompt: "Low-angle shot of a majestic tiger prowling through a snowy landscape", image_url: "https://your-image-url.com/start-frame.jpg", loop: true, // オプション callback_url: "https://your-callback-url.com" // オプション } }

扩展视频

扩展现有视频。

{ name: 'extend_video', arguments: { prompt: "Continue the dance sequence", source_generation_id: "existing-video-generation-id", loop: true, // オプション callback_url: "https://your-callback-url.com" // オプション } }

插值视频

它可以平滑地在两个视频之间进行插入。

{ name: 'interpolate_videos', arguments: { prompt: "Create a smooth transition between the videos", start_generation_id: "first-video-generation-id", end_generation_id: "second-video-generation-id", callback_url: "https://your-callback-url.com" // オプション } }

🔧 开发者信息

建筑学

  • 类型定义(

    • schemas.ts :使用 Zod 的输入验证模式

    • types.ts :通用类型定义和接口

  • handlers/

    • tool-handlers.ts :MCP 工具请求处理

  • 客户(

    • luma-client.ts :负责与 Luma AI API 进行通信

  • 实用程序(

    • error-handler.ts :统一错误处理

  • 配置(

    • server-config.ts :集中式服务器配置

错误处理

  • 统一错误处理系统

  • 正确映射到 MCP 错误代码

  • 详细的错误消息和日志记录

📝 注释

  • 请用英语写下你的提示

  • 视频生成可能需要一些时间

  • 请注意 API 使用限制

🤝 贡献

  1. Fork此存储库

  2. 创建新分支( git checkout -b feature/amazing-feature

  3. 提交更改( git commit -m '✨ feat: Add amazing feature'

  4. 推送分支( git push origin feature/amazing-feature

  5. 创建拉取请求

📄 许可证

MIT 许可证 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
-
license - not tested
-
quality - not tested

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server implementation that enables connection between OpenAI APIs and MCP clients for coding assistance with features like CLI interaction, web API integration, and tool-based architecture.
    Last updated -
    36
    • Linux
    • Apple
  • -
    security
    F
    license
    -
    quality
    A generic Model Context Protocol framework for building AI-powered applications that provides standardized ways to create MCP servers and clients for integrating LLMs with support for Ollama and Supabase.
    Last updated -
  • A
    security
    -
    license
    A
    quality
    Create videos and images using Luma AI, this MCP server handles all API functionality for Luma Dream Machine from Claude Desktop.
    Last updated -
    10
    3
    • Apple
  • A
    security
    A
    license
    A
    quality
    Model Context Protocol server that enables generating videos from text prompts and/or images using AI models (Luma Ray2 Flash and Kling v1.6 Pro) with configurable parameters like aspect ratio, resolution, and duration.
    Last updated -
    2
    3
    MIT License

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sunwood-ai-labs/luma-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server