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: 3/21/2026
Recommend MCP Servers 💡
list-current-dir-files
strowk
An example MCP server built with Foxy Contexts, demonstrating how to list current directory files.
2024-12-01
deuslirio/mcp-server-whatsapp-message
deuslirio
An MCP server for sending WhatsApp messages via the Meta WhatsApp Business API.
2025-04-27
edgarrmondragon/limesurvey-mcp
edgarrmondragon
An MCP server for managing LimeSurvey surveys and responses.
2025-04-26
idsulik/todo-mcp-server
idsulik
A minimal Todo MCP server providing basic todo functionalities for testing and demonstrating MCP interactions
2025-04-26
os-info-mcp-server
anurag-dhamala
MCP server to get up-to-date operating system information
2025-04-19
h0rv/d2-mcp
h0rv
A Model Context Protocol (MCP) server for working with D2: Declarative Diagramming, enabling seamless integration of diagram creation and validation into your development workflow.
2025-04-11