Skip to main content
Connect HeyGen’s Video Agent to Claude Code to generate AI avatar videos directly from your terminal. Once configured, Claude Code can script, render, and deliver videos through natural-language prompts without leaving your development workflow.

Prerequisites

  • Claude Code installed (installation guide)
  • Node.js installed (required for MCP server resolution)
  • A HeyGen account with Video Agent access

Adding the MCP Server

Run the following command in your terminal (not inside the Claude Code CLI):
To make the server available across all projects, add the -s user scope flag:

Alternative: Direct Config Edit

You can also add the server by editing ~/.claude.json directly:
Restart Claude Code after editing the config file.

Authentication

On first use, Claude Code will prompt you to authenticate with HeyGen. Run /mcp inside Claude Code and follow the browser-based OAuth flow to authorize access.

Verifying the Connection

After setup, confirm the server is active:
Or from inside Claude Code:
You should see heygen listed with a connected status.

Usage

Once connected, prompt Claude Code with a video generation request:
Claude Code will call HeyGen’s Video Agent to handle scripting, avatar selection, and rendering. Completed videos are accessible from the Projects page in your HeyGen dashboard. For better prompt structure and higher-quality output, instruct Claude Code to read HeyGen’s prompt engineering guidelines before generating:

Scoping