# grok-imagine-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/runapi-ai/grok-imagine-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 732  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/grok-imagine-mcp

## Description
RunAPI MCP server for Grok Imagine: create tasks, poll status, check pricing.

## Tools
Capabilities this server exposes over MCP:

- **login** — Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
- **edit_image** — Create a Grok Imagine task on RunAPI (edit image). Returns a task id, status, and output URLs.
- **extend_video** — Create a Grok Imagine task on RunAPI (extend video). Returns a task id, status, and output URLs.
- **image_to_video** — Create a Grok Imagine task on RunAPI (image to video). Returns a task id, status, and output URLs.
- **segment_map** — Create a Grok Imagine task on RunAPI (segment map). Returns a task id, status, and output URLs.
- **text_to_image** — Create a Grok Imagine task on RunAPI (text to image). Returns a task id, status, and output URLs.
- **text_to_video** — Create a Grok Imagine task on RunAPI (text to video). Returns a task id, status, and output URLs.
- **upscale_image** — Create a Grok Imagine task on RunAPI (upscale image). Returns a task id, status, and output URLs.
- **get_task** — Fetch the current status and latest result payload for a grok-imagine task.
- **check_pricing** — Look up RunAPI pricing for the grok-imagine model line.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "grok-imagine-mcp": {
    "command": "npx",
    "args": ["-y","@runapi.ai/grok-imagine-mcp"],
    "env": {
      "RUNAPI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `RUNAPI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What grok-imagine-mcp does

grok-imagine-mcp provides MCP access to the Grok Imagine models available through RunAPI. It focuses on seven model endpoints instead of exposing the broader RunAPI catalog, making it suitable for assistants that should work specifically with Grok Imagine image and video workflows.

The server supports image editing, text-to-image generation, image-to-video conversion, text-to-video generation, image upscaling, video extension, and segment map creation. It also provides task inspection and pricing lookup. Creation tools return a task identifier, status information, and output URLs when available.

## How it works

MCP-compatible clients start the server over standard input/output with the `@runapi.ai/grok-imagine-mcp` npm package. An assistant can call `check_pricing` before submitting a job, create a task through the operation-specific tool, and use `get_task` later to retrieve the latest status and payload.

Creation tools support an option to wait for a terminal status. When waiting is disabled, the assistant receives the task ID without blocking for completion and can poll the task later. Authenticated operations use RunAPI credentials, while pricing lookup can run without signing in.

The available model choices depend on the operation. Image editing accepts `grok-imagine-edit-image` and `grok-imagine-image-2-0`; image-to-video and text-to-video each expose their own Grok Imagine model choices. Segment mapping and text-to-image use supported image models, while video extension and image upscaling do not take a model parameter.

## Setup and configuration

Install the server through an MCP client's standard stdio configuration. For example, the command is:

```json
{
  "mcpServers": {
    "grok-imagine": {
      "command": "npx",
      "args": ["-y", "@runapi.ai/grok-imagine-mcp"]
    }
  }
}
```

Claude Code can add the same package with `claude mcp add`, using either user or project scope. Codex, Cursor, Windsurf, VS Code, Roo Code, and other MCP hosts can use the stdio command.

Authentication can use the `RUNAPI_API_KEY` environment variable, which is useful for headless and CI environments. Alternatively, the MCP login flow or `runapi login` stores credentials in `~/.config/runapi/config.json`. A pre-provisioned configuration file can contain an `apiKey` property. Keep credentials out of source control.

## Tools and capabilities

- `edit_image`: submits an image editing task.
- `extend_video`: submits a video extension task.
- `image_to_video`: creates video from an image.
- `segment_map`: creates a segment map task.
- `text_to_image`: generates an image from text.
- `text_to_video`: generates a video from text.
- `upscale_image`: submits an image upscaling task.
- `get_task`: retrieves the current state and latest payload for a task.
- `check_pricing`: looks up pricing for a Grok Imagine model and endpoint.

All task-creation tools can optionally wait for completion and return output URLs along with task status. `check_pricing` is available without authentication.

## Limitations and notes

The server is scoped to Grok Imagine and does not provide the full RunAPI model catalog. Model availability may change between releases, so pricing lookup or the Grok Imagine model page should be used for the current catalog. Task creation and status polling require RunAPI authentication, while pricing inspection does not.

_Full upstream README: https://allmcps.com/mcp/grok-imagine-mcp/readme_

