heygen-mcp
Cinder Haus — HeyGen MCP
A Model Context Protocol server that exposes HeyGen's video generation API to MCP-compatible clients (Claude desktop, Cursor, etc.). Built as a case study for Forging Your Own Knight.
Tools
list_avatars— list available avatars and talking photosgenerate_video— render a video fromscript+avatar_id; sensible defaults (avatar's default voice, solid white background, 1920×1080)get_video_status— check render progress; returns the video URL when complete
Local dev
npm installOpen
.env.localand paste your HeyGen API key afterHEYGEN_API_KEY=npm run dev— server runs athttp://localhost:3000/api/mcpnpm run inspector— opens the MCP Inspector to test tools interactively
Deploy to Vercel
Push this repo to GitHub
In the Vercel dashboard: New Project → import the GitHub repo
Add
HEYGEN_API_KEYunder Settings → Environment Variables (Production + Preview)Deploy. Your MCP URL is
https://<your-project>.vercel.app/api/mcp
Register in Claude desktop
Settings → Connectors → Add custom connector → paste the deployed URL.
Stack
Next.js 15 (App Router)
mcp-handlerfor Streamable HTTP MCP transportTypeScript, Zod for input validation