Skip to main content
Glama
chrishayuk
by chrishayuk

remotion_create_project

Create a new video project with customizable themes, resolution settings, and project structure for generating professional videos using Remotion framework.

Instructions

Create a new Remotion video project.

Creates a complete Remotion project with package.json, TypeScript config,
and project structure ready for video generation.

Args:
    name: Project name (will be used as directory name)
    theme: Theme to use (tech, finance, education, lifestyle, gaming, minimal, business)
    fps: Frames per second (default: 30)
    width: Video width in pixels (default: 1920 for 1080p)
    height: Video height in pixels (default: 1080 for 1080p)

Returns:
    JSON with project information

Example:
    project = await remotion_create_project(
        name="my_video",
        theme="tech",
        fps=30,
        width=1920,
        height=1080
    )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fpsNo
heightNo
nameYes
themeNotech
widthNo

Implementation Reference

  • MCP tool handler decorated with @mcp.tool that registers and executes the remotion_create_project tool. Delegates core logic to ProjectManager.create_project.
    @mcp.tool  # type: ignore[arg-type]
    async def remotion_create_project(
        name: str, theme: str = "tech", fps: int = 30, width: int = 1920, height: int = 1080
    ) -> str:
        """
        Create a new Remotion video project.
    
        Creates a complete Remotion project with package.json, TypeScript config,
        and project structure ready for video generation.
    
        Args:
            name: Project name (will be used as directory name)
            theme: Theme to use (tech, finance, education, lifestyle, gaming, minimal, business)
            fps: Frames per second (default: 30)
            width: Video width in pixels (default: 1920 for 1080p)
            height: Video height in pixels (default: 1080 for 1080p)
    
        Returns:
            JSON with project information
    
        Example:
            project = await remotion_create_project(
                name="my_video",
                theme="tech",
                fps=30,
                width=1920,
                height=1080
            )
        """
    
        def _create():
            try:
                result = project_manager.create_project(name, theme, fps, width, height)
                return json.dumps(result, indent=2)
            except Exception as e:
                return json.dumps({"error": str(e)})
    
        return await asyncio.get_event_loop().run_in_executor(None, _create)
  • Core implementation of project creation in ProjectManager class. Handles directory creation, template copying from remotion-templates, and timeline initialization.
    def create_project(
        self, name: str, theme: str = "tech", fps: int = 30, width: int = 1920, height: int = 1080
    ) -> dict[str, str]:
        """
        Create a new Remotion project.
    
        Args:
            name: Project name
            theme: Theme to use
            fps: Frames per second
            width: Video width
            height: Video height
    
        Returns:
            Dictionary with project info
        """
        project_dir = self.workspace_dir / name
    
        if project_dir.exists():
            raise ValueError(f"Project '{name}' already exists")
    
        # Create project structure
        project_dir.mkdir(parents=True)
        (project_dir / "src").mkdir()
        (project_dir / "src" / "components").mkdir()
    
        # Copy template files
        template_dir = Path(__file__).parent.parent.parent.parent / "remotion-templates"
    
        # Copy package.json
        self._copy_template(
            template_dir / "package.json", project_dir / "package.json", {"project_name": name}
        )
    
        # Copy config files
        shutil.copy(template_dir / "remotion.config.ts", project_dir / "remotion.config.ts")
        shutil.copy(template_dir / "tsconfig.json", project_dir / "tsconfig.json")
        shutil.copy(template_dir / ".gitignore", project_dir / ".gitignore")
    
        # Copy source files
        # Remotion composition IDs can only contain a-z, A-Z, 0-9, and hyphens
        composition_id = name.replace("_", "-")
    
        self._copy_template(
            template_dir / "src" / "Root.tsx",
            project_dir / "src" / "Root.tsx",
            {
                "composition_id": composition_id,
                "duration_in_frames": 300,  # 10 seconds at 30fps
                "fps": fps,
                "width": width,
                "height": height,
                "theme": theme,
            },
        )
    
        shutil.copy(template_dir / "src" / "index.ts", project_dir / "src" / "index.ts")
    
        # Create timeline (track-based system)
        self.current_project = name
        self.current_timeline = Timeline(fps=fps, width=width, height=height, theme=theme)
    
        return {
            "name": name,
            "path": str(project_dir),
            "theme": theme,
            "fps": str(fps),
            "resolution": f"{width}x{height}",
        }

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/chrishayuk/chuk-mcp-remotion'

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