CapCutAPIのロゴ

CapCutAPI

コミュニティ
fancyboi999

快速剪辑,供LLM使用剪映到MCP服务器

公開者fancyboi999
リポジトリcapcut-mcp
言語Python
フォーク
25
スター
95
利用可能なツール
0
通信方式streamable-http
カテゴリ
リンク
  • ツールをAIワークフローに接続

    CapCutAPIは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには95件のスターと25件のフォークがあります。

CapCutAPI

Open source CapCut API tool.

中文说明

Project Features

This project is a Python-based CapCut processing tool that offers the following core functionalities:

Core Features

  • Draft File Management: Create, read, modify, and save CapCut draft files
  • Material Processing: Support adding and editing various materials such as videos, audios, images, texts, stickers, etc.
  • Effect Application: Support adding multiple effects like transitions, filters, masks, animations, etc.
  • API Service: Provide HTTP API interfaces to support remote calls and automated processing
  • AI Integration: Integrate multiple AI services to support intelligent generation of subtitles, texts, and images

Main API Interfaces

  • /create_draft: Create a draft
  • /add_video: Add video material to the draft
  • /add_audio: Add audio material to the draft
  • /add_image: Add image material to the draft
  • /add_text: Add text material to the draft
  • /add_subtitle: Add subtitles to the draft
  • /add_effect: Add effects to materials
  • /add_sticker: Add stickers to the draft
  • /save_draft: Save the draft file

Configuration Instructions

Configuration File

The project supports custom settings through a configuration file. To use the configuration file:

  1. Copy config.json.example to config.json
  2. Modify the configuration items as needed
bash
cp config.json.example config.json

Environment Configuration

ffmpeg

This project depends on ffmpeg. You need to ensure that ffmpeg is installed on your system and added to the system's environment variables.

Python Environment

This project requires Python version 3.8.20. Please ensure that the correct version of Python is installed on your system.

Install Dependencies

Install the required dependency packages for the project:

bash
pip install -r requirements.txt

Run the Server

After completing the configuration and environment setup, execute the following command to start the server:

bash
python main.py

Once the server is started, you can access the related functions through the API interfaces.

Usage Examples

Adding a Video

python
import requests

response = requests.post("http://localhost:9000/add_video", json={
    "video_url": "http://example.com/video.mp4",
    "start": 0,
    "end": 10,
    "width": 1080,
    "height": 1920
})

print(response.json())

Adding Text

python
import requests

response = requests.post("http://localhost:9000/add_text", json={
    "text": "Hello, World!",
    "start": 0,
    "end": 3,
    "font": "Source Han Sans",
    "font_color": "#FF0000",
    "font_size": 30.0
})

print(response.json())

Saving a Draft

python
import requests

response = requests.post("http://localhost:9000/save_draft", json={
    "draft_id": "123456",
    "draft_folder": "your capcut draft folder"
})

print(response.json())

Copying the Draft to CapCut Draft Path

Calling save_draft will generate a folder starting with dfd_ in the current directory of the server. Copy this folder to the CapCut draft directory, and you will be able to see the generated draft.

Configure MCP

Configure MCP in Cursor. In the Cursor settings, add an MCP server with the address http://localhost:9000/mcp, and then you can use MCP in Cursor.

In the Claude configuration, add the following content:

json
{
    "mcpServers": {
        "capcut-mcp": {
            "type": "http",
            "url": "http://localhost:9000/mcp"
        }
    }
}

More Examples

Please refer to the example.py file in the project, which contains more usage examples such as adding audio and effects.

Project Features

  • Cross-platform Support: Supports both CapCut China version and CapCut International version
  • Automated Processing: Supports batch processing and automated workflows
  • Rich APIs: Provides comprehensive API interfaces for easy integration into other systems
  • Flexible Configuration: Achieve flexible function customization through configuration files
  • AI Enhancement: Integrate multiple AI services to improve video production efficiency

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "fancyboi999-capcut-mcp": {
      "command": "",
      "args": []
    }
  }
}

CapCutAPIのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度CapCutAPIに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、TypingMindでリモートホストされたMCPサーバーのURLを使って接続します。

MCPサーバーのURLを追加

CapCutAPIがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にお使いのサーバーURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にお使いのサーバーURLを貼り付けてください。
  2. CapCutAPIの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. CapCutAPIの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でCapCutAPIのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でCapCutAPIのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
CapCutAPIを使ってこのタスクを手伝ってもらえますか?
CapCutAPI
はい、読みました。
CapCutAPIで調べた結果をお伝えします。

よくある質問

CapCutAPI MCPサーバーは何に使いますか?

CapCutAPIは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでCapCutAPI MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでCapCutAPIを利用できます。

TypingMindでCapCutAPI MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。CapCutAPIを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

CapCutAPI MCPをTypingMindに接続するにはどうすればよいですか?

ホストされているCapCutAPIのMCPサーバーURLを追加すると、TypingMindに接続できます。TypingMindのワークスペースから利用できるリモートMCP接続が必要な場合に便利です。

TypingMindでCapCutAPI MCPのどのようなツールを利用できますか?

CapCutAPIはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

CapCutAPI MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。CapCutAPIで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇