GrokMCP
GrokMCP
A Model Context Protocol (MCP) server for Grok (xAI) — chat/reasoning/vision and Grok Imagine video generation, powered by the AceDataCloud API.
Chat with Grok models, or generate short AI videos from a text prompt or a still image — directly from any MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.).
Features
Chat / Reasoning / Vision — Talk to Grok 4.5 / Grok 4 / Grok 3 models, with image input and tool calling
Text to Video — Generate a video clip from a text description
Image to Video — Animate a reference image into a video
Async task tracking — Submit a job, poll for the result, single or batch
stdio & HTTP transports — Local stdio for desktop clients, HTTP for remote hosting
Tools
Tool | Description |
| Chat completion (reasoning / vision / tool calling) with Grok chat models. |
| Generate a video from a text prompt (any model except |
| Generate a video from an input image (+ optional motion prompt). |
| Query the status/result of a single generation task. |
| Query the status/result of multiple tasks at once. |
| List available models and their capabilities. |
| List all tools and example workflows. |
| Tips for writing effective video prompts. |
Models
Chat (grok_chat_completions)
Model | Notes |
| Default — latest flagship reasoning model |
| Previous flagship reasoning model |
| Earlier-generation model |
Video
Model | Text→Video | Image→Video | Notes |
| ✅ | ✅ | Default. Fastest & cheapest. 6-30s, duration-banded billing. |
| ✅ | ✅ | Standard. 1-15s, billed per output second. |
| ✅ | ✅ | Official endpoint, higher fidelity. 1-15s, per second. |
| ❌ | ✅ | Official image-to-video only (requires |
Parameters
Parameter | Applies to | Values |
| both | Text description (required for text-to-video) |
| image-to-video | Input image URL (required for |
| image-to-video | Optional list of style/content reference images |
| both |
|
| both |
|
| both |
|
| both | Optional async webhook |
Installation
Via uvx (recommended)
uvx mcp-grokVia pip
pip install mcp-grok
mcp-grokConfiguration
Set your AceDataCloud API token (get one at https://platform.acedata.cloud):
export ACEDATACLOUD_API_TOKEN=your_api_token_hereClaude Desktop / Claude Code
Add to your MCP config (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"grok": {
"command": "uvx",
"args": ["mcp-grok"],
"env": {
"ACEDATACLOUD_API_TOKEN": "your_api_token_here"
}
}
}
}Remote (HTTP)
A hosted Streamable HTTP endpoint is available at:
https://grok.mcp.acedata.cloud/mcpEnvironment Variables
Variable | Description | Default |
| API token (required) | — |
| API base URL |
|
| Default model |
|
| Request timeout (seconds) |
|
| MCP server name |
|
| Transport mode ( |
|
| Logging level |
|
Usage Notes
Generation is asynchronous: the generation tools return a
task_idquickly. Poll withgrok_get_task(task_id)until the state issucceededand thevideo_urlis available.Generation typically takes ~30 seconds to a few minutes.
Keep
resolutionat480panddurationshort for faster, cheaper iterations.
Development
pip install -e ".[dev,test]"
pytest --cov=core --cov=tools
ruff check .Documentation
License
MIT — see LICENSE.