HeyGen MCP server

Enables AI avatar video generation through HeyGen's API with tools for retrieving voices and avatars, creating videos, and checking generation status.
Back to servers
Provider
HeyGen
Release date
Apr 16, 2025
Language
Python
Package
Stats
876 downloads
10 stars

The Heygen MCP server integrates Heygen's AI avatar and video generation capabilities with MCP-compatible clients like Claude Desktop. This server allows you to easily create AI-generated videos with virtual avatars using text-to-speech through a simple interface.

Installation Requirements

Prerequisites

  • Python 3.10 or higher
  • A Heygen API key from Heygen (includes 10 free credits per month)

Installing the uv Package Manager

First, install the recommended uv package manager:

For macOS or Linux:

# Install with the official installer script
curl -LsSf https://astral.sh/uv/install.sh | sh

# Or via Homebrew (macOS)
brew install uv

For Windows:

# Install with the official installer script in PowerShell
irm https://astral.sh/uv/install.ps1 | iex

# Or via Scoop
scoop install uv

For other installation methods, visit the uv documentation.

Setting Up with Claude Desktop

  1. Obtain your API key from the Heygen website
  2. Install the uv package manager as shown above
  3. Configure Claude Desktop to use the Heygen MCP server:
    • Go to Claude > Settings > Developer > Edit Config
    • Add the following to your claude_desktop_config.json file:
{
  "mcpServers": {
    "HeyGen": {
      "command": "uvx",
      "args": ["heygen-mcp"],
      "env": {
        "HEYGEN_API_KEY": "<insert-your-api-key-here>"
      }
    }
  }
}

Note for Windows users: You'll need to enable "Developer Mode" in Claude Desktop to use the MCP server. Click "Help" in the hamburger menu at the top left and select "Enable Developer Mode".

Available Tools

The Heygen MCP server provides these tools for generating and managing AI videos:

Account Management

  • get_remaining_credits: Check your available Heygen account credits

Content Discovery

  • get_voices: Retrieve available voice options (limited to first 100 voices)
  • get_avatar_groups: List all avatar groups in your account
  • get_avatars_in_avatar_group: Get avatars within a specific group

Video Generation

  • generate_avatar_video: Create a new video with specified avatar, text, and voice
  • get_avatar_video_status: Check the status of a generated video

Running with MCP Inspector

For testing and debugging purposes, you can run the server locally with the MCP Inspector:

uv --with "mcp[cli]" dev heygen_mcp/server.py

This allows you to test the available tools and functionality through the MCP Inspector interface.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later