Basic information
About Grok2 Image Generator MCP Server
Grok2 Image Generator is an AI image generator enabling seamless artificial intelligence images generation via stdio transport for easy workflow integration.
Grok2 Image Generator is a MCP server in the Ai Ml category listed in the AddMCP.net directory, published by fl0w1nd. It exposes 2 tools, including generate_image, edit_image. Supported transport: stdio. Runtime: TypeScript. License: MIT. The repository has 29 GitHub stars. Source code is hosted on github.com. Related topics: ai-ml, community.
Setup
{
"mcpServers": {
"grok2_image": {
"command": "npx",
"args": [
"grok2-image-mcp-server"
],
"env": {
"XAIAPI_KEY": "xAI Key"
}
}
}
}
{
"mcpServers": {
"grok2_image": {
"command": "npx",
"args": [
"grok2-image-mcp-server"
],
"env": {
"XAIAPI_KEY": "xAI Key"
}
}
}
}
{
"servers": {
"grok2_image": {
"command": "npx",
"args": [
"grok2-image-mcp-server"
],
"env": {
"XAIAPI_KEY": "xAI Key"
}
}
}
}
Grok2 Image Generator MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"grok2_image": {
"command": "npx",
"args": [
"grok2-image-mcp-server"
],
"env": {
"XAIAPI_KEY": "xAI Key"
}
}
}
}
Grok2 Image Generator MCP Server tools
-
generate_image
— Generate images from text prompts using the Grok image model. Returns image URLs in markdown format. Note: URLs are temporary, download or process promptly.
prompt:string*, n:integer, aspect_ratio:string, resolution:string -
edit_image
— Edit existing images using a text prompt. Provide 1-3 source images (as URLs, base64 data URIs, or local file paths) along with editing instructions. Returns edited image URLs in markdown format.
prompt:string*, image_urls:array*, n:integer, aspect_ratio:string, resolution:string
Overview
What is Grok2 Image Generator?
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 Generator?
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 Generator
- 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 Generator
- 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
Frequently asked questions
1 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.
2 What environment variables are required?
XAIAPI_KEY is required. Optional variables include XAIAPI_BASE_URL, IMAGE_PROXY_DOMAIN, and HTTP_PROXY.
3 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.
4 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.
5 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).
Videos
Tutorials, guides, and showcases related to Grok2 Image Generator MCP Server. The player loads when you press play.
Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In