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/6/2026
Recommend MCP Servers 💡
git-mcp
Svtter
An MCP server that handles Git commands to process specified repositories.
2025-04-24
sse
mcp-sbom-server
gkhays
MCP server to perform Trivy scans and generate SBOMs in CycloneDX format
2025-04-03
raymondlowe/roo-code-custom-mode-editor-mcp-server
raymondlowe
An MCP server that knows how to edit the Roo Code custom modes file
2025-04-28
@kukapay/whoami-mcp
kukapay
A lightweight MCP server that retrieves the username of the current system user.
2025-03-16
mcp-shell-server
tumf
A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
2024-12-10
mcp-rquest
xxxbrian
A MCP server providing realistic browser-like HTTP request capabilities with TLS/JA3/JA4 fingerprints and PDF/HTML to Markdown conversion for LLMs.
2025-03-18