HeyGen MCP Server

โœ… Server is running
๐Ÿ” Authentication Required
This API requires an API key for access.

About

This is a Model Context Protocol (MCP) server that provides access to the HeyGen API for generating AI avatars and videos.

๐Ÿ“ง API Key Access
To request an API key for this service, please contact:
bartosz.dariusz.majewski@gmail.com

For HeyGen API keys, visit: https://www.heygen.com/

API Endpoint

POST requests to: https://heygen.mcp.majewscy.tech/

๐Ÿ”‘ Required HTTP Headers

For MCP authentication:

x-api-key

Your server authentication key (contact us for access)

For HeyGen access:

x-heygen-api-key

Your HeyGen API key (get from heygen.com)

๐Ÿงช Test Your Connection

1. List Available Tools

curl -X POST https://heygen.mcp.majewscy.tech/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SERVER_KEY" \
  -H "x-heygen-api-key: YOUR_HEYGEN_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
  }'

2. Check Remaining Credits

curl -X POST https://heygen.mcp.majewscy.tech/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_SERVER_KEY" \
  -H "x-heygen-api-key: YOUR_HEYGEN_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "get_remaining_credits",
      "arguments": {}
    },
    "id": 2
  }'

๐Ÿ”ง Configuration Examples

Claude Code (.mcp.json)

{
  "mcpServers": {
    "heygen": {
      "type": "http",
      "url": "https://heygen.mcp.majewscy.tech/",
      "headers": {
        "x-api-key": "YOUR_SERVER_KEY",
        "x-heygen-api-key": "YOUR_HEYGEN_KEY"
      }
    }
  }
}

Available Tools

๐Ÿ’ฐ Account & Credits

  • get_remaining_credits - Check remaining API credits

๐ŸŽค Voice Management

  • get_voices - Get available voice options

๐Ÿ‘ค Avatar Management

  • get_avatar_groups - List avatar groups
  • get_avatars_in_avatar_group - Get avatars in a specific group

๐ŸŽฌ Video Generation

  • generate_avatar_video - Generate a video with an avatar
  • get_avatar_video_status - Check video generation status

โŒ Common Errors

Invalid API Key

{"jsonrpc":"2.0","id":1,"error":{"code":-32001,"message":"Invalid API Key"}}

Solution: Check your x-api-key header value

No HeyGen API Key

{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"No HEYGEN_API_KEY provided"}}

Solution: Add x-heygen-api-key header with your HeyGen API key

Health Check

GET /health - Returns server status (no authentication required)