AI-powered image generation MCP server with multi-model support
Project description
PixelForge MCP
An MCP server for AI-powered image generation, editing, and analysis using Google's Gemini models.
Features
- Generate images from text prompts with per-request model switching
- Edit existing images using natural language instructions
- Analyze images with AI-powered descriptions
- 10 aspect ratios and temperature control for creative flexibility
- Async-first architecture with full Pydantic validation
- Self-documenting tools with built-in model selection guidance
Quick Start
Requirements: Python 3.10+ and a Google API key
Install
pipx install pixelforge-mcp
Configure
Claude Code
claude mcp add pixelforge --scope user -e GOOGLE_API_KEY="your-key" -- pixelforge-mcp
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"pixelforge": {
"command": "pixelforge-mcp",
"env": {
"GOOGLE_API_KEY": "your-key"
}
}
}
}
VS Code
code --add-mcp '{"name":"pixelforge","command":"pixelforge-mcp","env":{"GOOGLE_API_KEY":"your-key"}}'
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"pixelforge": {
"command": "pixelforge-mcp",
"env": {
"GOOGLE_API_KEY": "your-key"
}
}
}
}
Kiro
kiro-cli mcp add --name pixelforge --scope global --command pixelforge-mcp --env "GOOGLE_API_KEY=your-key"
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"pixelforge": {
"command": "pixelforge-mcp",
"env": {
"GOOGLE_API_KEY": "your-key"
}
}
}
}
Restart Claude Desktop after saving.
Use
Ask Claude to generate, edit, or analyze images — the tools are available automatically.
Available Tools
generate_image
Generate an image from a text prompt.
Parameters:
prompt(required): Text description of the imageoutput_filename(optional): Custom filenameaspect_ratio(optional): Image dimensions (default: "1:1")temperature(optional): Creativity level 0.0-1.0 (default: 0.7)model(optional): Model to use (default: "gemini-2.5-flash-image")safety_setting(optional): Content safety filter — "preset:strict" (default) or "preset:relaxed"
Example prompts:
Generate an image of a futuristic city at sunset with flying cars in 16:9 widescreen
Create a watercolor painting of a cat sleeping on a bookshelf, use the pro model
Generate a minimalist logo for a coffee shop called "Bean There" in square format with high creativity
edit_image
Edit an existing image with a text prompt.
Parameters:
prompt(required): Description of desired changesinput_image_path(required): Path to the image to editoutput_filename(optional): Custom filename for edited imagetemperature(optional): Creativity level 0.0-1.0 (default: 0.7)
Example prompts:
Edit this image and add a rainbow in the sky
Remove the background and replace it with a gradient
Make this photo look like it was taken during golden hour
analyze_image
Get an AI-powered description and analysis of an image.
Parameters:
image_path(required): Path to the image to analyze
Example prompts:
Analyze this image and describe what you see
What's in this screenshot?
list_available_models
List all available Gemini image generation models with capabilities and selection guidance.
Example prompts:
What image generation models are available?
Which model should I use for photorealistic images?
get_server_info
Get server configuration and status information.
Example prompts:
Show me the PixelForge server configuration
What's the default model and output directory?
Model Selection & Switching
PixelForge supports per-request model switching — choose the right model for your task:
| Use case | Model | Why |
|---|---|---|
| Fast iterations | gemini-2.5-flash-image (default) |
Speed, lower cost |
| High quality output | gemini-3-pro-image-preview |
Photorealism, complex scenes |
| Text in images | gemini-3-pro-image-preview |
Legible text rendering |
| High resolution (2K/4K) | gemini-3-pro-image-preview |
Native high-res support |
Example prompts:
Generate a quick concept sketch of a logo
Uses default fast model (gemini-2.5-flash-image).
Generate a photorealistic portrait with intricate details using the pro model in 16:9
Switches to quality model (gemini-3-pro-image-preview).
Best Practices:
- Use
gemini-2.5-flash-image(default) for rapid prototyping - Switch to
gemini-3-pro-image-previewfor production quality - Always use
gemini-3-pro-image-previewfor readable text in images - Ask Claude to "list available models" for detailed model metadata
Supported Aspect Ratios
| Ratio | Description |
|---|---|
1:1 |
Square (default) |
16:9 |
Widescreen landscape |
9:16 |
Mobile portrait |
2:3 |
Classic portrait |
3:2 |
Classic landscape |
3:4 |
Portrait |
4:3 |
Traditional landscape |
4:5 |
Instagram portrait |
5:4 |
Medium format |
21:9 |
Ultrawide |
Troubleshooting
"Invalid API key" or "Authentication failed"
Double-check your Google API key is correct and has access to the Gemini API. Get a key at Google AI Studio.
"Command not found: pixelforge-mcp"
Ensure the pipx bin directory is in your PATH:
export PATH="$HOME/.local/bin:$PATH"
"Server not starting"
Check that pixelforge-mcp is installed:
pipx list | grep pixelforge
Documentation
- Configuration Guide — detailed setup and environment options
- Changelog — version history
Contributing
See CONTRIBUTING.md for development setup, code standards, and pull request guidelines.
License
Acknowledgments
Built with FastMCP, Pydantic, and gemini-imagen.
Author
Ahmed Al-Eryani @ Tehnolabs
PixelForge MCP - Forging pixels with AI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixelforge_mcp-0.1.3.tar.gz.
File metadata
- Download URL: pixelforge_mcp-0.1.3.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c5044d858e8877cfcccef7a39dfb023227862c5f560213a1bf969f9da170e12
|
|
| MD5 |
5f59d62a27847907138fc3a5abc9287e
|
|
| BLAKE2b-256 |
36ff36af73e048e53b8a9adc6373488b31016b512570324101ae8ccf81a70e5f
|
File details
Details for the file pixelforge_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pixelforge_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bc0188905e2ee632dd24668deb79f67db3dbb9fbb776f7adb569170ba87855b
|
|
| MD5 |
462055fae38af360b59a1705240573fc
|
|
| BLAKE2b-256 |
59037929dc8721e756abc4c316112d8e73d529bb52690e8ae886c42e75e15756
|