Skip to main content

AI-powered image generation MCP server with multi-model support

Project description

PyPI version Python versions License: AGPL-3.0

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

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 image
  • output_filename (optional): Custom filename
  • aspect_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 changes
  • input_image_path (required): Path to the image to edit
  • output_filename (optional): Custom filename for edited image
  • temperature (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:

  1. Use gemini-2.5-flash-image (default) for rapid prototyping
  2. Switch to gemini-3-pro-image-preview for production quality
  3. Always use gemini-3-pro-image-preview for readable text in images
  4. 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

Contributing

See CONTRIBUTING.md for development setup, code standards, and pull request guidelines.

License

AGPL-3.0

Acknowledgments

Built with FastMCP, Pydantic, and gemini-imagen.

Author

Ahmed Al-Eryani @ Tehnolabs


PixelForge MCP - Forging pixels with AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pixelforge_mcp-0.1.1.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixelforge_mcp-0.1.1-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file pixelforge_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: pixelforge_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pixelforge_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c48993c3c5ff101f446df99db44c8dda611f5a5506c8627831e11fd1912d1667
MD5 8be5aa8c6d14402dc5844ea3162854ba
BLAKE2b-256 d262fe84966f91689c3ff47027e550b7251fffa878ffb05823054ba9e4007486

See more details on using hashes here.

File details

Details for the file pixelforge_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pixelforge_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pixelforge_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ccabe089d62f22e29866242a3b218c52888c7ac7994703108c9cf14a46d9c5
MD5 06b22a49cd551d66589381fba1e6a983
BLAKE2b-256 7a6baf85311ebe954e190932448c1b47f6d4b9ef3b332451e7a0a1b48d41b2c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page