@lifeng688/remotion-motion-mcp
v0.1.2
Published
An MCP server for creating, editing, validating, previewing, and rendering local Remotion video projects.
Maintainers
Readme
remotion-motion-mcp
An MCP server for creating, editing, validating, previewing, and rendering local Remotion video projects.
Features
Project Management
ping— Health check with environment and workspace infocreate_remotion_project— Creates a local Remotion project with default animationlist_remotion_projects— Lists valid projects fromREMOTION_MCP_WORKSPACEget_project_structure— Returns directory tree with configurablemaxDepthvalidate_remotion_project— Checks project integrity and readiness for rendering
File Operations
read_project_file— Safely reads text files; binary files return metadata onlywrite_project_file— Safely writes files inside an existing project with path traversal protection
Preview and Render
preview_remotion_project— Launches Remotion Studio for a projectrender_remotion_project— Renders MP4 output with strict preflight validation
Note:
preview_remotion_projectcan launch Remotion Studio, but long-running preview processes should be tested manually.
render_remotion_projectcan render MP4 files, but large renders may exceed MCP client request timeouts. Automated tests use preflight checks and a tiny render smoke test.
Installation
cd remotion-motion-mcp
npm install
npm run buildTo install globally (after publishing to npm):
npm install -g remotion-motion-mcpMCP Configuration
Add to your Claude Code / Cursor / MCP client configuration:
{
"mcpServers": {
"remotion-motion-mcp": {
"command": "node",
"args": ["E:/test/remotion-motion-mcp/dist/index.js"],
"env": {
"REMOTION_MCP_WORKSPACE": "E:/test/remotion-workspace"
}
}
}
}REMOTION_MCP_WORKSPACE is required for workspace isolation. If not set, the server falls back to a default local workspace directory.
Usage Flow
Recommended workflow:
create_remotion_project— scaffold a new projectlist_remotion_projects— verify the project was createdget_project_structure— explore the project layoutread_project_file— read source fileswrite_project_file— edit source filesvalidate_remotion_project— check project integritypreview_remotion_projector manualnpm run dev— preview in Remotion Studiorender_remotion_projector manualnpx remotion render— render to MP4
Tool Summary
ping
Health check with environment and workspace info.
create_remotion_project
Creates a local Remotion project with:
src/index.ts— entry point containingregisterRoot(Root)src/Root.tsx— defines the Compositionsrc/Main.tsx— contains the default animationpackage.jsonmotion-project.json
Generated templates avoid undefined fps / width / height variables. spring() calls include fps from useVideoConfig().
list_remotion_projects
Lists valid projects from REMOTION_MCP_WORKSPACE.
get_project_structure
Returns directory tree with maxDepth. Ignores heavy / unsafe directories like node_modules, .git, out, dist, .remotion.
read_project_file
Safely reads text files. Binary files return metadata only. Forbidden directories are blocked.
write_project_file
Safely writes files inside an existing project. Blocks path traversal and dangerous directories/files. Does not create arbitrary projects.
validate_remotion_project
Checks:
- project directory exists
motion-project.jsonexists and is validpackage.jsonexists and is valid- Remotion dependency is installed
- dev/render scripts exist in
package.json - entry file exists
registerRootis calledRoot.tsxhas a Composition- No undefined variable mistakes
Main.tsxspring()uses correct fpsnode_modulesexistsoutdirectory
preview_remotion_project
Starts Remotion Studio for a project. Regular automated tests only cover preflight and fast-fail behavior.
Manual preview command:
cd E:/test/remotion-workspace/remotion-render-basic
npm run devrender_remotion_project
Renders MP4 output with strict preflight validation (10 sequential checks). Automated tests include preflight/security checks and a tiny render smoke test. Large renders may need manual testing or a client with a longer request timeout.
Manual render command:
cd E:/test/remotion-workspace/remotion-render-basic
npx remotion render src/index.ts Main out/manual-render-test.mp4Testing
Passed
- Full lightweight regression (
full-light-regression.json): 28/28 passed - Render preflight and security tests passed
- Preview preflight and security tests passed
- Tiny real render smoke test passed
- Manual Remotion Studio preview verified
Not included in normal regression
- Long real render tests
- Long-running preview server tests
These are intentionally excluded because they can exceed MCP client request timeouts or leave long-running processes.
Security
- Workspace isolation — all operations restricted to
REMOTION_MCP_WORKSPACE - Path traversal prevention —
../and absolute paths outside workspace are blocked - Forbidden directories —
node_modules,.git,dist,out,.remotion,.remotion-mcpare protected - Lockfile protection —
write_project_filecannot modifypackage-lock.json,yarn.lock, etc. - Binary file safety — binary files are detected and handled gracefully
- Command injection prevention — all commands use
execawithcommand + args, no shell string concatenation - No stdout pollution — logging goes to stderr only (MCP uses stdio transport)
Limitations
- Remotion only — no HyperFrames support yet
- No composition management tools (create/list/update/delete compositions)
- No asset management tools (upload/list/delete assets)
- No render progress streaming
- Long renders may exceed MCP client request timeout
- Preview is a long-running process and should be tested carefully
Version
Current version: 0.1.0
