Logo vun CapCutAPI

CapCutAPI

Communautéit
fancyboi999

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

Editeurfancyboi999
Repositorycapcut-mcp
SproochPython
Forks
25
Stären
95
Disponibel Tools
0
Transporttypstreamable-http
Kategorien
Linken
  • Tools mat KI-Workflows verbannen

    CapCutAPI stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    95 Stären an 25 Forks aus dem verlinkte Repository.

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

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

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

CapCutAPI MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal CapCutAPI verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun verbënnt sech an TypingMind iwwer d'URL vun engem gehoste MCP-Server.

Eng MCP-Server-URL derbäisetzen

Benotzt dës Optioun, wann CapCutAPI scho remote gehost gëtt oder Är Ekipp ee gemeinsame Connector wëllt, op dee méi Benotzer kënnen zougräifen.

1

MCP-Connectoren opmaachen

Gitt an TypingMind op „Plugins“, maacht „MCP-Connectoren“ op a wielt dann „URL derbäisetzen“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Gitt op „Plugins“.
  3. Maacht „MCP-Connectoren“ op.
  4. Klickt op „URL derbäisetzen“.
TypingMind-Formulaire fir eng benotzerdefinéiert MCP-Server-URL derbäizesetzen
2

D'Server-URL apeschen

Gitt Är Server-URL am Feld „Server-URL“ an. Setzt e Verbindungsnumm, eng Beschreiwung, e Symbol, benotzerdefinéiert HTTP-Headeren oder OAuth-Clientastellungen derbäi, wann de Server se erfuerdert.

  1. Pescht Är Server-URL an d'Feld „Server-URL“.
  2. Gitt en Numm fir d'Verbindung mat CapCutAPI an.
  3. Setzt eng Beschreiwung an e Symbol derbäi, fir d'Verbindung méi einfach erëmzeerkennen.
  4. Setzt benotzerdefinéiert HTTP-Headeren oder OAuth-Clientdetailer derbäi, wann de Server eng Authentifizéierung erfuerdert.
3

D'Verbindung erstellen

Klickt op „Verbindung erstellen“, gitt dann zeréck op d'Plugin-Lëscht a kontrolléiert, ob déi nei MCP-Verbindung aktiv ass.

  1. Klickt op „Verbindung erstellen“.
  2. Gitt zeréck op d'Lëscht vun de MCP-Connectoren.
  3. Kontrolléiert, ob d'Verbindung mat CapCutAPI als aktiv ugewise gëtt.
  4. Aktualiséiert d'Plugin-Lëscht, wann d'Verbindung net direkt ugewise gëtt.
4

Modeller wiesselen ouni nei ze verbannen

Start e Chat mat Ärem bevorzugte Modell, aktivéiert d'Tools vu CapCutAPI ënner „Plugins“ a wiesselt bei Bedarf op en anere Modell. D'MCP-Verbindung bleift am TypingMind-Aarbechtsberäich disponibel.

  1. Start en neie Chat an TypingMind.
  2. Wielt de KI-Modell, deen Dir benotze wëllt.
  3. Aktivéiert d'Tools vu CapCutAPI ënner „Plugins“.
  4. Biet de Modell, den Tool ze benotzen, wann néideg.
  5. Wiesselt op en anere KI-Modell a benotzt déiselwecht MCP-Verbindung weider.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat CapCutAPI?
CapCutAPI
Jo. Ech hunn et gelies.
Dat hunn ech mat CapCutAPI fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server CapCutAPI benotzt?

CapCutAPI ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech CapCutAPI MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir CapCutAPI mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat CapCutAPI MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann CapCutAPI verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech CapCutAPI MCP mat TypingMind?

Dir kënnt CapCutAPI mat TypingMind verbannen, andeems Dir d'URL vu sengem gehoste MCP-Server derbäisetzt. Dat ass nëtzlech, wann Dir eng Remote-MCP-Verbindung wëllt, déi aus Ärem TypingMind-Aarbechtsberäich disponibel ass.

Wéi eng Tools stellt CapCutAPI MCP an TypingMind zur Verfügung?

CapCutAPI stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir CapCutAPI MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann CapCutAPI eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇