grok-video-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@grok-video-mcpGenerate a video of a golden retriever running on a beach."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
grok-video-mcp
MCP server that gives AI agents xAI Grok video generation — submit a prompt, poll the render, download the clip. Works with OpenCode, Claude Desktop, Cursor, VS Code, and any MCP client.
Companion to vision-mcp: one agent can generate a clip and verify it — a full media loop.
Why
Text-based agents can't generate video. grok-video-mcp exposes xAI's
grok-imagine-video models as plain MCP tools so any agent can produce a
real video clip from a prompt — no shell scripts, no manual API calls, no
hand-rolled polling loops.
Related MCP server: mcp-media-engine
Tools
Tool | What it does |
| Submit a generation → returns |
| Poll: |
| Download the finished clip to disk |
| Submit + poll + download in one call (agent-friendly) |
Requirements
Node.js ≥ 18
An xAI API key — https://console.x.ai (or docs.x.ai)
Install
npx from GitHub (recommended)
npx -y github:pongsakornp/grok-video-mcpnpx clones the repo, installs deps, auto-builds via the
preparescript, and runs the server over stdio.
From source
git clone https://github.com/pongsakornp/grok-video-mcp.git
cd grok-video-mcp
npm install
npm run buildUsage
OpenCode (opencode.jsonc)
{
"mcp": {
"grok-video-mcp": {
"type": "local",
"command": ["npx", "-y", "github:pongsakornp/grok-video-mcp"],
"environment": {
"XAI_API_KEY": "xai-..."
},
"enabled": true
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"grok-video-mcp": {
"command": "npx",
"args": ["-y", "github:pongsakornp/grok-video-mcp"],
"env": {
"XAI_API_KEY": "xai-..."
}
}
}
}VS Code / Cursor (.vscode/mcp.json)
{
"servers": {
"grok-video-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "github:pongsakornp/grok-video-mcp"],
"environment": {
"XAI_API_KEY": "xai-..."
}
}
}
}Keys live in the MCP config — no shell profile edits needed.
Configuration
Env var | Default | Description |
| — | required — xAI API key |
|
| Model ( |
|
| Where clips are saved |
|
| Max wait for a generation |
|
| Initial poll interval |
|
| Max poll interval (×1.5 backoff) |
How it works
xAI's video API is async:
POST /v1/videos/generations → { request_id }
GET /v1/videos/{request_id} → poll until status: "done"
GET video.url → mp4 bytesgenerate_and_wait encapsulates submit → poll (5s→30s backoff, progress
reported) → download → save, returning the file path.
Pricing: roughly $0.005 per second of video (~$0.04 for an 8s clip) — an order of magnitude cheaper than Google Veo Lite ($0.05–0.08/s).
Development
npm run build # TypeScript → dist/
npm test # 23 tests (vitest)
npm run typecheck # tsc --noEmitTest coverage: config parsing, xAI request/response mapping (mocked fetch), polling backoff/timeout/FAILED handling, and the full MCP stdio protocol.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceUse XAI's latest api functionalities with Grok MCP. It supports image understanding and generation, live search, latest models and more.2248MIT
- AlicenseAqualityBmaintenanceMCP server for AI-powered image, audio, and video generation, enabling media creation directly from Claude, Cursor, and other MCP clients.1144MIT
- AlicenseAqualityBmaintenanceMCP server for generating, editing, and batch processing videos using xAI's Grok Imagine Video API, with support for text-to-video, image-to-video, and video editing via natural language prompts.41901MIT
- Alicense-qualityDmaintenanceA single-file MCP server that enhances Claude Desktop with real-time web and X search, multi-tool agent, and image/video generation via xAI's Grok.MIT
Related MCP Connectors
MCP server for Grok Imagine AI video generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for OpenAI Sora AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pongsakornp/grok-video-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server