概要
Luma MCP Serverは、Luma AIのビデオ生成機能をMCPサーバーとして提供します。テキストや画像からビデオを生成したり、既存のビデオを拡張・補間したりする機能を提供します。
プロジェクト構造
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
環境設定
- Luma APIキーの取得
- Luma AI Developer PortalからAPIキーを取得してください。
- 環境変数の設定
export LUMA_API_KEY=your_api_key_here
使用可能なツール
generate_video
テキストプロンプトからビデオを生成します。
{
name: 'generate_video',
arguments: {
prompt: "A teddy bear in sunglasses playing electric guitar and dancing",
loop: true, // オプション
callback_url: "https://your-callback-url.com" // オプション
}
}
generatevideofrom_image
画像を開始フレームとしてビデオを生成します。
{
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
既存のビデオを拡張します。
{
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
2つのビデオ間をスムーズに補間します。
{
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" // オプション
}
}
開発者向け情報
アーキテクチャ
型定義 (
types/
):schemas.ts
: Zodを使用した入力バリデーションスキーマtypes.ts
: 共通の型定義とインターフェースハンドラー (
handlers/
):tool-handlers.ts
: MCPツールのリクエスト処理クライアント (
clients/
):luma-client.ts
: Luma AI APIとの通信を担当ユーティリティ (
utils/
):error-handler.ts
: 統一的なエラー処理設定 (
config/
):server-config.ts
: サーバー設定の一元管理
エラーハンドリング
- 統一的なエラー処理システム
- MCPエラーコードへの適切なマッピング
- 詳細なエラーメッセージとロギング
注意事項
- プロンプトは英語で記述してください
- ビデオ生成には時間がかかる場合があります
- APIの利用制限に注意してください
コントリビューション
- このリポジトリをフォーク
- 新しいブランチを作成 (
git checkout -b feature/amazing-feature
) - 変更をコミット (
git commit -m '
)feat: Add amazing feature'
- ブランチをプッシュ (
git push origin feature/amazing-feature
) - プルリクエストを作成
ライセンス
MIT License - 詳細は LICENSE ファイルを参照してください。
Luma MCP Server
Project Details
- Sunwood-ai-labs/luma-mcp-server
- Last Updated: 12/27/2024
Recomended MCP Servers
This server creates a secure bridge between Claude and your computer's command-line functionality.
A powerful MCP (Model Control Protocol) server for preprocessing and analyzing CSV files. This server provides a suite...
GibsonAI's MCP server
Get API document info from mcp server
MCP Server to interact with Google Cloud Firestore
MCP server for interacting with SingleStore Management API and services
Agentset MCP Server - Build RAG with Agentic superpowers
Mobil uygulama dersim için geliştirilmiş bir proje