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

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 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.2.tar.gz (26.5 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.2-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pixelforge_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 26.5 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.2.tar.gz
Algorithm Hash digest
SHA256 1920d4a816f1b8dfa853624dcf820b780d27b58bb39facd1952d0fd1ef4fcb66
MD5 ccdddcab284addf72cf981daa86e1484
BLAKE2b-256 71fb1e07b8b3272adc57aaf2117903fe390abde63c80f4aa37882166a8e4feb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pixelforge_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b810b43a2ca08665c515b1af4655429821136a72a5debe8699f90f4156a324c1
MD5 c18697d2e28957926ef762271b6c03b1
BLAKE2b-256 efc9ffc75d28db3529725ffcebe53cfd4a24be43c973624e32eacb1f14100af9

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