Skip to main content
Glama

JianYing Bridge

安全地把一个紧凑的 JSON 剪辑计划编译成可继续编辑的剪映专业版草稿

A local Codex plugin and MCP server that compiles one compact JSON edit plan into a new, editable JianYing Pro draft.

非剪映官方项目。当前实机验证环境:macOS + 剪映专业版 11.4.2。

为什么做它

很多剪映自动化项目仍输出旧版 draft_content.json,或直接修改用户已有工程。JianYing Bridge 选择了更保守的边界:

  • 只创建新草稿,不覆盖、删除或修补现有草稿;

  • 先在沙盒生成并校验,再显式发布到剪映草稿库;

  • 视频、音频会复制进草稿自身,降低 macOS 权限和源文件移动导致的丢失风险;

  • 一次提交完整 manifest,避免“一个片段一次工具调用”的高频往返;

  • 全程使用本地素材和本机工具,本身不消耗图片/视频生成额度。

Related MCP server: capcut-mcp

已验证能力

  • 剪映专业版 11.4.2(macOS)可发现并打开生成的草稿;

  • 视频、BGM、中文字幕可正常进入时间线并播放;

  • 剪映打开后会将草稿迁移为原生 Timelines/project.json 布局;

  • 同名工程会被拒绝,绝不静默覆盖;

  • MCP stdio 初始化、工具发现和调用通过;

  • 5 项本地回归测试通过。

MCP 工具

工具

用途

jianying_doctor

检查剪映、草稿目录、FFmpeg 和安全边界

jianying_build_project

在沙盒目录新建可编辑草稿

jianying_validate_project

检查项目身份、时间线和本地素材引用

jianying_publish_project

将已校验的新草稿复制到剪映项目库

快速开始

依赖:macOS、剪映专业版 11.4.x、Python 3.11+、uv、FFmpeg/FFprobe。

git clone https://github.com/DeathKnight88/jianying-bridge.git
cd jianying-bridge
./scripts/launch_jianying_bridge

若作为 Codex 插件使用,可把仓库目录注册为本地插件源;.mcp.json 已配置好 stdio 服务入口。新安装的插件需要在新的 Codex 任务中加载。

Manifest 示例

{
  "version": 1,
  "project": {
    "name": "My_New_Project",
    "width": 1920,
    "height": 1080,
    "fps": 30
  },
  "video": [
    {
      "path": "/absolute/path/clip.mp4",
      "start": 0,
      "source_start": 0,
      "duration": 3,
      "track": "VideoTrack",
      "transition": {"name": "叠化", "duration": 0.3}
    }
  ],
  "audio": [
    {
      "path": "/absolute/path/music.mp3",
      "start": 0,
      "duration": 3,
      "track": "BGM",
      "volume": 0.2
    }
  ],
  "text": [
    {
      "content": "字幕",
      "start": 0,
      "duration": 3,
      "track": "Subtitles"
    }
  ]
}

时间单位统一为秒。相对素材路径以 manifest 所在目录为基准。完整模板见 assets/example-manifest.json

推荐工作流

本地素材
  → FFprobe / Whisper / BaoCut / auto-editor(可选)
  → 一份 edit manifest
  → JianYing Bridge 沙盒生成 + 校验
  → 发布到剪映
  → 人工预览与导出

桥接器只负责执行已经确定的剪辑计划。转写、脚本判断、镜头选择等工作建议在生成 manifest 前一次性完成。

当前限制

  • v0.1 仅支持新建草稿,不编辑剪映 11.x 已有加密工程;

  • 发布时要求剪映主进程关闭,避免项目索引并发写入;

  • 最终预览和导出仍需在剪映中完成;

  • 当前只在 macOS 剪映专业版 11.4.2 做过端到端验证;Windows 和其他版本欢迎测试反馈;

  • 剪映内部格式属于非公开实现,版本升级可能导致兼容性变化。

开发与验证

uv run --with pytest pytest -q tests
uv run --with pyyaml python /path/to/plugin-creator/scripts/validate_plugin.py .

第三方代码

运行时包含经过固定版本的 luoluoluo22/jianying-editor-skill 与其内嵌的 pyJianYingDraft。许可证和修改说明见 THIRD_PARTY_NOTICES.md

License

项目自身代码使用 MIT License。第三方代码继续遵循各自的 MIT 或 Apache-2.0 许可证。

“剪映”及相关商标归其权利人所有。本项目与字节跳动或剪映官方无隶属、授权或背书关系。

Available Tools

4 tools
jianying_build_projectB

Compile one version-1 edit manifest into a NEW editable draft in a sandbox output root.

ParametersJSON Schema
NameRequiredDescriptionDefault
output_rootYes
manifest_pathYes

TDQS

B3.4/5.0
Behavior3/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 that a new editable draft is created in a sandbox, implying non-destructive behavior and isolation. However, it does not mention side effects like overwriting existing outputs, required permissions, or reversibility, leaving gaps.

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 with no fluff. It conveys the core action and destination efficiently, making it easy to scan.

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?

The description is too minimal for a build tool with no annotations or output schema. It omits return values, error conditions, and the relationship to sibling tools. An agent lacks enough context to know when to invoke it in a workflow or what to expect as a result.

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 coverage is 0%, so the description must compensate. It implies that manifest_path is the input manifest and output_root is the destination, adding meaning beyond bare parameter names. Yet it does not explain parameter formats, constraints, or how they interact, leaving some ambiguity.

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: compile a version-1 edit manifest into a new editable draft in a sandbox output root. It names the resource, the transformation, and the destination, which distinguishes it from siblings like validate, publish, or doctor.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus its siblings. It does not mention alternatives, prerequisites, or any conditions for selection. An agent would have to infer usage from the verb 'build' without explicit direction.

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

jianying_doctorC

Check JianYing Pro, draft-root, FFmpeg, and the create-new safety boundary.

ParametersJSON Schema
NameRequiredDescriptionDefault
drafts_rootNo

TDQS

C2.8/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 of behavioral disclosure. It only says 'Check', which implies a non-mutating operation, but it does not explicitly state that it is read-only, describe side effects, return value, or required permissions. Critical gaps for a diagnostic tool.

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 concise sentence, front-loaded with the verb 'Check', and contains zero filler. Every word contributes to listing the checked items, though those items could be clearer.

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?

There is no output schema, so the description should explain what the tool returns or what 'checking' produces (e.g., a report, success/failure). The phrase 'create-new safety boundary' is obscure and not explained. For a diagnostic tool, the absence of result/return information is a major 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%, so the description must compensate for the undocumented parameter. It mentions 'draft-root' as one of the check items, linking it to the drafts_root parameter, but does not explain expected values, the meaning of null/default, or how the parameter affects the check. The optional nature is left unexplained.

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

Purpose4/5

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

The description uses a specific verb ('Check') and names distinct resources (JianYing Pro, draft-root, FFmpeg, create-new safety boundary), which separates it from the sibling build/validate/publish tools by implying a diagnostic role. However, it does not specify what kind of checks are performed (e.g., version, availability, config), leaving some ambiguity.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus the sibling tools. The name 'doctor' hints at troubleshooting, but the description provides no usage scenarios, prerequisites, or exclusions. No mention of when to prefer this over validate or build.

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

jianying_publish_projectA

Copy a validated NEW draft into JianYing's library. Refuses overwrite and requires JianYing closed.

ParametersJSON Schema
NameRequiredDescriptionDefault
drafts_rootNo
project_pathYes

TDQS

A3.7/5.0
Behavior3/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 two important behaviors: it refuses overwrite and requires JianYing closed. However, it doesn't mention what happens on failure (e.g., error if JianYing is open), whether it modifies the draft, or any side effects beyond copying. The disclosed behaviors are useful but not comprehensive.

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?

Two short sentences with no filler. The key constraints ('Refuses overwrite', 'requires JianYing closed') are front-loaded and every word earns its place.

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 2 params, no output schema, and no annotations, the description covers the core purpose and two critical constraints. However, it lacks details on parameter semantics (especially 'drafts_root'), error behavior, and what 'validated' means in practice. It's adequate but not complete.

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 doesn't explain the parameters at all: 'project_path' and 'drafts_root' are only defined by their names and types. The description's mention of 'draft' and 'library' gives some context, but it doesn't clarify what 'drafts_root' means or how it relates to 'project_path'. This is a gap, but the parameter names are fairly self-explanatory.

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

Purpose4/5

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

The description states a specific verb ('Copy'), a resource ('validated NEW draft'), and a destination ('JianYing's library'), which clearly distinguishes it from siblings like jianying_validate_project and jianying_build_project. It also adds a key constraint ('Refuses overwrite'), making the purpose more precise. However, it doesn't explicitly name the sibling it differs from, so it's not a 5.

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 implies when to use this tool: after validation ('validated NEW draft') and before publishing, and it gives a clear exclusion ('Refuses overwrite'). It also states a prerequisite ('requires JianYing closed'). It doesn't explicitly name alternatives like jianying_build_project, but the context is clear enough for an agent to select it.

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

jianying_validate_projectC

Validate draft identity, timeline, materials, and local file references.

ParametersJSON Schema
NameRequiredDescriptionDefault
project_pathYes

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description must disclose behavior itself, but it only states that validation occurs. It does not say whether the tool is read-only, whether it modifies files, what happens on invalid references, or what success/failure looks like. This is a significant gap for a validation tool with no output schema.

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

Conciseness3/5

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

The description is very concise and front-loaded, with no wasted words. However, it may be overly terse, omitting important behavioral and usage context that an agent would need to invoke the tool correctly.

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?

For a validation tool with one undocumented parameter, no annotations, and no output schema, this description is incomplete. It lacks return value expectations, failure semantics, and when-to-use guidance. An agent cannot tell what a successful validation looks like or how to interpret the result.

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 explain what project_path should point to, what format it must be in, or how it relates to the draft/timeline/materials. The phrase 'local file references' hints that a local project file is targeted, but that is not enough to compensate for the missing schema documentation.

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

Purpose4/5

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

The description uses a specific verb ('Validate') and names concrete resources ('draft identity, timeline, materials, and local file references'), which distinguishes it from build/publish/doctor siblings. However, 'draft identity' is somewhat ambiguous, so it does not fully reach the 5-level of precision.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus jianying_doctor, jianying_build_project, or jianying_publish_project. No prerequisites, ordering, or exclusions are mentioned; an agent must infer that validation fits before build/publish.

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.

  1. 4 tool updatesv0.1.0
    • First observedjianying_build_project
    • First observedjianying_doctor
    • First observedjianying_publish_project
    • First observedjianying_validate_project

TDQS

A3.5/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct stage: environment check, build, validate, and publish. No overlap in purpose or output.

Naming Consistency5/5

All names use the consistent prefix jianying_ followed by a clear action (doctor, build, validate, publish). Style is uniform and predictable.

Tool Count5/5

Four tools form a tight, well-scoped lifecycle for the server's purpose: checking prerequisites, building, validating, and publishing drafts. No redundancy or bloat.

Completeness5/5

The domain is a build-and-publish bridge for JianYing drafts. The four tools cover the full pipeline from environment check to final publication, with no obvious missing operations.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers