Skip to main content
Glama

Comfy AE Video Factory MCP

An MCP Server for AI short video automation pipelines: connecting ComfyUI image-to-image/image-to-video, FFmpeg post-processing, After Effects template packaging, review, and multi-platform publishing preparation.

Design Goal: Enable Cursor / Claude Desktop / ChatGPT MCP clients to call these tools to automatically complete the "Generate → Package → Review → Export → Publishing Package" workflow.

Capabilities

  • Invoke local or cloud ComfyUI workflows

  • Query ComfyUI task history

  • Analyze videos using FFprobe

  • Transcode, crop, extract frames, and concatenate using FFmpeg

  • Generate JSX scripts for automatic After Effects asset replacement

  • Invoke aerender to render After Effects templates

  • Create standardized video production task manifests

  • Generate publishing package configurations for Douyin / Xiaohongshu / Bilibili / YouTube Shorts / TikTok

  • Provide basic content review placeholder interfaces for future integration with third-party review APIs

Related MCP server: levea-mcp-server

Installation

npm install
npm run build

Running

npm start

Configuration in MCP Clients

{
  "mcpServers": {
    "comfy-ae-video-factory": {
      "command": "node",
      "args": ["/absolute/path/comfy-ae-video-factory-mcp/dist/index.js"],
      "env": {
        "COMFY_LOCAL_URL": "http://127.0.0.1:8188",
        "VIDEO_FACTORY_ROOT": "/absolute/path/workspace",
        "FFMPEG_BIN": "ffmpeg",
        "FFPROBE_BIN": "ffprobe",
        "AERENDER_BIN": "/Applications/Adobe After Effects 2025/aerender"
      }
    }
  }
}

Windows Example:

{
  "AERENDER_BIN": "C:\\Program Files\\Adobe\\Adobe After Effects 2025\\Support Files\\aerender.exe"
}
  1. pipeline_create_job to create production task directory and manifest

  2. comfy_submit_workflow to submit ComfyUI image-to-video workflow

  3. comfy_get_history to query results

  4. media_probe to check video specifications

  5. ffmpeg_transcode to unify aspect ratio, bitrate, and frame rate

  6. ae_generate_jsx to generate AE template replacement scripts

  7. ae_render_template to invoke aerender and output the final packaged video

  8. review_video_package for review placeholder

  9. platform_prepare_package to generate publishing packages for various platforms

AE Template Integration

It is recommended to pre-create these placeholder layers in your AE project:

  • {{MAIN_VIDEO}}

  • {{TITLE}}

  • {{SUBTITLE}}

  • {{LOGO}}

  • {{CTA}}

Then use the JSX generated by this project to replace assets and text, and output via aerender.

Security Notes

This MCP Server executes local commands, so the following restrictions are applied by default:

  • All input and output files must be within the VIDEO_FACTORY_ROOT directory

  • FFmpeg parameters are encapsulated via a whitelist rather than directly exposing arbitrary shell commands

  • AE rendering supports dryRun; it is recommended to test commands first

GitHub Upload

git init
git add .
git commit -m "init comfy ae video factory mcp"
git branch -M main
git remote add origin git@github.com:YOUR_NAME/comfy-ae-video-factory-mcp.git
git push -u origin main

Remarks

The official MCP TypeScript SDK supports creating servers, registering tools, and connecting to MCP clients via stdio or Streamable HTTP. This implementation uses stdio, which is suitable for local automation integration.

Available Tools

9 tools
ae_generate_jsxGenerate After Effects JSXB

Generate an ExtendScript JSX file that opens an AE template and replaces footage/text layers.

Inputs: projectPath (required), outputJsxPath (required), mainCompName, replacements, +2 more.

ae_render_templateRender After Effects TemplateB

Invoke aerender to render an AE comp. Use dryRun first to verify command.

Inputs: projectPath (required), compName (required), outputPath (required), aerenderBin, +1 more.

comfy_get_historyGet ComfyUI HistoryC

Read ComfyUI generation history by prompt id.

Inputs: promptId (required), target.

comfy_submit_workflowSubmit ComfyUI WorkflowB

Submit a ComfyUI workflow JSON to local or cloud ComfyUI /prompt endpoint.

Inputs: workflowPath (required), target, clientId, extraData.

ffmpeg_transcodeFFmpeg TranscodeC

Transcode or resize a video using safe preset options.

Inputs: inputPath (required), outputPath (required), aspect, fps, +4 more.

media_probeProbe Media FileB

Use ffprobe to inspect a video/audio/image file under VIDEO_FACTORY_ROOT.

Inputs: inputPath (required).

pipeline_create_jobCreate Video Factory JobC

Create a structured job folder and manifest for an AI video production pipeline.

Inputs: jobId (required), title (required), prompt (required), platforms, +2 more.

platform_prepare_packagePrepare Platform Publish PackageC

Generate publishing metadata for different short video platforms.

Inputs: jobId (required), finalVideoPath (required), title (required), platforms (required), +2 more.

review_video_packageReview Video PackageC

Basic placeholder review for video metadata. Replace with real moderation APIs later.

Inputs: title (required), videoPath (required), description, strict.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool clearly targets a distinct domain: AE scripts vs rendering, ComfyUI submission vs history, media probing vs transcoding, pipeline job creation, platform packaging, and review. No overlapping purposes.

    Naming Consistency4/5

    Names mostly follow a consistent verb_noun pattern with domain prefixes (ae_, comfy_, ffmpeg_, media_, pipeline_, platform_, review_). The only minor inconsistency is 'media_probe' which reverses the order (noun_verb) compared to others like 'ffmpeg_transcode'.

    Tool Count5/5

    9 tools cover the key operations for a video factory: AE template generation and rendering, ComfyUI workflow management, media processing, pipeline orchestration, and platform publishing. The count is well-scoped without unnecessary bloat.

    Completeness4/5

    Covers essential workflows: AE template manipulation, ComfyUI interaction, media transcoding/probing, pipeline job creation, and platform packaging. Minor gap: the review tool is a placeholder, and there is no explicit tool for asset management or user input validation, but core functionality is present.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers