MU
Image Generation MCP Server
Generate images using Google's Gemini model through an MCP server.
Setup
- Clone this repository
git clone https://github.com/MalluBeast69/gemini-img-gen-MCP
cd gemini-img-gen-MCP
- Initialize a new MCP server project
uv init mcp-server-demo
cd mcp-server-demo
- Install dependencies using uv
uv add "mcp[cli]"
uv add "google-generativeai"
uv add "Pillow"
- Create an
.mcp-config.jsonfile in your workspace with the following content:
{
"mcpServers": {
"content_gen": {
"command": "mcp",
"args": ["run", "<PATH_TO_SERVER_PY>"],
"env": {
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OUTPUT_IMAGE_PATH": "<YOUR_OUTPUT_PATH>"
},
"transportType": "stdio",
"autoApprove": []
}
}
}
Replace:
<PATH_TO_SERVER_PY>with the full path to your server.py file (e.g., "C:/Projects/image_gen/server.py")<YOUR_GEMINI_API_KEY>with your Gemini API key from https://makersuite.google.com/app/apikey<YOUR_OUTPUT_PATH>with where you want the generated images to be saved (e.g., "C:/Users/YourName/Pictures/GeneratedImages")
Usage
- Start the MCP server:
mcp start content_gen
- The server will now be ready to generate images based on your prompts!
Requirements
- Python 3.8+
- uv package manager
- Gemini API key
Transport:
stdio
Language: 
Created: 4/24/2025
Updated: 5/13/2026
Recommend MCP Servers 💡
gitingest
coderamp-labs
Replace 'hub' with 'ingest' in any GitHub URL to get a prompt-friendly extract of a codebase
2024-11-29
mcp-geocoder-rosetta
richardschrammcom
Geocoder MCP server implementations in Python and TypeScript using Google Maps API
2025-04-15
claude-debugs-for-you
jasonjmcghee
Enable any LLM (e.g. Claude) to interactively debug any language for you via MCP and a VS Code Extension
2025-01-17
mcp-nixos
utensils
MCP-NixOS - Model Context Protocol Server for NixOS resources
2025-03-20
Office-PowerPoint-MCP-Server
GongRzhe
A MCP server for PowerPoint manipulation using python-pptx, providing tools for creating, editing, and manipulating PowerPoint presentations through the MCP protocol.
2025-03-25
elektron-mcp
zerubeus
An MCP server enabling LLMs to control Elektron synthesizers via MIDI, specifically supporting the Digitone for sound design.
2025-03-22