PixelForge MCP
PixelForge MCP lets you generate, edit, transform, analyze, and manage images using Google Gemini models through 19 MCP tools.
Generate images from text prompts with model, quality, resolution, aspect ratio, temperature, safety, reference images, and multi-variation controls.
Edit images with prompts, remove backgrounds, perform advanced edits (inpainting, outpainting, background swap, style transfer, product shots), and generatively upscale images.
Transform images locally: crop, resize, rotate, flip, blur, sharpen, grayscale, and watermark.
Analyze images: describe them, extract text via OCR, detect objects with bounding boxes, and compare 2–10 images with optional grounding and model overrides.
Optimize prompts and browse/apply 24 curated prompt templates across 10 categories.
Batch-generate up to 10 images in parallel.
Estimate costs, list available models, and get server configuration/capabilities.
Browse generation history with pagination/filtering and retrieve specific generation details.
Provides AI-powered image generation, editing, analysis, and transformation using Google's Gemini and Imagen 4 models.
Enables advanced features like image upscaling (x2/x4) and advanced editing modes (inpainting, outpainting, background swap, style transfer) via Vertex AI.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PixelForge MCP generate an image of a serene lake at sunset with mountains in the background"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Generative upscale and mode-driven editing — upscale to the next 1K/2K/4K tier, inpaint, outpaint, background swap, style transfer, product shots
Two backends — Gemini API key, or Vertex AI with a service account / Application Default Credentials
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)
Related MCP server: Gemini Gen MCP
Quick Start
Requirements: Python 3.10+ and a Google API key or a Google Cloud project with Vertex AI (see Authentication)
Install
The quickest route in Claude Code, Codex or Cursor is the plugin, which starts the server with uvx pixelforge-mcp@latest (needs uv) and adds seven workflow skills:
# Claude Code
/plugin install pixelforge --marketplace Tehnolabs/pixelforge-mcp
# Codex
codex plugin marketplace add Tehnolabs/pixelforge-mcp && codex plugin add pixelforge@pixelforge
# Cursor: Customize -> From GitHub Repository -> https://github.com/Tehnolabs/pixelforge-mcpSee plugins/pixelforge/README.md for credentials per client and the skill list. For any other client, or a manual setup, install the server once:
pipx install pixelforge-mcpConfigure
The examples below use a Gemini API key. To use a Google Cloud service account instead, replace GOOGLE_API_KEY with GOOGLE_CLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS as shown in Use a service account instead of an API key.
Claude Code
claude mcp add pixelforge --scope user -e GOOGLE_API_KEY="your-key" -- pixelforge-mcpCursor
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.
Authentication
PixelForge talks to Google through one of two backends. Every tool runs on either.
Gemini API key
Set any one of these variables. Get a key at Google AI Studio.
Variable | Notes |
| Standard |
| Alternative |
| Alternative |
Vertex AI
Use a Google Cloud project with the Vertex AI API enabled and Application Default Credentials: a service account key file, gcloud auth application-default login, or the attached identity when running on Google Cloud. The identity needs the Vertex AI User role (roles/aiplatform.user). No extra packages are required.
Variable | Notes |
| Project ID. Setting it enables the Vertex AI backend |
| Path to a service account key file. Not needed with another ADC source |
| Vertex AI location. Default |
|
|
Use a service account instead of an API key
A service account runs every tool through Vertex AI, with no Gemini API key. One-time setup with the gcloud CLI, using your own project ID:
PROJECT_ID="YOUR_PROJECT_ID"
SA="pixelforge-sa@${PROJECT_ID}.iam.gserviceaccount.com"
# 1. Enable Vertex AI in the project
gcloud services enable aiplatform.googleapis.com --project="$PROJECT_ID"
# 2. Create the service account and grant it the Vertex AI User role
gcloud iam service-accounts create pixelforge-sa --project="$PROJECT_ID"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SA" --role="roles/aiplatform.user"
# 3. Create a key file outside any repository
mkdir -p ~/.config/pixelforge
gcloud iam service-accounts keys create ~/.config/pixelforge/service-account.json \
--iam-account="$SA"Then configure your client with the project and the key path in place of GOOGLE_API_KEY. Claude Code:
claude mcp add pixelforge --scope user \
-e GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID" \
-e GOOGLE_APPLICATION_CREDENTIALS="$HOME/.config/pixelforge/service-account.json" \
-- pixelforge-mcpCursor, Windsurf, Claude Desktop and other JSON-configured clients take the same two variables in the env block:
{
"mcpServers": {
"pixelforge": {
"command": "pixelforge-mcp",
"env": {
"GOOGLE_CLOUD_PROJECT": "YOUR_PROJECT_ID",
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account.json"
}
}
}
}Verify by asking your client for get_server_info: backend.name should be vertex_ai. Commands for every client are in docs/configuration.md.
An API key variable set anywhere in the environment (a shell profile, for example) takes precedence, and the service account is ignored. Unset it, or add
"GOOGLE_GENAI_USE_VERTEXAI": "true"to the sameenvblock.The key file grants access to your project. Keep it out of version control, give the service account only
roles/aiplatform.user, and delete keys you no longer use (gcloud iam service-accounts keys list --iam-account="$SA").No key file is needed when credentials come from
gcloud auth application-default login(optionally with--impersonate-service-account="$SA") or from the attached identity on Google Cloud. Set onlyGOOGLE_CLOUD_PROJECTin that case.
Backend selection
An API key selects the Gemini API.
GOOGLE_CLOUD_PROJECTwith no API key selects Vertex AI.Both set: the API key wins unless
GOOGLE_GENAI_USE_VERTEXAI=true.
get_server_info reports the active backend under backend.name.
Available Tools
Generation
Tool | Description |
| Generate images from text (4 models, 14 aspect ratios, quality presets, parallel multi-image) |
| Modify existing images with text prompts |
| Remove image background (transparent or white) |
| Crop, resize, rotate, flip, blur, sharpen, grayscale, or watermark |
| Generate up to 10 images in parallel from multiple prompts |
| Generative upscale to the next 1K/2K/4K tier (re-render with a Gemini image model) |
| Inpainting, outpainting, background swap, style transfer, product shots (prompt-driven, optional mask guidance) |
Analysis
Tool | Description |
| AI-powered image description with optional grounding and |
| OCR — extract text with confidence levels |
| Detect objects with bounding boxes |
| 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 |
| Enhance prompts for better image generation (14 styles) |
| Calculate generation costs per model/operation |
| Browse 24 curated prompt templates across 10 categories |
| Fill a template with your subject for a ready-to-use prompt |
| Model capabilities, speed, quality, and selection guidance |
| Server configuration and status |
History
Tool | Description |
| Browse generation history with pagination and filtering |
| Get full details of a specific generation |
Model Selection
PixelForge supports per-request model switching with 4 stable Gemini image models:
Image Models
Use case | Model | Why |
General use (default) |
| 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 |
| 1K only, no panoramic, no grounding. $0.0336/img |
Previous-gen workhorse |
| 0.5K/1K/2K/4K, panoramic, grounding. $0.067/img at 1K |
Max text fidelity |
| 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.
0.5K is gemini-3.1-flash-image only and is sent to the API as 512px. generate_image rejects a size the chosen model cannot output.
upscale_image and advanced_edit re-render with gemini-nano-banana-2.1 unless model is set. upscale_image outputs the smallest of 1K/2K/4K that covers the source times the factor (capped at 4K) and needs a model with 2K/4K output (gemini-nano-banana-2.1, gemini-3.1-flash-image, or gemini-3-pro-image); gemini-3.1-flash-lite-image is rejected. Both tools pin the nearest aspect ratio the model supports; models without panoramic output get a standard ratio and a warning.
Analysis Models (text)
Used by analyze_image, extract_text, detect_objects, compare_images, and optimize_prompt. Override per request with model=.
Model | Notes |
| $0.30 in / $2.50 out per 1M tokens |
| 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 + 2KSupported Aspect Ratios
Ratio | Description |
| Square (default) |
| Widescreen landscape |
| Mobile portrait |
| Classic portrait |
| Classic landscape |
| Portrait |
| Traditional landscape |
| Instagram portrait |
| Medium format |
| Ultrawide |
| Tall panoramic* |
| Wide panoramic* |
| Extra tall panoramic* |
| 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. If you meant to use a service account, an API key variable set anywhere in the environment takes precedence: unset it or set GOOGLE_GENAI_USE_VERTEXAI=true.
"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"Publisher model ... was not found" (Vertex AI)
With a regional location in the message, the request went to a regional Vertex AI endpoint. The current Gemini image and text models are served from the global endpoint: set GOOGLE_CLOUD_LOCATION=global (the default) or remove a regional override. With locations/global in the message, the model ID is unknown or retired on Vertex AI (list_available_models lists current IDs), or the project cannot access it yet. The same 404 is returned for retired Imagen model IDs, which PixelForge no longer calls.
"Rate limit exceeded" or "Permission denied"
The message carries Google's own text. A quota limit: 0, or "has not been used in project ... or it is disabled", is a project setup limit rather than a model problem: enable the Vertex AI API (or the Generative Language API for an API key), grant roles/aiplatform.user, or request a quota increase.
"No credentials found"
Set an API key, or GOOGLE_CLOUD_PROJECT with Application Default Credentials. See Authentication.
Documentation
Plugin for Claude Code, Codex and Cursor and ADR-004 on how the bundle is laid out
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
Available Tools
19 toolsadvanced_editAdvanced EditA
Edit an image with a specialized mode using a Gemini image model.
Each mode wraps the prompt in an instruction tuned for that edit. An optional mask (white = region to change) is passed to the model as guidance; the boundary is interpreted semantically, not pixel-exactly.
Inputs: prompt (required), edit_mode (required), image_path (required), model, +3 more. Returns: object
analyze_imageAnalyze ImageC
Analyze an image and get a detailed description.
Inputs: image_path (required), model, prompt, use_grounding. Returns: object
apply_templateApply TemplateC
Apply a prompt template with a subject to generate a ready-to-use prompt.
Inputs: subject (required), template_name (required). Returns: object
batch_generateBatch GenerateA
Generate multiple images in parallel from a list of prompts.
Inputs: prompts (required), model, quality, aspect_ratio, +1 more. Returns: object
compare_imagesCompare ImagesB
Compare two or more images and analyze differences.
Useful for A/B testing, design review, before/after comparison, and change detection.
Inputs: image_paths (required), model, prompt, use_grounding. Returns: object
detect_objectsDetect ObjectsA
Detect objects in an image with bounding boxes.
Uses Gemini's zero-shot object detection. Returns bounding box coordinates normalized to 0-1000 scale as [y_min, x_min, y_max, x_max].
Inputs: image_path (required), model, objects, use_grounding. Returns: object
edit_imageEdit ImageC
Edit an existing image using a text prompt.
Inputs: prompt (required), input_image_path (required), model, temperature, +2 more. Returns: object
estimate_costEstimate CostA
Estimate the cost of an image operation.
Shows pricing per model per operation to help with budgeting.
Inputs: operation (required), model, number_of_images. Returns: object
extract_textExtract TextB
Extract text from an image using OCR.
Uses Gemini's vision capabilities for high-quality text extraction. Works with screenshots, documents, signs, handwriting, etc.
Inputs: image_path (required), model, use_grounding. Returns: object
generate_imageGenerate ImageC
Generate an image from a text prompt using Google Gemini.
Inputs: prompt (required), model, quality, image_size, +9 more. Returns: object
get_generation_detailsGet Generation DetailsC
Get details of a specific generation by ID.
Inputs: generation_id (required). Returns: object
get_server_infoGet Server InfoA
Get MCP server configuration, capabilities, and available tools.
Inputs: no named parameters. Returns: object
list_available_modelsList Available ModelsA
List all available image generation models with capabilities.
Returns model details including speed, quality, resolution support, and best use cases. Use this to pick the right model for your task.
Inputs: no named parameters. Returns: object
list_historyList HistoryC
List recent generation history.
Inputs: limit, offset, tool_filter. Returns: object
list_templatesList TemplatesB
List available prompt templates for image generation.
Inputs: category. Returns: object
optimize_promptOptimize PromptA
Enhance a basic prompt for dramatically better image results.
Uses AI to add details about lighting, composition, colors, textures, and artistic techniques. The #1 way to improve generation quality.
Inputs: prompt (required), model, style. Returns: object
remove_backgroundRemove BackgroundA
Remove the background from an image.
Uses AI to isolate the main subject and remove the background. Best results with clear subjects against distinct backgrounds.
Inputs: image_path (required), output_format, output_filename. Returns: object
transform_imageTransform ImageC
Transform an image using Pillow operations.
Inputs: operation (required), image_path (required), x, y, +12 more. Returns: object
upscale_imageUpscale ImageA
Upscale an image to a higher 1K/2K/4K size tier with a Gemini image model.
The source is re-rendered at a higher size tier with an instruction to reproduce it exactly. Fine details can differ from the source; for exact pixel scaling use transform_image(operation="resize").
Inputs: image_path (required), model, output_format, upscale_factor, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have clearly distinct purposes: generate_image vs batch_generate, analyze_image vs detect_objects vs extract_text, and transform_image vs upscale_image are well differentiated. Some mild overlap remains between edit_image and advanced_edit, and between list_available_models and get_server_info, though descriptions provide enough guidance.
All tool names use snake_case, which is consistent throughout. Most follow a verb_noun pattern, but a few are adjective/noun-first or otherwise nonstandard, such as advanced_edit and batch_generate, keeping it from being perfectly predictable.
Nineteen tools is slightly above the ideal range, but the server covers a broad image platform spanning generation, editing, analysis, utilities, prompt assistance, cost estimation, and history. The count is defensible overall, though the surface is on the heavy side.
The server covers the core image lifecycle well: generation, batching, editing, upscaling, Pillow transforms, background removal, analysis, OCR, object detection, comparison, prompt templates, cost estimation, and history. Minor gaps exist around template/history management, such as no create/delete template or delete history operations.
Maintenance
Related MCP Connectors
MCP server for Midjourney AI image generation and editing
MCP server for Google Veo AI video generation
MCP server for Qwen Image 3 AI image generation
MCP server for Flux AI image generation
Related MCP Servers
- AlicenseAqualityBmaintenanceA MCP server that provides AI-powered image generation capabilities through Google's Gemini 2.5 Flash Image model.47,941 PyPI411MIT
- AlicenseBqualityDmaintenanceMCP server for generating images and audio using Google's Gemini AI models.278 PyPI2MIT
- AlicenseAqualityDmaintenanceMCP server for AI image generation and editing using Google Gemini image models.7MIT
- AlicenseAqualityDmaintenanceAn MCP server for AI-powered image generation, editing, and video generation using Google Gemini and Veo models.10123 npm4MIT