@studiomeyer/mcp-video 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  3. package/.github/workflows/ci.yml +34 -0
  4. package/CHANGELOG.md +24 -0
  5. package/CONTRIBUTING.md +75 -0
  6. package/LICENSE +21 -0
  7. package/README.md +198 -0
  8. package/USAGE.md +144 -0
  9. package/dist/handlers/capcut.d.ts +6 -0
  10. package/dist/handlers/capcut.js +229 -0
  11. package/dist/handlers/capcut.js.map +1 -0
  12. package/dist/handlers/editing.d.ts +6 -0
  13. package/dist/handlers/editing.js +242 -0
  14. package/dist/handlers/editing.js.map +1 -0
  15. package/dist/handlers/index.d.ts +2 -0
  16. package/dist/handlers/index.js +33 -0
  17. package/dist/handlers/index.js.map +1 -0
  18. package/dist/handlers/post-production.d.ts +5 -0
  19. package/dist/handlers/post-production.js +109 -0
  20. package/dist/handlers/post-production.js.map +1 -0
  21. package/dist/handlers/smart-screenshot.d.ts +5 -0
  22. package/dist/handlers/smart-screenshot.js +83 -0
  23. package/dist/handlers/smart-screenshot.js.map +1 -0
  24. package/dist/handlers/tts.d.ts +5 -0
  25. package/dist/handlers/tts.js +83 -0
  26. package/dist/handlers/tts.js.map +1 -0
  27. package/dist/handlers/video.d.ts +5 -0
  28. package/dist/handlers/video.js +127 -0
  29. package/dist/handlers/video.js.map +1 -0
  30. package/dist/lib/dual-transport.d.ts +42 -0
  31. package/dist/lib/dual-transport.js +208 -0
  32. package/dist/lib/dual-transport.js.map +1 -0
  33. package/dist/lib/logger.d.ts +12 -0
  34. package/dist/lib/logger.js +42 -0
  35. package/dist/lib/logger.js.map +1 -0
  36. package/dist/lib/types.d.ts +16 -0
  37. package/dist/lib/types.js +15 -0
  38. package/dist/lib/types.js.map +1 -0
  39. package/dist/schemas/capcut.d.ts +608 -0
  40. package/dist/schemas/capcut.js +411 -0
  41. package/dist/schemas/capcut.js.map +1 -0
  42. package/dist/schemas/editing.d.ts +822 -0
  43. package/dist/schemas/editing.js +466 -0
  44. package/dist/schemas/editing.js.map +1 -0
  45. package/dist/schemas/index.d.ts +2366 -0
  46. package/dist/schemas/index.js +15 -0
  47. package/dist/schemas/index.js.map +1 -0
  48. package/dist/schemas/post-production.d.ts +379 -0
  49. package/dist/schemas/post-production.js +268 -0
  50. package/dist/schemas/post-production.js.map +1 -0
  51. package/dist/schemas/smart-screenshot.d.ts +127 -0
  52. package/dist/schemas/smart-screenshot.js +122 -0
  53. package/dist/schemas/smart-screenshot.js.map +1 -0
  54. package/dist/schemas/tts.d.ts +220 -0
  55. package/dist/schemas/tts.js +194 -0
  56. package/dist/schemas/tts.js.map +1 -0
  57. package/dist/schemas/video.d.ts +236 -0
  58. package/dist/schemas/video.js +210 -0
  59. package/dist/schemas/video.js.map +1 -0
  60. package/dist/server.d.ts +11 -0
  61. package/dist/server.js +239 -0
  62. package/dist/server.js.map +1 -0
  63. package/dist/server.test.d.ts +1 -0
  64. package/dist/server.test.js +87 -0
  65. package/dist/server.test.js.map +1 -0
  66. package/dist/tools/engine/audio-mixer.d.ts +40 -0
  67. package/dist/tools/engine/audio-mixer.js +169 -0
  68. package/dist/tools/engine/audio-mixer.js.map +1 -0
  69. package/dist/tools/engine/audio.d.ts +22 -0
  70. package/dist/tools/engine/audio.js +73 -0
  71. package/dist/tools/engine/audio.js.map +1 -0
  72. package/dist/tools/engine/beat-sync.d.ts +31 -0
  73. package/dist/tools/engine/beat-sync.js +270 -0
  74. package/dist/tools/engine/beat-sync.js.map +1 -0
  75. package/dist/tools/engine/capture.d.ts +12 -0
  76. package/dist/tools/engine/capture.js +290 -0
  77. package/dist/tools/engine/capture.js.map +1 -0
  78. package/dist/tools/engine/chroma-key.d.ts +27 -0
  79. package/dist/tools/engine/chroma-key.js +154 -0
  80. package/dist/tools/engine/chroma-key.js.map +1 -0
  81. package/dist/tools/engine/concat.d.ts +49 -0
  82. package/dist/tools/engine/concat.js +149 -0
  83. package/dist/tools/engine/concat.js.map +1 -0
  84. package/dist/tools/engine/cursor.d.ts +26 -0
  85. package/dist/tools/engine/cursor.js +185 -0
  86. package/dist/tools/engine/cursor.js.map +1 -0
  87. package/dist/tools/engine/easing.d.ts +15 -0
  88. package/dist/tools/engine/easing.js +100 -0
  89. package/dist/tools/engine/easing.js.map +1 -0
  90. package/dist/tools/engine/editing.d.ts +158 -0
  91. package/dist/tools/engine/editing.js +541 -0
  92. package/dist/tools/engine/editing.js.map +1 -0
  93. package/dist/tools/engine/encoder.d.ts +31 -0
  94. package/dist/tools/engine/encoder.js +154 -0
  95. package/dist/tools/engine/encoder.js.map +1 -0
  96. package/dist/tools/engine/index.d.ts +30 -0
  97. package/dist/tools/engine/index.js +23 -0
  98. package/dist/tools/engine/index.js.map +1 -0
  99. package/dist/tools/engine/lut-presets.d.ts +25 -0
  100. package/dist/tools/engine/lut-presets.js +141 -0
  101. package/dist/tools/engine/lut-presets.js.map +1 -0
  102. package/dist/tools/engine/narrated-video.d.ts +63 -0
  103. package/dist/tools/engine/narrated-video.js +163 -0
  104. package/dist/tools/engine/narrated-video.js.map +1 -0
  105. package/dist/tools/engine/scenes.d.ts +17 -0
  106. package/dist/tools/engine/scenes.js +223 -0
  107. package/dist/tools/engine/scenes.js.map +1 -0
  108. package/dist/tools/engine/smart-screenshot.d.ts +80 -0
  109. package/dist/tools/engine/smart-screenshot.js +744 -0
  110. package/dist/tools/engine/smart-screenshot.js.map +1 -0
  111. package/dist/tools/engine/social-format.d.ts +66 -0
  112. package/dist/tools/engine/social-format.js +107 -0
  113. package/dist/tools/engine/social-format.js.map +1 -0
  114. package/dist/tools/engine/template-renderer.d.ts +45 -0
  115. package/dist/tools/engine/template-renderer.js +233 -0
  116. package/dist/tools/engine/template-renderer.js.map +1 -0
  117. package/dist/tools/engine/templates.d.ts +87 -0
  118. package/dist/tools/engine/templates.js +272 -0
  119. package/dist/tools/engine/templates.js.map +1 -0
  120. package/dist/tools/engine/text-animations.d.ts +33 -0
  121. package/dist/tools/engine/text-animations.js +192 -0
  122. package/dist/tools/engine/text-animations.js.map +1 -0
  123. package/dist/tools/engine/text-overlay.d.ts +27 -0
  124. package/dist/tools/engine/text-overlay.js +84 -0
  125. package/dist/tools/engine/text-overlay.js.map +1 -0
  126. package/dist/tools/engine/tts.d.ts +54 -0
  127. package/dist/tools/engine/tts.js +186 -0
  128. package/dist/tools/engine/tts.js.map +1 -0
  129. package/dist/tools/engine/types.d.ts +166 -0
  130. package/dist/tools/engine/types.js +13 -0
  131. package/dist/tools/engine/types.js.map +1 -0
  132. package/dist/tools/engine/voice-effects.d.ts +18 -0
  133. package/dist/tools/engine/voice-effects.js +215 -0
  134. package/dist/tools/engine/voice-effects.js.map +1 -0
  135. package/dist/tools/index.d.ts +32 -0
  136. package/dist/tools/index.js +23 -0
  137. package/dist/tools/index.js.map +1 -0
  138. package/package.json +56 -0
  139. package/scripts/check-deps.js +39 -0
  140. package/src/handlers/capcut.ts +245 -0
  141. package/src/handlers/editing.ts +260 -0
  142. package/src/handlers/index.ts +34 -0
  143. package/src/handlers/post-production.ts +136 -0
  144. package/src/handlers/smart-screenshot.ts +86 -0
  145. package/src/handlers/tts.ts +103 -0
  146. package/src/handlers/video.ts +137 -0
  147. package/src/lib/dual-transport.ts +272 -0
  148. package/src/lib/logger.ts +59 -0
  149. package/src/lib/types.ts +25 -0
  150. package/src/schemas/capcut.ts +418 -0
  151. package/src/schemas/editing.ts +476 -0
  152. package/src/schemas/index.ts +15 -0
  153. package/src/schemas/post-production.ts +273 -0
  154. package/src/schemas/smart-screenshot.ts +122 -0
  155. package/src/schemas/tts.ts +197 -0
  156. package/src/schemas/video.ts +211 -0
  157. package/src/server.test.ts +99 -0
  158. package/src/server.ts +289 -0
  159. package/src/tools/engine/audio-mixer.ts +244 -0
  160. package/src/tools/engine/audio.ts +115 -0
  161. package/src/tools/engine/beat-sync.ts +356 -0
  162. package/src/tools/engine/capture.ts +360 -0
  163. package/src/tools/engine/chroma-key.ts +202 -0
  164. package/src/tools/engine/concat.ts +242 -0
  165. package/src/tools/engine/cursor.ts +222 -0
  166. package/src/tools/engine/easing.ts +120 -0
  167. package/src/tools/engine/editing.ts +809 -0
  168. package/src/tools/engine/encoder.ts +208 -0
  169. package/src/tools/engine/index.ts +33 -0
  170. package/src/tools/engine/lut-presets.ts +235 -0
  171. package/src/tools/engine/narrated-video.ts +267 -0
  172. package/src/tools/engine/scenes.ts +309 -0
  173. package/src/tools/engine/smart-screenshot.ts +923 -0
  174. package/src/tools/engine/social-format.ts +146 -0
  175. package/src/tools/engine/template-renderer.ts +294 -0
  176. package/src/tools/engine/templates.ts +370 -0
  177. package/src/tools/engine/text-animations.ts +282 -0
  178. package/src/tools/engine/text-overlay.ts +143 -0
  179. package/src/tools/engine/tts.ts +284 -0
  180. package/src/tools/engine/types.ts +191 -0
  181. package/src/tools/engine/voice-effects.ts +258 -0
  182. package/src/tools/index.ts +67 -0
  183. package/tsconfig.json +19 -0
  184. package/vitest.config.ts +7 -0
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug in mcp-video
4
+ title: '[Bug] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Describe the bug
10
+ A clear description of what the bug is.
11
+
12
+ ## To Reproduce
13
+ Steps to reproduce:
14
+ 1. Tool called: `video_record` / `video_edit` / etc.
15
+ 2. Parameters used: ...
16
+ 3. Error message: ...
17
+
18
+ ## Expected behavior
19
+ What you expected to happen.
20
+
21
+ ## Environment
22
+ - OS: [e.g., Ubuntu 22.04, macOS 14]
23
+ - Node.js: [e.g., 20.x]
24
+ - ffmpeg version: [run `ffmpeg -version`]
25
+ - MCP client: [e.g., Claude Code, Claude Desktop]
26
+ - Transport: [stdio / HTTP]
27
+
28
+ ## Logs
29
+ ```
30
+ Paste any relevant log output here
31
+ ```
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or improvement
4
+ title: '[Feature] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Is your feature request related to a problem?
10
+ A clear description of the problem.
11
+
12
+ ## Describe the solution you'd like
13
+ What you want to happen.
14
+
15
+ ## Use case
16
+ How would you use this feature?
17
+
18
+ ## Alternatives considered
19
+ Any alternative solutions or features you've considered.
@@ -0,0 +1,34 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ node-version: [18, 20, 22]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Use Node.js ${{ matrix.node-version }}
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: ${{ matrix.node-version }}
23
+
24
+ - name: Install dependencies
25
+ run: npm ci
26
+
27
+ - name: Type check
28
+ run: npm run typecheck
29
+
30
+ - name: Install ffmpeg
31
+ run: sudo apt-get update && sudo apt-get install -y ffmpeg
32
+
33
+ - name: Run tests
34
+ run: npm test
package/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-03-14
9
+
10
+ ### Added
11
+
12
+ - **40+ video/image tools** — comprehensive MCP toolset for video production
13
+ - **Website recording** — full-page and element recording via Playwright
14
+ - **Video editing** — cut, concatenate, crop, speed adjust, reverse, PiP compose via FFmpeg
15
+ - **TTS narration** — text-to-speech with multiple voices and voice effects
16
+ - **Social format export** — one-click conversion to Instagram, TikTok, YouTube Shorts, LinkedIn formats
17
+ - **Dual transport** — stdio for CLI integration, HTTP for remote/agent access
18
+ - **Smart screenshots** — element-level and full-page capture with auto-scroll
19
+ - **Cinema-grade animations** — keyframe animations, text overlays, animated titles
20
+ - **Color grading** — LUT presets and custom color grade application
21
+ - **Audio tools** — background music, audio ducking, beat sync, multi-track mixing
22
+ - **Chroma key** — green screen removal
23
+ - **Auto captions** — automatic subtitle generation and burn-in
24
+ - **Carousel and intro generation** — templated content creation
@@ -0,0 +1,75 @@
1
+ # Contributing to MCP Video
2
+
3
+ Thanks for your interest in contributing! MCP Video is an open-source Model Context Protocol server for video production, and we welcome contributions.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repo and clone your fork
8
+ 2. Create a feature branch (`git checkout -b feat/my-feature`)
9
+ 3. Make your changes
10
+ 4. Run tests and submit a PR
11
+
12
+ ```bash
13
+ git clone https://github.com/studiomeyer-io/mcp-video.git
14
+ cd mcp-video
15
+ npm install
16
+ npm run build
17
+ npm test
18
+ ```
19
+
20
+ ## Prerequisites
21
+
22
+ - **Node.js 18+**
23
+ - **FFmpeg** — installed and available in PATH (`ffmpeg -version`)
24
+ - **Playwright** — installed with browsers (`npx playwright install chromium`)
25
+
26
+ ## Development
27
+
28
+ ### Project Structure
29
+
30
+ ```
31
+ src/
32
+ tools/ — Tool implementations (40+ tools)
33
+ services/ — FFmpeg, Playwright, TTS services
34
+ transport/ — stdio + HTTP transport
35
+ scripts/ — Build and utility scripts
36
+ output/ — Generated files (gitignored)
37
+ ```
38
+
39
+ ### Commands
40
+
41
+ ```bash
42
+ npm test # Run all tests
43
+ npm run build # Build TypeScript
44
+ npm start # Start MCP server (stdio)
45
+ ```
46
+
47
+ ### Code Standards
48
+
49
+ - **TypeScript strict** — no exceptions
50
+ - **No `any`** — ever
51
+ - **Tests must pass** before any PR
52
+ - Tool implementations follow the MCP tool interface pattern
53
+
54
+ ## Adding a Tool
55
+
56
+ 1. Create your tool in `src/tools/`
57
+ 2. Follow the existing tool pattern (input schema, handler, output)
58
+ 3. Register it in the tool list
59
+ 4. Add tests
60
+ 5. Update the README with the new tool
61
+
62
+ ## Pull Requests
63
+
64
+ 1. Fork the repo and create a feature branch
65
+ 2. Make your changes
66
+ 3. Run `npm test`
67
+ 4. Submit a PR with a clear description of what and why
68
+
69
+ ## Reporting Security Issues
70
+
71
+ If you find a security vulnerability, please email security@studiomeyer.io instead of opening a public issue.
72
+
73
+ ## License
74
+
75
+ By contributing, you agree that your contributions will be licensed under the MIT License.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 StudioMeyer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,198 @@
1
+ <div align="center">
2
+
3
+ # mcp-video
4
+
5
+ **Cinema-grade video production for AI agents.**
6
+
7
+ ![CI](https://github.com/studiomeyer-io/mcp-video/actions/workflows/ci.yml/badge.svg)
8
+ ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
9
+ ![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)
10
+ ![Version](https://img.shields.io/badge/version-1.0.0-blue)
11
+ [![npm version](https://img.shields.io/npm/v/mcp-video?color=blue)](https://www.npmjs.com/package/mcp-video)
12
+ [![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org)
13
+
14
+ 8 MCP tools for recording, editing, effects, captions, TTS, and smart screenshots.<br>
15
+ Built on [ffmpeg](https://ffmpeg.org/) and [Playwright](https://playwright.dev/). Works with any MCP client.
16
+
17
+ [Features](#features) · [Quick Start](#quick-start) · [Examples](#usage-examples) · [Architecture](#architecture)
18
+
19
+ </div>
20
+
21
+ ## Features
22
+
23
+ | Tool | Operations | Description |
24
+ |------|-----------|-------------|
25
+ | `video_record` | cinema, scroll, multi-device | Record websites at 60fps with frame-by-frame capture |
26
+ | `video_edit` | speed, crop, reverse, keyframe, pip | Edit clips with zoom/pan, PiP, slow-mo |
27
+ | `video_color` | grade, effect, lut, chroma | Color grading, 22 LUT presets, green screen |
28
+ | `video_audio` | extract, music, ducking, mix, voice | Audio extraction, mixing, 9 voice effects |
29
+ | `video_text` | subtitles, caption, overlay, animate | Burn SRT, Whisper auto-caption, 15 text animations |
30
+ | `video_compose` | concat, intro, social, beat-sync, templates | Join clips, social format conversion, beat sync |
31
+ | `video_speech` | generate, voices, narrated | ElevenLabs/OpenAI TTS, full narrated videos |
32
+ | `video_screenshot` | capture, detect | Element-aware screenshots, page feature detection |
33
+
34
+ ### Highlights
35
+
36
+ - **60fps frame-by-frame capture** — Playwright screenshots every frame, ffmpeg encodes. Zero frame drops.
37
+ - **Cinema easing curves** — 16 easing options including `cinematic` and `showcase` for buttery smooth scrolling.
38
+ - **Smart screenshots** — Auto-detects 15+ UI elements (chat widgets, pricing sections, booking forms, etc.).
39
+ - **Narrated videos** — Provide a URL + script, get a professional video with synchronized AI voiceover.
40
+ - **22 LUT presets** — Film-grade color grading (teal-orange, noir, vintage, cyberpunk, etc.).
41
+ - **Social format export** — One-click conversion to Instagram Reel, TikTok, YouTube Short, LinkedIn.
42
+ - **Dual transport** — Stdio (default) or HTTP mode for persistent microservice deployment.
43
+
44
+ ## Prerequisites
45
+
46
+ - **Node.js** >= 18
47
+ - **ffmpeg** and **ffprobe** (validated on startup)
48
+ - **Playwright** browsers (`npx playwright install chromium`)
49
+ - Optional: `ELEVENLABS_API_KEY` for ElevenLabs TTS
50
+ - Optional: `OPENAI_API_KEY` for Whisper captions and OpenAI TTS
51
+
52
+ ## Quick Start
53
+
54
+ ### With Claude Code (stdio)
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "video": {
60
+ "command": "npx",
61
+ "args": ["-y", "mcp-video"]
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ ### With npx
68
+
69
+ ```bash
70
+ npx mcp-video
71
+ ```
72
+
73
+ ### From source
74
+
75
+ ```bash
76
+ git clone https://github.com/studiomeyer-io/mcp-video.git
77
+ cd mcp-video
78
+ npm install
79
+ npx playwright install chromium
80
+ npm run build
81
+ npm start
82
+ ```
83
+
84
+ ### HTTP mode
85
+
86
+ ```bash
87
+ # Start as HTTP microservice
88
+ npx mcp-video --http --port=9847
89
+
90
+ # Or via environment variables
91
+ MCP_HTTP=1 MCP_PORT=9847 npx mcp-video
92
+ ```
93
+
94
+ ## Configuration
95
+
96
+ | Environment Variable | Default | Description |
97
+ |---------------------|---------|-------------|
98
+ | `VIDEO_OUTPUT_DIR` | `./output` | Directory for generated files |
99
+ | `ELEVENLABS_API_KEY` | — | ElevenLabs TTS API key |
100
+ | `OPENAI_API_KEY` | — | OpenAI API key (Whisper + TTS) |
101
+ | `MCP_HTTP` | `false` | Enable HTTP transport |
102
+ | `MCP_PORT` | `9847` | HTTP port |
103
+ | `MCP_HOST` | `127.0.0.1` | HTTP bind address |
104
+ | `MCP_VIDEO_DEBUG` | `false` | Enable debug logging |
105
+
106
+ ## What You Can Build
107
+
108
+ | Use Case | Tools Used | Output |
109
+ |----------|-----------|--------|
110
+ | **Product demo video** | `video_record` → `video_text` → `video_audio` | 60fps website recording + auto-captions + background music |
111
+ | **Social media clips** | `video_record` → `video_compose` | Record once → export to Instagram Reel, TikTok, YouTube Short |
112
+ | **Narrated explainer** | `video_speech` → `video_color` | AI voiceover + cinematic color grade |
113
+ | **Before/after comparison** | `video_screenshot` → `video_edit` | Smart element screenshots + PiP composition |
114
+ | **Automated QA** | `video_record` + `video_screenshot` | Record user flows + screenshot specific elements |
115
+
116
+ ## Usage Examples
117
+
118
+ ### Record a website
119
+
120
+ ```
121
+ Use video_record with type "cinema" to record https://example.com
122
+ with a smooth scroll and hover over the navbar.
123
+ ```
124
+
125
+ ### Create a narrated explainer video
126
+
127
+ ```
128
+ Use video_speech with type "narrated" to create a narrated video of
129
+ https://example.com with these segments:
130
+ 1. "Welcome to our homepage" — pause on hero section
131
+ 2. "Check out our features" — scroll to features
132
+ 3. "Get started today" — hover over CTA button
133
+ ```
134
+
135
+ ### Auto-caption a video
136
+
137
+ ```
138
+ Use video_text with type "caption" to add auto-generated captions
139
+ to /path/to/video.mp4
140
+ ```
141
+
142
+ ### Export for social media
143
+
144
+ ```
145
+ Use video_compose with type "social-all" to convert
146
+ /path/to/video.mp4 to all social media formats.
147
+ ```
148
+
149
+ ### Smart screenshot
150
+
151
+ ```
152
+ Use video_screenshot with type "capture" to screenshot the chat widget
153
+ and pricing section on https://example.com
154
+ ```
155
+
156
+ ## Architecture
157
+
158
+ ```
159
+ src/
160
+ server.ts Entry point, 8 consolidated MCP tools
161
+ lib/ Logger, types, dual transport
162
+ handlers/ Tool handlers (video, editing, post-production, tts, screenshots)
163
+ schemas/ JSON Schema definitions for legacy tool format
164
+ tools/
165
+ engine/ Core engines
166
+ capture.ts Frame-by-frame recording (Playwright → PNG → ffmpeg)
167
+ encoder.ts ffmpeg encoding pipeline
168
+ scenes.ts Scene execution (scroll, hover, click, type, wait)
169
+ cursor.ts Visible cursor simulation
170
+ smart-screenshot.ts Element-aware screenshot engine
171
+ tts.ts ElevenLabs + OpenAI TTS with fallback
172
+ narrated-video.ts Full narration pipeline
173
+ social-format.ts Social media format conversion
174
+ concat.ts Video concatenation with transitions
175
+ lut-presets.ts 22 cinema LUT presets
176
+ ...and more
177
+ ```
178
+
179
+ ## Development
180
+
181
+ ```bash
182
+ npm run dev # Start with tsx (hot reload)
183
+ npm run typecheck # Type check
184
+ npm test # Run tests
185
+ npm run check # Verify ffmpeg/ffprobe installed
186
+ ```
187
+
188
+ ## License
189
+
190
+ MIT
191
+
192
+ ## Credits
193
+
194
+ Built by [StudioMeyer](https://studiomeyer.io). Part of our open-source toolkit for AI-powered content creation.
195
+
196
+ - [ai-shield](https://github.com/studiomeyer-io/ai-shield) — LLM security middleware for TypeScript
197
+ - [agent-fleet](https://github.com/studiomeyer-io/agent-fleet) — Multi-agent orchestration for Claude Code
198
+ - [darwin-agents](https://github.com/studiomeyer-io/darwin-agents) — Self-evolving agent framework
package/USAGE.md ADDED
@@ -0,0 +1,144 @@
1
+ # mcp-video — Usage Guide
2
+
3
+ **Version:** 1.0.0
4
+ **Tools:** 8 (consolidated from 33)
5
+
6
+ ---
7
+
8
+ ## Quick Start
9
+
10
+ ```bash
11
+ npm run build
12
+ npm start # stdio
13
+ npm run dev # Dev mode
14
+ npm test # Tests
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Tools (8)
20
+
21
+ ### 1. `video_record` — Record website videos
22
+
23
+ ```json
24
+ { "type": "cinema", "url": "https://example.com", "fps": 60, "scenes": [...] }
25
+ { "type": "scroll", "url": "https://example.com", "duration": 12 }
26
+ { "type": "multi-device", "url": "https://example.com", "devices": ["desktop", "tablet", "mobile"] }
27
+ ```
28
+
29
+ Types: `cinema` (full control), `scroll` (quick scroll-through), `multi-device` (all viewports)
30
+
31
+ ---
32
+
33
+ ### 2. `video_edit` — Edit video clips
34
+
35
+ ```json
36
+ { "type": "speed", "inputPath": "/path/video.mp4", "outputPath": "/path/out.mp4", "speed": 0.5 }
37
+ { "type": "crop", "inputPath": "...", "width": 1080, "height": 1080 }
38
+ { "type": "reverse", "inputPath": "..." }
39
+ { "type": "keyframe", "inputPath": "...", "keyframes": [...] }
40
+ { "type": "pip", "mainVideo": "...", "overlayVideo": "...", "position": "bottom-right" }
41
+ ```
42
+
43
+ Types: `speed`, `crop`, `reverse`, `keyframe`, `pip`
44
+
45
+ ---
46
+
47
+ ### 3. `video_color` — Color grading & effects
48
+
49
+ ```json
50
+ { "type": "grade", "inputPath": "...", "brightness": 1.1, "contrast": 1.2 }
51
+ { "type": "effect", "inputPath": "...", "effect": "blur", "intensity": 0.5 }
52
+ { "type": "lut", "inputPath": "...", "preset": "film-noir", "intensity": 0.8 }
53
+ { "type": "chroma", "inputPath": "...", "background": "/path/bg.mp4" }
54
+ ```
55
+
56
+ Types: `grade`, `effect` (blur/sharpen/vignette/grayscale/sepia/noise/glow), `lut` (22 presets), `chroma`
57
+
58
+ ---
59
+
60
+ ### 4. `video_audio` — Audio operations
61
+
62
+ ```json
63
+ { "type": "extract", "inputPath": "...", "format": "mp3" }
64
+ { "type": "music", "videoPath": "...", "musicPath": "...", "musicVolume": 0.25 }
65
+ { "type": "ducking", "inputPath": "...", "duckLevel": 0.3 }
66
+ { "type": "mix", "tracks": [...], "outputPath": "..." }
67
+ { "type": "voice", "inputPath": "...", "effect": "echo" }
68
+ ```
69
+
70
+ Types: `extract`, `music`, `ducking`, `mix`, `voice` (echo/reverb/deep/chipmunk/robot/whisper/radio/megaphone/underwater)
71
+
72
+ ---
73
+
74
+ ### 5. `video_text` — Text & captions
75
+
76
+ ```json
77
+ { "type": "subtitles", "inputPath": "...", "subtitlePath": "/path/subs.srt" }
78
+ { "type": "caption", "inputPath": "...", "language": "de" }
79
+ { "type": "overlay", "inputPath": "...", "overlays": [...] }
80
+ { "type": "animate", "inputPath": "...", "text": "Hello", "animation": "typewriter" }
81
+ ```
82
+
83
+ Types: `subtitles`, `caption` (Whisper AI), `overlay`, `animate` (15 styles)
84
+
85
+ ---
86
+
87
+ ### 6. `video_compose` — Compose & export
88
+
89
+ ```json
90
+ { "type": "concat", "clips": [...], "transition": "fade" }
91
+ { "type": "intro", "text": "My Brand", "duration": 3 }
92
+ { "type": "social", "inputPath": "...", "format": "instagram-reel" }
93
+ { "type": "social-all", "inputPath": "..." }
94
+ { "type": "beat-sync", "audioPath": "...", "clips": [...] }
95
+ { "type": "templates" }
96
+ { "type": "render", "templateId": "social-reel-1", "assets": {...} }
97
+ ```
98
+
99
+ Types: `concat`, `intro`, `social`, `social-all`, `beat-sync`, `templates`, `render`
100
+
101
+ ---
102
+
103
+ ### 7. `video_speech` — TTS & narration
104
+
105
+ ```json
106
+ { "type": "generate", "text": "Hello world", "provider": "elevenlabs" }
107
+ { "type": "voices" }
108
+ { "type": "narrated", "url": "https://example.com", "segments": [...] }
109
+ ```
110
+
111
+ Types: `generate` (ElevenLabs/OpenAI), `voices` (list available), `narrated` (full narrated video)
112
+
113
+ ---
114
+
115
+ ### 8. `video_screenshot` — Smart screenshots
116
+
117
+ ```json
118
+ { "type": "capture", "url": "https://example.com", "targets": ["hero", "pricing"] }
119
+ { "type": "detect", "url": "https://example.com" }
120
+ ```
121
+
122
+ Types: `capture` (element-aware screenshots), `detect` (page feature analysis)
123
+
124
+ ---
125
+
126
+ ## Typical Workflows
127
+
128
+ ### Product demo video
129
+ 1. `video_record` (type: cinema) → Record website
130
+ 2. `video_edit` (type: keyframe) → Add zoom/pan
131
+ 3. `video_text` (type: caption) → Auto-caption
132
+ 4. `video_audio` (type: music) → Background music
133
+ 5. `video_compose` (type: social-all) → Export all formats
134
+
135
+ ### Quick social reel
136
+ 1. `video_record` (type: scroll) → Scroll recording
137
+ 2. `video_color` (type: lut) → Cinema color grade
138
+ 3. `video_compose` (type: beat-sync) → Sync to music
139
+ 4. `video_compose` (type: social) → Instagram reel format
140
+
141
+ ### Narrated walkthrough
142
+ 1. `video_speech` (type: narrated) → Full narrated video
143
+ 2. `video_text` (type: overlay) → Title cards
144
+ 3. `video_compose` (type: intro) → Add intro/outro
@@ -0,0 +1,6 @@
1
+ /**
2
+ * CapCut-tier tool handlers — LUT Presets, Voice Effects, Chroma Key,
3
+ * Beat-Sync, Text Animations, Audio Mixer, Templates
4
+ */
5
+ import { type ToolHandler } from '../lib/types.js';
6
+ export declare const capcutHandlers: Record<string, ToolHandler>;