Skip to main content
Glama

剪映 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/:可复用 Skill

  • docs/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,也可使用 ssestreamable-http

  • JIANYING_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_CRYPTOJIANYING_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 tools
analyze_reference_draftA

读取一个明文参考草稿并提取剪辑蓝图。加密草稿会明确拒绝,不会猜测内容。

ParametersJSON Schema
NameRequiredDescriptionDefault
draft_nameYes
include_textNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It adds behavioral context by stating encrypted drafts are explicitly rejected and that it won't guess content, which is useful. However, it does not disclose whether the operation is read-only or any side effects, though 'extract' implies non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main purpose, and adds a concise behavioral note about encryption. There is no wasteful content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with only two parameters and an output schema, the description covers the core functionality and an edge case (encryption), but lacks parameter semantics and does not clarify how the output blueprint is structured or used. The output schema exists, so not all return details are needed, but the missing parameter guidance leaves a notable gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not compensate. It does not explain the parameters beyond the action, especially include_text, which is boolean with a default but no meaning. The description adds no value for understanding what inputs are needed or how they affect output.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb and resource: 'read a plaintext reference draft and extract an editing blueprint.' It distinguishes itself from sibling tools like build_from_reference by focusing on analysis rather than construction, and from build_draft/batch_from_template by targeting reference drafts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for plaintext drafts and explicitly rejects encrypted drafts, but does not provide explicit 'when to use' or 'when not to use' guidance, nor does it name alternatives. The context from sibling tools suggests a workflow, but the description alone doesn't explain when to choose this over other tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

batch_from_templateB

基于一个明文模板批量生成草稿。每个 job 包含 name、replacements、text_replacements。

ParametersJSON Schema
NameRequiredDescriptionDefault
jobsYes
dry_runNo
template_draftYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It mentions that drafts are generated (a mutating action) but does not disclose side effects, whether dry_run exists or defaults to true, permission requirements, output details, or reversibility. The description is thin on behavioral transparency beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two short sentences front-load the purpose and job structure. Every phrase adds value without unnecessary detail or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 params, generation of multiple drafts, no annotations), the description is insufficient. It omits key context such as dry_run behavior, output format, and when to use batch versus single-draft tools. The presence of an output schema is not leveraged since the description doesn't reference it, and the tool's success criteria remain ambiguous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does add meaning by specifying that each job contains 'name, replacements, text_replacements', which clarifies the jobs array, and 'plaintext template' clarifies template_draft. However, it leaves dry_run unexplained and doesn't define the replacement fields fully, so compensation is partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('batch generate drafts') on a specific resource ('drafts') based on a 'plaintext template'. It also explains the structure of each job (name, replacements, text_replacements), which distinguishes it from sibling tools like build_draft (single) or build_from_reference (reference-based).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for batch generation from a template via the word 'batch', but it does not explicitly say when to use this tool versus alternatives. No exclusions or comparison with siblings are provided; the guidance is inferred rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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 发布到剪映草稿目录。

ParametersJSON Schema
NameRequiredDescriptionDefault
dry_runNo
manifestYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the two-phase build/validate-then-publish behavior and mentions that dry_run only operates in the staging area. It could elaborate on side effects like overwriting or validation failure handling, but it goes beyond a bare 'build' statement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured, starting with the primary purpose followed by a formatted manifest outline and usage note. It is slightly long but each section adds value without unnecessary padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has a complex nested manifest, but the description covers the main structure and field behaviors, and references an external schema for full details. The presence of an output schema reduces the need to describe return values. It is complete enough for initial selection and invocation, though not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the manifest structure (draft, tracks, srt_imports), supported track types, time fields (start/duration), and media fields (source_start/source_duration/speed). dry_run is also clearly described. Detailed fields are delegated to manifest-schema.md, which is reasonable, but not all parameter semantics are fully specified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '生成新草稿' (generate a new draft) from a compact edit list. It provides a detailed manifest structure, including tracks, types, and dry-run behavior, which distinguishes it from sibling tools like batch_from_template and build_from_reference that likely operate from templates or existing drafts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear usage context: dry_run defaults to true for building/validating in a staging area, and setting it to false publishes to the draft directory. It does not explicitly compare to siblings or state when NOT to use it, but the workflow is well defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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?}。

ParametersJSON Schema
NameRequiredDescriptionDefault
dry_runNo
replacementsNo
new_draft_nameYes
reference_draftYes
text_replacementsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It describes the copy-and-replace behavior and the shape of replacements, but does not disclose side effects (e.g., whether an existing draft with new_draft_name is overwritten), the exact effect of dry_run, or any permission requirements. This is a mutation-like operation, yet key behavioral details are omitted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the main purpose, followed by compact item structures. Every sentence delivers essential information without redundancy. The structure is easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 params, nested replacement objects) and no annotations, the description covers the replacement semantics well but omits usage guidelines and the behavior of dry_run. The output schema likely documents return values, so that gap is covered elsewhere. Overall, it's adequate but with clear gaps in guidance and edge-case behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides zero descriptions and defines replacements/text_replacements merely as arrays of objects with additionalProperties. The description compensates by defining the exact fields for each replacement item (e.g., track_type, segment_index, source, source_start?, source_duration?) and text replacement fields. This is essential for correct invocation. Other params like reference_draft and new_draft_name are self-evident, but dry_run is not explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool copies the editing blueprint of a readable reference draft and replaces materials/text by track and segment index. It uses specific verbs (copy, replace) and identifies the resource (reference draft), distinguishing it from siblings like build_draft or batch_from_template.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage context is implied: use this tool when you need to create a new draft based on a reference draft with replacements. However, there is no explicit guidance on when to choose this over sibling tools like build_draft or batch_from_template, nor any exclusions or prerequisites beyond 'readable'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_jianying_capabilitiesA

返回已验证、禁用和首版未纳入的能力,并检测本机剪映版本。规划前必须调用。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It transparently discloses the tool's outputs (verified, disabled, and not-in-first-version capabilities) and the version detection, implying a read-only check. It does not explicitly state whether it has side effects or requires specific permissions, but the verb '返回' suggests a safe query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently conveys the output categories, the version detection, and a critical usage directive. No words are wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and the presence of an output schema, the description adequately covers what the tool does and when to call it. The explicit 'must call before planning' instruction is an important contextual signal that makes the tool complete for an agent's planning workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema is an empty object. The description adds meaning by explaining what the tool returns and the prerequisite status, which is more than the schema alone provides. The baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns three categories of capabilities (verified, disabled, and not-in-first-version) and detects the local version, using a specific verb (返回) and resource (能力). It distinguishes itself from sibling tools, which focus on draft creation and templating.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit usage directive: 'must be called before planning', making it clear when this tool is a prerequisite. It does not mention alternatives or when not to use it, so it stops short of full exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedanalyze_reference_draft
    • First observedbatch_from_template
    • First observedbuild_draft
    • First observedbuild_from_reference
    • First observedget_jianying_capabilities

TDQS

A3.9/5.0
Disambiguation4/5

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.

Naming Consistency3/5

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'.

Tool Count5/5

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.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xanthus-Sanslab/jianying-ai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server