json2video MCP Server について
json2video MCP Server は、json2video API を通じてプログラムから動画を生成する MCP サーバーです。JSON で定義したプロジェクトから動画制作を自動化したい LLM、エージェント、MCP クライアントを対象としています。
主な機能
- 01複数シーンと多様な要素を含む動画プロジェクト
- 02テキスト、画像、動画、音声、字幕の要素に対応
- 03プロジェクト ID によるレンダリング状態の確認
- 04環境変数または リクエストごとの API キー指定
- 05テンプレートの作成、取得、一覧表示
活用シーン
- 01LLM が記述した内容からショート動画を生成
- 02プラットフォーム別の解像度で動画を制作
- 03再利用可能なテンプレートから動画コンテンツを作成
MCP 対応
本プロジェクトは MCP サーバーであり、動画プロジェクトの作成とレンダリング結果の確認のために generate_video や get_video_status などのツールを MCP クライアントに公開します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
5掲載時のツール一覧 · 3 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| id | string | いいえ | 動画プロジェクトの一意の識別子。指定しない場合はランダムな文字列が生成されます。 |
| comment | string | いいえ | 動画プロジェクトのコメントまたは説明。 |
| cache | boolean | いいえ | 利用可能な場合は、キャッシュされたバージョンの動画を使用します。既定値:true。 |
| client_data | object | いいえ | レスポンスと Webhook に含めるキーと値のペア。後続のワークフローステップに情報を渡すために使用します。 |
| draft | boolean | いいえ | true の場合、動画にウォーターマークを追加します。無料プランでは draft を true に設定する必要があります。 |
| quality | enum | いいえ | 最終レンダリング動画の品質。速度と品質のバランスを調整します。low | medium | high |
| resolution | enum | いいえ | プリセット解像度です。幅/高さを手動で設定するには、"custom" を使用します。sd | hd | full-hd | squared | instagram-story | instagram-feed | twitter-landscape | twitter-portrait | custom |
| width | integer | いいえ | 動画の幅(ピクセル)。解像度が "custom" の場合のみ使用します。最小値:50、最大値:3840。 |
| height | integer | いいえ | 動画の高さ(ピクセル)。解像度が "custom" の場合のみ使用します。最小値:50、最大値:3840。 |
| variables | object | いいえ | テンプレート/コンポーネントで使用するグローバル変数。変数名には英字、数字、アンダースコアを使用できます。 |
| elements | array | いいえ | 特定のシーンに紐付かないグローバル要素。各要素のタイプは video、image、text、html、component、audio、voice、audiogram、subtitles のいずれかです。 |
| scenes | array | はい | 動画内のシーン一覧。各シーンには要素の配列が含まれます。 |
| apiKey | string | いいえ | json2video API キー(任意。環境変数 JSON2VIDEO_API_KEY として設定することもできます) |
詳細
json2video MCP サーバー
json2video API を使用してプログラムから動画を生成するための Model Context Protocol (MCP) サーバー実装です。このサーバーは、LLM、エージェント、その他の MCP 互換クライアントで使用できる強力な動画生成およびステータス確認ツールを公開します。
機能
- 豊富なシーンと要素(テキスト、画像、動画、音声、コンポーネント、字幕など)をサポートする動画生成
- ステータスポーリングを伴う非同期の動画レンダリング
- 動画プロジェクト向けの柔軟で拡張可能な JSON スキーマ
- LLM、自動化エージェント、MCP 互換ツールとの容易な統合を想定した設計
- API キー認証(環境変数またはリクエストごと)
- 包括的なエラーハンドリングとログ出力
インストール
npx で実行する
env JSON2VIDEO_API_KEY=your_api_key_here npx -y @omerrgocmen/json2video-mcp
手動インストール
npm install -g @omerrgocmen/json2video-mcp
Windows ユーザーの方へ
Windows を使用していて問題が発生する場合は、次を試してください:
cmd /c "set JSON2VIDEO_API_KEY=your_api_key_here && npx -y @omerrgocmen/json2video-mcp"
Cursor での実行
Cursor v0.48.6+
- Cursor の設定を開きます
- Features > MCP Servers に移動します
- 「+ Add New MCP Server」をクリックします
- 以下を入力します:
- Name: "json2video-mcp"(または任意の名前)
- Type: "command"
- Command:
env JSON2VIDEO_API_KEY=your_api_key_here npx -y @omerrgocmen/json2video-mcp
Cursor v0.48.6+
- Cursor の設定を開きます
- Features > MCP Servers に移動します
- 「+ Add new global MCP server」をクリックします
- 以下のコードを入力します:
{ "mcpServers": { "json2video-mcp": { "command": "npx", "args": ["-y", "@omerrgocmen/json2video-mcp"], "env": { "JSON2VIDEO_API_KEY": "your_api_key_here" } } } }
your_api_key_here を自分の json2video API キーに置き換えてください。API キーは json2video.com から取得できます。
追加後、MCP サーバーリストを更新すると新しいツールが表示されます。エージェントまたは LLM は、適切な場合に json2video MCP を自動的に使用します。または、動画生成のニーズを説明することで明示的にリクエストすることもできます。
MCP 統合の例
これを mcp.json または同様の設定ファイルに追加します:
{
"mcpServers": {
"json2video-mcp": {
"command": "npx",
"args": ["-y", "@omerrgocmen/json2video-mcp"],
"env": {
"JSON2VIDEO_API_KEY": "your_api_key_here"
}
}
}
}
your_api_key_hereを実際の json2video API キーに置き換えてください。- この設定により、エージェントまたは LLM が json2video MCP サーバーを自動的に起動し、通信できるようになります。
- サーバーは、ワークフローで使用するための
generate_videoツールとget_video_statusツールを公開します。
設定
環境変数
JSON2VIDEO_API_KEY(必須):あなたの json2video API キー。環境変数として設定するか、リクエストごとに指定できます。
Note:
client closedエラーが発生した場合は、ターミナルで次のコマンドを実行してください:npm i @omerrgocmen/json2video-mcp
使用方法
利用可能なツール
1. 動画の生成 (generate_video)
シーンと要素を備えたカスタマイズ可能な動画プロジェクトを作成します。
説明: json2video API を使用して動画プロジェクトを作成します。各プロジェクトには複数のシーンを含めることができ、各シーンにはテキスト、画像、動画、音声、コンポーネント、HTML、ボイス、オーディオグラム、字幕などのさまざまな要素を含めることができます。動画生成は非同期で行われるため、返されたプロジェクト ID を使用してステータスを確認してください。完全なスキーマとその他の例については、https://json2video.com/docs/api/ を参照してください。
入力スキーマ:
{
"id": "string (optional, unique identifier for the movie)",
"comment": "string (optional, project description)",
"cache": true,
"client_data": {},
"draft": true,
"quality": "high", // one of: low, medium, high
"resolution": "custom", // one of: sd, hd, full-hd, squared, instagram-story, instagram-feed, twitter-landscape, twitter-portrait, custom
"width": 1920, // required if resolution is custom
"height": 1080, // required if resolution is custom
"variables": {},
"elements": [ /* global elements, see below for examples */ ],
"scenes": [
{
"id": "string (optional, unique scene id)",
"comment": "string (optional)",
"background_color": "#000000",
"cache": true,
"condition": "string (optional)",
"duration": -1,
"variables": {},
"elements": [ /* see element examples below */ ]
}
],
"apiKey": "string (optional)"
}
要素の種類と例:
- テキスト要素:
{
"type": "text",
"text": "Hello world",
"duration": 5,
"settings": { "font-size": "60px", "color": "#FF0000" }
}
- 画像要素:
{
"type": "image",
"src": "https://images.pexels.com/photos/1105666/pexels-photo-1105666.jpeg",
"width": 1620,
"height": 1080,
"x": 0,
"y": 0
}
- 動画要素:
{
"type": "video",
"src": "https://example.com/path/to/my/video.mp4",
"duration": 7.3
}
- コンポーネント要素:
{
"type": "component",
"component": "basic/001",
"settings": {
"headline": { "text": "Lorem ipsum", "color": "white" },
"body": { "text": "Dolor sit amet" }
}
}
- HTML 要素:
{
"type": "html",
"html": "<h1>Hello world</h1>",
"width": 800,
"height": 600
}
- 音声要素:
{
"type": "audio",
"src": "https://example.com/audio.mp3",
"duration": 5
}
- ボイス要素:
{
"type": "voice",
"text": "This is a voiceover.",
"voice": "en-US-Wavenet-D"
}
- オーディオグラム要素:
{
"type": "audiogram",
"color": "#00FF00",
"amplitude": 5
}
- 字幕要素:
{
"type": "subtitles",
"captions": "1\n00:00:00,000 --> 00:00:02,000\nHello world!"
}
入力例:
{
"comment": "MyProject",
"resolution": "full-hd",
"scenes": [
{
"elements": [
{ "type": "video", "src": "https://example.com/path/to/my/video.mp4" },
{ "type": "text", "text": "Hello world", "duration": 5 },
{ "type": "image", "src": "https://images.pexels.com/photos/1105666/pexels-photo-1105666.jpeg", "width": 1620, "height": 1080, "x": 0, "y": 0 },
{ "type": "component", "component": "basic/001", "settings": { "headline": { "text": "Lorem ipsum" } } },
{ "type": "html", "html": "<h1>Hello world</h1>", "width": 800, "height": 600 },
{ "type": "audio", "src": "https://example.com/audio.mp3", "duration": 5 },
{ "type": "voice", "text": "This is a voiceover.", "voice": "en-US-Wavenet-D" },
{ "type": "audiogram", "color": "#00FF00", "amplitude": 5 },
{ "type": "subtitles", "captions": "1\n00:00:00,000 --> 00:00:02,000\nHello world!" }
]
}
]
}
ユーザー向けの注意事項:
- 各要素タイプには、それぞれ必須プロパティと任意プロパティがあります。完全な詳細については、https://json2video.com/docs/api/ を参照してください。
- シーン内およびグローバルに、要素タイプを組み合わせたり一致させたりできます。
- カスタム解像度を使用する場合は、
widthとheightの両方を設定してください。 - 返されたプロジェクト ID を使用して、
get_video_statusで動画のステータスを確認してください。
出力:
get_video_statusで使用するプロジェクト ID を返します。
2. 動画ステータスの取得 (get_video_status)
動画生成ジョブのステータスを確認するか、結果を取得します。
説明: 以前に開始した動画生成ジョブのステータスまたは結果を取得します。注意: 動画のレンダリングは非同期で行われるため、時間がかかる場合があります。ステータスが「done」でない場合は、同じプロジェクト ID を使用して後でもう一度お試しください。
入力スキーマ:
{
"project": "string (required)",
"apiKey": "string (optional)"
}
入力例:
{
"project": "q663vmm2"
}
出力例:
{
"success": true,
"movie": {
"success": true,
"status": "done",
"message": "",
"project": "q663vmm2",
"url": "https://assets.json2video.com/clients/yourclient/renders/yourvideo.mp4",
"created_at": "2025-04-27T10:44:18.880Z",
"ended_at": "2025-04-27T10:44:28.589Z",
"duration": 11,
"size": 359630,
"width": 640,
"height": 360,
"rendering_time": 10
}
}
3. テンプレートの作成 (create_template)
json2video に新しいテンプレートを作成します。
説明: 指定した名前と任意の説明で新しいテンプレートを作成します。
入力スキーマ:
{
"name": "string (required, name of the template)",
"description": "string (optional, description of the template)",
"apiKey": "string (optional)"
}
入力例:
{
"name": "MyTemplate",
"description": "A reusable video template."
}
出力:
- 成功した場合はテンプレート ID を返します。
4. テンプレートの取得 (get_template)
json2video からテンプレートの詳細を取得します。
説明: テンプレートの名前から詳細を取得します。
入力スキーマ:
{
"name": "string (required, name of the template)",
"apiKey": "string (optional)"
}
入力例:
{
"name": "MyTemplate"
}
出力:
{
"updated_at": "YYYY-MM-DDTHH:MM:SSZ",
"created_at": "YYYY-MM-DDTHH:MM:SSZ",
"movie": "{\"id\":\"template1\",\"comment\":\"Example template\",\"resolution\":\"full-hd\",\"quality\":\"high\",\"scenes\":[{\"id\":\"scene1\",\"comment\":\"Scene 1\",\"elements\":[]}],\"elements\":[],\"width\":1920,\"height\":1080}",
"name": "MyTemplate",
"id": "MyTemplate_ID"
}
5. テンプレートの一覧表示 (list_templates)
json2video から利用可能なすべてのテンプレートを一覧表示します。
説明: ユーザーが利用可能なすべてのテンプレートを一覧表示します。
入力スキーマ:
{
"apiKey": "string (optional)"
}
入力例:
{
}
出力:
[
{
"updated_at": "YYYY-MM-DDTHH:MM:SSZ",
"created_at": "YYYY-MM-DDTHH:MM:SSZ",
"movie": "{\"id\":\"template1\",\"comment\":\"Example template\",\"resolution\":\"full-hd\",\"quality\":\"high\",\"scenes\":[{\"id\":\"scene1\",\"comment\":\"Scene 1\",\"elements\":[]}],\"elements\":[],\"width\":1920,\"height\":1080}",
"name": "MyTemplate1",
"id": "TEMPLATE_ID_1"
},
{
"updated_at": "YYYY-MM-DDTHH:MM:SSZ",
"created_at": "YYYY-MM-DDTHH:MM:SSZ",
"movie": "{\"id\":\"template2\",\"resolution\":\"instagram-story\",\"quality\":\"medium\",\"scenes\":[{\"id\":\"scene2\",\"comment\":\"Scene 2\",\"elements\":[]}],\"elements\":[],\"comment\":\"Another template\"}",
"name": "MyTemplate2",
"id": "TEMPLATE_ID_2"
}
]
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。