Grok2 Image MCP Server
@fl0w1nd
About Grok2 Image MCP Server
grok image mcp server
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"grok_image": {
"command": "npx",
"args": [
"grok-image-mcp"
],
"env": {
"XAIAPI_KEY": "your-xai-api-key"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Grok2 Image MCP Server?
An MCP (Model Context Protocol) server for generating and editing images using the Grok image model from xAI. It serves developers integrating image capabilities into AI workflows via MCP-compatible clients.
How to use Grok2 Image MCP Server?
Install via npx in your MCP client configuration, setting the required environment variable XAIAPI_KEY. The server exposes two tools: generate_image and edit_image, invoked by the client with parameters such as prompt, image URLs, aspect ratio, resolution, and batch count.
Key features of Grok2 Image MCP Server
- Image generation from text prompts with configurable aspect ratio and resolution
- Image editing using natural language instructions with 1–3 source images
- Local file path support for editing; server auto-reads and encodes them
- Optional image proxy domain to replace
imgen.x.aiin returned URLs - Optional HTTP/HTTPS network proxy for API requests
Use cases of Grok2 Image MCP Server
- Generate images from descriptive prompts with custom dimensions and batch count
- Edit existing images by providing URLs, base64 data, or local file paths
- Overcome network restrictions on
imgen.x.aiusing an image proxy domain - Configure network proxying for API calls through corporate or regional gateways
FAQ from Grok2 Image MCP Server
What tools does Grok2 Image MCP Server provide?
Two tools: generate_image for creating images from text, and edit_image for modifying existing images using natural language.
What environment variables are required?
XAIAPI_KEY is required. Optional variables include XAIAPI_BASE_URL, IMAGE_PROXY_DOMAIN, and HTTP_PROXY.
Can I use local image files for editing?
Yes, the edit_image tool accepts local file paths in the image_urls parameter; the server reads and encodes them automatically.
How do I handle network or image URL restrictions?
Set XAIAPI_BASE_URL to an API proxy, IMAGE_PROXY_DOMAIN to a custom proxy for image URLs, or HTTP_PROXY for a general network proxy.
What are the parameter limits for image generation?
n (number of images) supports 1–10 (default 1). Aspect ratio options include 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, and auto. Resolution can be 1k or 2k (default 1k).
More Media & Design MCP servers
Melrōse - programming of music melodies
emickleiinteractive programming of melodies, producing MIDI
NS Travel Information MCP Server
r-huijtsA Model Context Protocol (MCP) server that provides access to NS (Dutch Railways) travel information through Claude AI. This server enables Claude to fetch real-time train travel information and disruptions using the official Dutch NS API.
Photoshop MCP Server
loonghaoA Model Context Protocol (MCP) server that interfaces with Adobe Photoshop's Python API. Enables LLMs to execute image editing operations, automate workflows, and manage Photoshop tasks through structured commands and context-aware interactions.
RustChain MCP
ScottcjnMCP server for RustChain blockchain and BoTTube video platform — AI agent tools for earning RTC tokens. Built on createkr's RustChain SDK.
Game Asset Generator using MCP and Hugging Face Spaces
MubarakHAlketbiAn MCP server for creating 2D/3D game assets from text using Hugging Face AI models.
Comments