Luma MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows installation of the Luma MCP Server as an npm package for easy integration into projects.

  • Provides TypeScript type definitions and interfaces for type-safe interaction with the MCP server.

  • Uses Zod for input validation schemas to ensure properly formatted requests to the Luma AI API.

Servidor MCP de Luma

Un servidor que proporciona la API de generación de video de Luma AI como Protocolo de contexto de modelo (MCP)

🌟 Descripción general

Luma MCP Server proporciona las capacidades de generación de video de Luma AI como un servidor MCP. Proporciona la capacidad de generar vídeo a partir de texto e imágenes, así como aumentar e interpolar vídeo existente.

🏗️ Estructura del proyecto

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 - エントリーポイント

📦 Instalación

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

⚙️ Preferencias

  1. Obtener una clave API de Luma
  2. Configuración de variables de entorno
    export LUMA_API_KEY=your_api_key_here

🛠️ Herramientas disponibles

generar_video

Generar vídeos a partir de indicaciones de texto.

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

generar_vídeo_a_partir_de_imagen

Generar un vídeo utilizando la imagen como cuadro inicial.

{ 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" // オプション } }

extender_video

Ampliar un vídeo existente.

{ 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" // オプション } }

interpolar_vídeos

Interpola suavemente entre dos vídeos.

{ 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" // オプション } }

🔧 Información para desarrolladores

arquitectura

  • Definición de tipo ( types/ ) :
    • schemas.ts : Esquema de validación de entrada usando Zod
    • types.ts : Definiciones de tipos e interfaces comunes
  • handlers/ :
    • tool-handlers.ts : Manejo de solicitudes de herramientas MCP
  • Clientes ( clients/ ) :
    • luma-client.ts : Responsable de la comunicación con la API de IA de Luma
  • Utilidades ( utils/ ) :
    • error-handler.ts : Manejo unificado de errores
  • Configuración ( config/ ) :
    • server-config.ts : Configuración centralizada del servidor

Manejo de errores

  • Sistema unificado de gestión de errores
  • Asignación adecuada a los códigos de error de MCP
  • Mensajes de error detallados y registro

📝 Notas

  • Por favor escribe tus indicaciones en inglés.
  • La generación de video puede tardar algún tiempo
  • Tenga en cuenta las restricciones de uso de la API

🤝 Contribuciones

  1. Bifurcar este repositorio
  2. Crea una nueva rama ( git checkout -b feature/amazing-feature )
  3. Confirmar los cambios ( git commit -m '✨ feat: Add amazing feature' )
  4. Empujar la rama ( git push origin feature/amazing-feature )
  5. Crear una solicitud de extracción

📄 Licencia

Licencia MIT: consulte el archivo LICENCIA para obtener más detalles.

ID: ngjqwu3hyg