RunAPI Grok Imagine MCP server for image and video generation: create tasks, poll results, and check pricing across 7 model variants from Claude Code, Codex, Cursor, and VS Code.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add grok-imagine --env RUNAPI_API_KEY='<RUNAPI_API_KEY>' -- npx -y @runapi.ai/grok-imagine-mcp~/.codex/config.toml
[mcp_servers.grok-imagine]
command = "npx"
args = ["-y", "@runapi.ai/grok-imagine-mcp"]
env = { RUNAPI_API_KEY = "<RUNAPI_API_KEY>" }
# codex mcp add grok-imagine --env RUNAPI_API_KEY='<RUNAPI_API_KEY>' -- npx -y @runapi.ai/grok-imagine-mcp~/.cursor/mcp.json
{
"mcpServers": {
"grok-imagine": {
"command": "npx",
"args": [
"-y",
"@runapi.ai/grok-imagine-mcp"
],
"env": {
"RUNAPI_API_KEY": "<RUNAPI_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"grok-imagine": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@runapi.ai/grok-imagine-mcp"
],
"env": {
"RUNAPI_API_KEY": "<RUNAPI_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"grok-imagine": {
"command": "npx",
"args": [
"-y",
"@runapi.ai/grok-imagine-mcp"
],
"env": {
"RUNAPI_API_KEY": "<RUNAPI_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"grok-imagine": {
"command": "npx",
"args": [
"-y",
"@runapi.ai/grok-imagine-mcp"
],
"env": {
"RUNAPI_API_KEY": "<RUNAPI_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"grok-imagine": {
"command": "npx",
"args": [
"-y",
"@runapi.ai/grok-imagine-mcp"
],
"env": {
"RUNAPI_API_KEY": "<RUNAPI_API_KEY>"
}
}
}
}Environment variables
RUNAPI_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.