Skip to content
ClaudeUnreal
GitHub

Sequencer

27 tools — 0 typed MCP · 27 via cu CLI.

  • Sequencer — Level Sequence Management — 5 tools
  • Sequencer — Track Management — 16 tools
  • Sequencer — Keyframe Operations — 3 tools
  • Sequencer — Playback Control — 3 tools

Create a new Level Sequence asset for cinematics, cutscenes, and animated cameras.

@mcp.tool()
@showcase(
"Create a new Level Sequence asset for cinematics, cutscenes, and animated cameras.",
featured=True,
)
def create_level_sequence(
ctx: Context,
name: str,
path: str = None,
fps: float = None,
) -> ToolResult:
"""[Sequencer] Create a new Level Sequence asset.
Anti-patterns:
- Do not call this if an asset already exists at ``path/name`` — the
handler errors with "Asset already exists"; check with
``find_assets`` first.
- Do not pass ``path`` outside ``/Game/`` — engine/plugin mounts can't
host new assets. Default ``/Game/Cinematics`` is the conventional
location.
- Do not pass ``fps`` <= 0 — the value is ignored; the sequence keeps
the project default frame rate instead.
Args:
ctx: The MCP context
name: Name for the new Level Sequence, e.g. "LS_Intro"
path: Content path to create in, e.g. "/Game/Cinematics" (default)
fps: Display frame rate, e.g. 30.0 or 24.0 (uses project default if omitted)
Returns:
Dict with name, path, and success status
"""
from claude_unreal_server import get_unreal_connection
try:
unreal = get_unreal_connection()
if not unreal:
logger.error("Failed to connect to Unreal Engine")
return err("Failed to connect to Unreal Engine")
params = {"name": name}
if path is not None:
params["path"] = path
if fps is not None:
params["fps"] = fps
response = unreal.send_command("create_level_sequence", params)
if not response:
return err("create_level_sequence failed", error="No response from Unreal Engine")
if response.get("status") == "error":
return err("create_level_sequence failed", error=response.get("error", "Unknown error"))
result = response.get("result", response)
return ok(f"Created Level Sequence '{name}'", **result)
except Exception as e:
logger.error(f"Error in create_level_sequence: {e}")
return err("create_level_sequence failed", error=str(e))

Add keyframes at specific times to animate transforms, properties, and camera movement.

@mcp.tool()
@showcase(
"Add keyframes at specific times to animate transforms, properties, and camera movement.",
featured=True,
)
def add_keyframe(
ctx: Context,
sequence_path: str,
track_index: int,
time_seconds: float,
value: float,
binding_name: str = None,
section_index: int = None,
channel_index: int = None,
interpolation: str = None,
) -> ToolResult:
"""[Sequencer] Add a keyframe at a specific time on a channel.
Transform channel_index 0-8: Loc.X/Y/Z, Rot.X/Y/Z, Scale.X/Y/Z.
interpolation: "Linear", "Cubic" (default), or "Constant".
Anti-patterns: track must exist first; channel_index out of range →
handler reports actual count; time_seconds outside playback range →
key added but not evaluated; track_index shifts when tracks change.
Example:
add_keyframe("/Game/Cinematics/LS_Intro", track_index=0,
channel_index=2, time_seconds=0.0, value=200.0,
binding_name="CameraActor_0")
"""
from claude_unreal_server import get_unreal_connection
try:
unreal = get_unreal_connection()
if not unreal:
return err("Failed to connect to Unreal Engine")
params = {
"sequence_path": sequence_path,
"track_index": track_index,
"time_seconds": time_seconds,
"value": value,
}
if binding_name is not None:
params["binding_name"] = binding_name
if section_index is not None:
params["section_index"] = section_index
if channel_index is not None:
params["channel_index"] = channel_index
if interpolation is not None:
params["interpolation"] = interpolation
response = unreal.send_command("add_keyframe", params)
if not response:
return err("add_keyframe failed", error="No response from Unreal Engine")
if response.get("status") == "error":
return err("add_keyframe failed", error=response.get("error", "Unknown error"))
result = response.get("result", response)
return ok(f"Added keyframe at {time_seconds}s (value={value})", **result)
except Exception as e:
logger.error(f"Error in add_keyframe: {e}")
return err("add_keyframe failed", error=str(e))