PixelForge MCP
An MCP server for AI-powered image generation, editing, analysis, and transformation using Google's Gemini image models.
Features
- 19 MCP tools for image generation, editing, analysis, transformation, and more
- 4 stable Gemini image models (Nano Banana 2.1, 2 Lite, 2, and Pro) plus configurable analysis models
- Quality presets (fast/balanced/quality) for simplified model selection
- Parallel multi-image generation via asyncio.gather
- Image transforms — crop, resize, rotate, flip, blur, sharpen, grayscale, watermark
- Prompt template library — 24 curated templates across 10 categories
- Generation history — full audit trail with search and pagination
- Batch processing — generate up to 10 images in parallel
- Optional Vertex AI — upscaling (x2/x4) and advanced editing modes
- Thinking mode & grounding — extended reasoning and Google Search for analysis
- 14 aspect ratios (including panoramic) and temperature control
- Async-first architecture with full Pydantic validation
- EXIF metadata embedding (prompt, model, timestamp)
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 — all 19 tools are available automatically.
Available Tools
Generation
| Tool | Description |
|---|---|
generate_image |
Generate images from text (4 models, 14 aspect ratios, quality presets, parallel multi-image) |
edit_image |
Modify existing images with text prompts |
remove_background |
Remove image background (transparent or white) |
transform_image |
Crop, resize, rotate, flip, blur, sharpen, grayscale, or watermark |
batch_generate |
Generate up to 10 images in parallel from multiple prompts |
Analysis
| Tool | Description |
|---|---|
analyze_image |
AI-powered image description with optional grounding and model override |
extract_text |
OCR — extract text with confidence levels |
detect_objects |
Detect objects with bounding boxes |
compare_images |
Compare 2-10 images for differences |
Analysis tools and optimize_prompt accept a model override. The default is gemini-3.5-flash-lite; use gemini-3.8-flash for harder OCR or reasoning.
Utility
| Tool | Description |
|---|---|
optimize_prompt |
Enhance prompts for better image generation (14 styles) |
estimate_cost |
Calculate generation costs per model/operation |
list_templates |
Browse 24 curated prompt templates across 10 categories |
apply_template |
Fill a template with your subject for a ready-to-use prompt |
list_available_models |
Model capabilities, speed, quality, and selection guidance |
get_server_info |
Server configuration and status |
History
| Tool | Description |
|---|---|
list_history |
Browse generation history with pagination and filtering |
get_generation_details |
Get full details of a specific generation |
Vertex AI (Optional)
| Tool | Description |
|---|---|
upscale_image |
Upscale images x2 or x4 (requires Vertex AI) |
advanced_edit |
Inpainting, outpainting, background swap, style transfer (requires Vertex AI) |
Model Selection
PixelForge supports per-request model switching with 4 stable Gemini image models:
Image Models (via Gemini API)
| Use case | Model | Why |
|---|---|---|
| General use (default) | gemini-nano-banana-2.1 |
1K/2K/4K, web+image grounding, thinking levels, 1:4/4:1/1:8/8:1, up to 14 references. $0.0336/img at 1K |
| Fastest, cheapest | gemini-3.1-flash-lite-image |
1K only, no panoramic, no grounding. $0.0336/img |
| Previous-gen workhorse | gemini-3.1-flash-image |
0.5K/1K/2K/4K, panoramic, grounding. $0.067/img at 1K |
| Max text fidelity | gemini-3-pro-image |
Best text rendering, complex multi-turn edits. $0.134/img at 1K/2K |
gemini-2.5-flash-image is deprecated (Google has announced its shutdown) and remains only for existing setups. Use gemini-3.1-flash-lite-image instead.
Analysis Models (text)
Used by analyze_image, extract_text, detect_objects, compare_images, and optimize_prompt. Override per request with model=.
| Model | Notes |
|---|---|
gemini-3.5-flash-lite (default) |
$0.30 in / $2.50 out per 1M tokens |
gemini-3.8-flash |
Strongest. $0.75 in / $3.75 out per 1M tokens |
Quality Presets
Instead of choosing a model manually, use quality presets:
generate_image(prompt="...", quality="fast") # gemini-3.1-flash-lite-image
generate_image(prompt="...", quality="balanced") # gemini-nano-banana-2.1 + 1K
generate_image(prompt="...", quality="quality") # gemini-3-pro-image + 2K
Vertex AI (Optional)
For advanced features like image upscaling and specialized editing modes:
- Set up a Google Cloud project with Vertex AI enabled
- Set the environment variable:
GOOGLE_CLOUD_PROJECT=your-project-id - Install the Vertex AI dependency:
pip install pixelforge-mcp[vertex]
PixelForge auto-detects Vertex AI credentials and unlocks upscale_image and advanced_edit tools.
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 |
1:4 |
Tall panoramic* |
4:1 |
Wide panoramic* |
1:8 |
Extra tall panoramic* |
8:1 |
Extra wide panoramic* |
* Panoramic ratios require gemini-nano-banana-2.1 or gemini-3.1-flash-image
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
Vertex AI features not available
Ensure GOOGLE_CLOUD_PROJECT is set and google-cloud-aiplatform is installed:
pip install pixelforge-mcp[vertex]
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 google-genai.
Author
Ahmed Al-Eryani @ Tehnolabs
PixelForge MCP - Forging pixels with AI
Metadata
Release files for pixelforge-mcp 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pixelforge_mcp-0.6.0.tar.gz | 51.5 kB | Without provenance | Details for pixelforge_mcp-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pixelforge_mcp-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for pixelforge_mcp-0.6.0-py3-none-any.whl |
Total release size: 102.0 kB
Release files / pixelforge_mcp-0.6.0.tar.gz
| Download URL | pixelforge_mcp-0.6.0.tar.gz |
|---|---|
| Size | 51.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76f22244ef5e70d3cb0266b63ec6a1c99df5d4e0d0b633ee26a1c8929ab0f621
|
|
BLAKE2b-256 checksum How to use checksums |
eb29dd1091e27b18cb84b09492c8691f8a5ddaaab502350918fc3589f7d23460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / pixelforge_mcp-0.6.0-py3-none-any.whl
| Download URL | pixelforge_mcp-0.6.0-py3-none-any.whl |
|---|---|
| Size | 50.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a140c1598537b5b9f674ded450dc1941450d5ada7fb2368cb50a85cc8220b529
|
|
BLAKE2b-256 checksum How to use checksums |
320d2161f47c9a2db5d415227cbe88a9774a0e3de482ffbc4d0ea6b9e2ea1fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for pixelforge-mcp 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.