jianying-ai-mcp
This server lets you programmatically inspect, generate, and batch-produce Jianying (CapCut) video drafts through MCP.
get_jianying_capabilities: Check the installed Jianying version and available/verified/disabled capabilities before planning.analyze_reference_draft: Read a plaintext draft and extract its editing blueprint; encrypted drafts are explicitly rejected.build_draft: Create a new draft from a compact manifest with tracks (video/audio/text/sticker/effect/filter), media timings, and optional SRT imports; dry-run by default.build_from_reference: Clone a reference draft's blueprint and replace media or text by track and segment index into a new draft.batch_from_template: Generate multiple drafts from one plaintext template using per-job replacements and text replacements.All build tools support
dry_runto validate in a staging area before publishing and avoid overwriting same-name drafts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jianying-ai-mcp 使用参考草稿模板,替换图片和文字,批量生成3份不同尺寸的草稿"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
剪映 AI 编辑 MCP + Skill
自然语言剪辑规划、视频观察与草稿执行相互分离:视频观察器负责本地元数据、字幕和代表帧;Skill 负责需求引导、画面理解与紧凑编辑清单;MCP 负责确定性生成、参考草稿复用、批量换料、安全校验和本地阶段进度。
验证基线:剪映专业版 10.0.5.13816、pyJianYingDraft 0.3.0、MCP Python SDK 1.29.0。
目录
src/jianying_ai_mcp/:批处理 MCP 服务skills/jianying-ai-editor/:可复用 Skilldocs/capability_matrix.md:完整测试结论configs/:客户端配置样例tests/:从零生成、参考复用、批量换料及安全边界测试
Related MCP server: capcut-mcp
MCP 工具
get_jianying_capabilities:版本、能力与限制analyze_reference_draft:从明文或本机可解密草稿提取剪辑蓝图build_draft:一次提交编辑清单,从零生成草稿build_from_reference:复制蓝图并按轨道/片段换料换字batch_from_template:一个模板批量生成多份草稿analyze_video_source:提取带时间戳字幕和代表帧,支持缓存与局部复查save_video_observations:保存 Agent 实际读取代表帧后的结构化理解get_video_analysis_context:按时间范围和页码读取长字幕与缓存上下文
工具默认 dry_run=true,会在项目暂存区完整生成和校验,但不发布到剪映目录。正式发布不会覆盖同名草稿。
启动
Python 3.12:
py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .需要分析在线视频时改用 -e ".[video-url]"。本地视频只需要系统已有的 ffmpeg/ffprobe,不需要 yt-dlp。
Skill 可从仓库安装到支持 Agent Skills 的客户端:
npx skills add . -g然后按客户端使用 MCP 配置样例。
启动服务:
.\.venv\Scripts\python.exe -m jianying_ai_mcp服务使用 stdio MCP;普通日志不写 stdout。客户端支持时会显示 [阶段] 日志和 progress,其他客户端仍可从返回值的 stages 查看阶段。
环境变量
JIANYING_DRAFT_ROOT:剪映草稿根目录JIANYING_MCP_WORK_ROOT:暂存和参考蓝图目录JIANYING_EXE:剪映程序路径,用于检测版本JIANYING_DRAFT_CRYPTO:可选的jy-draftc.exe兼容读取器;启用加密草稿学习/复制JIANYING_MCP_TRANSPORT:默认stdio,也可使用sse或streamable-httpJIANYING_FFMPEG/JIANYING_FFPROBE:视频观察器使用的可执行文件JIANYING_YT_DLP:可选,仅 URL 输入需要GROQ_API_KEY/OPENAI_API_KEY:可选,仅无字幕时的 Whisper 转写需要
ffmpeg/ffprobe 可从 PATH 自动发现,也可通过环境变量显式配置。视频和画面始终留在本机;只有无字幕且启用 Whisper API 时会上传压缩音频。
加密草稿读取
剪映保存后的 draft_content.json 可能是加密文本。0.3 通过已审计的 MIT 开源 jy-draftc 接口调用本机剪映目录中的 videoeditor.dll,支持分析、参考复制和批量换料。读取时会先复制到一次性工作目录,解密结果用完即删,绝不原地改写参考草稿。
仓库包含最小读取器源码 native/jy_draft_crypto.cpp,可用 MinGW-w64 执行 g++ -std=c++17 -O2 -municode -static -o jy-draftc.exe native/jy_draft_crypto.cpp 构建。随后配置 JIANYING_DRAFT_CRYPTO;JIANYING_EXE 必须指向同一套剪映安装。先调用 get_jianying_capabilities,确认 encrypted_draft_reader.available=true 再读取加密草稿。
视频理解
推荐先调用 analyze_video_source(detail="efficient", max_frames=24~40) 粗看。Agent 必须实际读取返回的代表帧后,才能调用 save_video_observations 声称理解画面。长视频先读字幕定位,再对候选区间用 start/end 局部复查,避免一次输入大量图片。
当前为语句级字幕时间戳,不是逐字强制对齐;代表帧也不是完整逐帧视频流。快动作、口型级同步、音乐节拍仍需专用分析器。
配置格式见 OpenCode 配置 和 通用 stdio 配置。
验证
.\.venv\Scripts\python.exe -m unittest discover -s tests -v测试前可使用 测试与反馈清单。
当前边界
当前不自动操作剪映内置音乐/音效库、TTS、节拍卡点和自动导出。独立视频观察器已支持旁挂字幕及可选 Whisper 语句级转写,但不等同于剪映内置字幕识别。蒙版、模糊背景及音量关键帧因当前版本实测不稳定而被显式拒绝。参考草稿支持明文 JSON;配置本地读取器后也支持有权访问的剪映加密草稿。
第三方许可说明见 THIRD_PARTY_NOTICES.md。
每次工具调用都返回版本兼容提示。若剪映版本与 10.0.5.13816 不同,客户端必须向用户说明预设、在线资源和草稿结构可能变化,并先生成小样抽检。
Available Tools
5 toolsanalyze_reference_draftA
读取一个明文参考草稿并提取剪辑蓝图。加密草稿会明确拒绝,不会猜测内容。
Inputs: draft_name (required), include_text. Returns: object
batch_from_templateB
基于一个明文模板批量生成草稿。每个 job 包含 name、replacements、text_replacements。
Inputs: jobs (required), template_draft (required), dry_run. Returns: object
build_draftA
一次提交紧凑编辑清单并生成新草稿。
manifest 结构:
draft: {name, width?, height?, fps?}
tracks: [{type, name, segments:[...]}]
srt_imports?: [{source, track_name?, style?, clip?}]
轨道 type 支持 video/audio/text/sticker/effect/filter。时间字段使用 start、duration; 媒体可加 source_start/source_duration、speed。具体字段见 Skill 的 manifest-schema.md。 默认 dry_run=true,只在暂存区完整构建和校验;确认后传 false 发布到剪映草稿目录。
Inputs: manifest (required), dry_run. Returns: object
build_from_referenceA
复制可读参考草稿的剪辑蓝图,并按轨道与片段下标替换素材或文本。
replacements 项:{track_type, track_name? 或 track_index?, segment_index, source, source_start?, source_duration?}。text_replacements 项:{track_name? 或 track_index?, segment_index, text, recalc_style?}。
Inputs: new_draft_name (required), reference_draft (required), dry_run, replacements, +1 more. Returns: object
get_jianying_capabilitiesA
返回已验证、禁用和首版未纳入的能力,并检测本机剪映版本。规划前必须调用。
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have clear, distinct purposes: capability discovery, analysis, single build, batch build, and reference-based build. However, analyze_reference_draft and build_from_reference both involve reference drafts and could be confused in some workflows, though descriptions clarify their different roles.
Tool names are snake_case and mostly descriptive, but the pattern is inconsistent. 'get_', 'analyze_', and 'build_' are clear verbs, while 'batch_from_template' lacks a strong verb prefix, and 'build_from_reference' introduces a prepositional modifier absent in 'build_draft'.
With 5 tools, the server is well-scoped for its purpose of generating Jianying drafts through various methods. Each tool addresses a distinct need without redundancy or excessive breadth, fitting comfortably within the ideal 3-15 range.
The tool set covers the core workflow of understanding capabilities, analyzing references, and building drafts from manifests, templates, or references. Minor gaps exist such as no explicit tool for updating or deleting existing drafts, but these are likely outside the server's intended generation-focused scope.
Maintenance
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Kling AI video generation
AI video generation MCP server for Kling, MiniMax, Luma & Hunyuan with prompt blueprints.
MCP server for Wan AI video generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides MCP servers for AI-driven video editing. Enables offline editing of CapCut drafts and remote control of Adobe Premiere Pro via UXP plugin, with shared media analysis for beat detection and transcription.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to automate CapCut Pro video editing, including creating drafts, adding media, text, effects, and keyframes, with support for both local and remote connections.11MIT
- FlicenseNot gradedqualityCmaintenanceMCP server enabling AI agents to generate AI videos and images, analyze video content, and download videos from Douyin and Xiaohongshu.-
- AlicenseAqualityCmaintenanceMCP server for generating images and videos using Volcengine's Jimeng APIs, supporting text-to-image, image-to-image, multi-image fusion, text-to-video, and image-to-video.31MIT