Grok2 Image MCP Server

grok image mcp server

Local serverstdio

What is the Grok2 Image MCP Server?

grok image mcp server

What you get

An MCP (Model Context Protocol) server for image generation and editing using the Grok image model from xAI.

  • Image Generation — — Generate images from text prompts with configurable aspect ratio, resolution, and batch count
  • Image Editing — — Edit existing images with natural language instructions, supporting 1–3 source images
  • Local File Support — — Provide local image paths for editing; the server reads and encodes them automatically
  • Image Proxy — — Optional proxy domain for imgen.x.ai to handle network restrictions
  • HTTP Proxy — — Optional network proxy for API requests

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
generate_image
edit_image

How to install the Grok2 Image MCP Server

{
  "mcpServers": {
    "grok_image": {
      "command": "npx",
      "args": ["grok-image-mcp"],
      "env": {
        "XAIAPI_KEY": "your-xai-api-key"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
XAIAPI_KEYCredential the server authenticates with.Yes
XAIAPI_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Grok2 Image to generate image.”
  • “Use Grok2 Image to edit image.”

Frequently asked questions

Two tools: `generate_image` for creating images from text, and `edit_image` for modifying existing images using natural language.