๐จ Gemini Image MCP Server
AI-powered image generation and editing using Google's Gemini 2.0 Flash model.
Generate images from text prompts and edit existing images with natural language instructions.
Test that your x-api-key is valid and the server accepts connections.
Endpoints
GET/ Landing page
GET/health Health check
POST/ Legacy MCP endpoint
GET/sse SSE stream (Streamable HTTP)
POST/sse MCP request (Streamable HTTP)
GET/mcp MCP endpoint (Streamable HTTP)
POST/mcp MCP request (Streamable HTTP)
Example: Generate Image
curl -X POST https://gemini-image.mcp.majewscy.tech/ \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_MCP_KEY" \
-H "x-gemini-api-key: YOUR_GEMINI_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "generate_image",
"arguments": {
"prompt": "A cute robot painting a sunset"
}
}
}'
403 - Invalid API Key (Stage 1)
Your x-api-key header is missing or incorrect.
โ
Solution: Verify your MCP API key is correct.
-32001 - Gemini API key required
Missing x-gemini-api-key header when calling tools.
โ
Solution: Add your Gemini API key via the x-gemini-api-key header.
-32603 - Gemini API error
The Gemini API returned an error (invalid key, quota exceeded, etc).
โ
Solution: Check your Gemini API key and quota at console.cloud.google.com.