ai
HeyGen MCP Integration for OpenAI Agents SDK
Connect HeyGen to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect HeyGen to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
HeyGen MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-heygen": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=heygen",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=heygen --write=deny Why Use KosmoKrator Here
Expose only HeyGen instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
HeyGen Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the HeyGen integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__heygen__heygen_list_videos | heygen.heygen_list_videos | Read | List generated videos from HeyGen. Returns video IDs, statuses, and metadata. Use limit and offset for pagination. |
integration__heygen__heygen_get_video | heygen.heygen_get_video | Read | Get the status and details of a specific HeyGen video. Returns the video status (pending, processing, completed, failed), download URL when ready, and metadata. |
integration__heygen__heygen_create_video | heygen.heygen_create_video | Write | Generate a new AI video on HeyGen. Provide video_inputs defining scenes (avatar, voice, script), optional dimensions, and test mode. Returns a video_id to track generation progress. |
integration__heygen__heygen_list_avatars | heygen.heygen_list_avatars | Read | List all available talking avatars from HeyGen. Returns avatar IDs, names, preview images, and supported styles. Use avatar IDs when creating videos. |
integration__heygen__heygen_list_voices | heygen.heygen_list_voices | Read | List all available voices from HeyGen. Returns voice IDs, display names, supported languages, gender, and preview audio URLs. Use voice IDs when creating videos. |
integration__heygen__heygen_get_current_user | heygen.heygen_get_current_user | Read | Get the current authenticated HeyGen user's account information, including plan details, remaining credits, and usage statistics. |
integration__heygen__heygen_list_templates | heygen.heygen_list_templates | Read | List available video templates from HeyGen. Returns template IDs, names, thumbnails, and metadata. Use limit and offset for pagination. |