Skip to main content
Glama

Luma MCP Server

A server that provides Luma AI's video generation API as the Model Context Protocol (MCP)

๐ŸŒŸ Overview

Luma MCP Server provides the video generation capabilities of Luma AI as an MCP server, providing the ability to generate videos from text and images, as well as augment and interpolate existing videos.

Related MCP server: AI Video Generator MCP Server

๐Ÿ—๏ธ Project structure

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        - ใ‚จใƒณใƒˆใƒชใƒผใƒใ‚คใƒณใƒˆ

๐Ÿ“ฆ Installation

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

โš™๏ธ Preferences

  1. Obtaining a Luma API key

  2. Setting environment variables

    export LUMA_API_KEY=your_api_key_here

๐Ÿ› ๏ธ Available tools

generate_video

Generate videos from text prompts.

{
  name: 'generate_video',
  arguments: {
    prompt: "A teddy bear in sunglasses playing electric guitar and dancing",
    loop: true,  // ใ‚ชใƒ—ใ‚ทใƒงใƒณ
    callback_url: "https://your-callback-url.com"  // ใ‚ชใƒ—ใ‚ทใƒงใƒณ
  }
}

generate_video_from_image

Generate a video using the image as the starting frame.

{
  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"  // ใ‚ชใƒ—ใ‚ทใƒงใƒณ
  }
}

extend_video

Extend an existing video.

{
  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"  // ใ‚ชใƒ—ใ‚ทใƒงใƒณ
  }
}

interpolate_videos

It smoothly interpolates between two videos.

{
  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"  // ใ‚ชใƒ—ใ‚ทใƒงใƒณ
  }
}

๐Ÿ”ง Developer Information

architecture

  • Type definitions ( types/ ) :

    • schemas.ts : Input validation schema using Zod

    • types.ts : Common type definitions and interfaces

  • handlers/ :

    • tool-handlers.ts : MCP tool request handling

  • Clients ( clients/ ) :

    • luma-client.ts : Responsible for communication with the Luma AI API

  • Utilities ( utils/ ) :

    • error-handler.ts : Unified error handling

  • Configuration ( config/ ) :

    • server-config.ts : Centralized server configuration

Error Handling

  • Unified Error Handling System

  • Proper mapping to MCP error codes

  • Detailed error messages and logging

๐Ÿ“ Notes

  • Please write your prompts in English

  • Video generation may take some time

  • Please be aware of API usage restrictions

๐Ÿค Contributions

  1. Fork this repository

  2. Create a new branch ( git checkout -b feature/amazing-feature )

  3. Commit the changes ( git commit -m 'โœจ feat: Add amazing feature' )

  4. Push the branch ( git push origin feature/amazing-feature )

  5. Create a pull request

๐Ÿ“„ License

MIT License - see the LICENSE file for details.

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for Luma Dream Machine AI video generation

  • MCP server for Google Veo AI video generation

  • MCP server for Hailuo (MiniMax) AI video generation

View all MCP Connectors

Latest Blog Posts

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