GIMP MCP

GIMP MCP

Generates images from text descriptions using Stable Diffusion AI, integrated with VS Code through Model Context Protocol. Supports both AI-powered realistic images and quick PIL-based sketches, with batch processing and animated GIF creation capabilities.

Category
Visit Server

README

๐ŸŽจ GIMP MCP - AI Image Generator for VS Code

Generate images from text descriptions using Stable Diffusion AI - integrated with VS Code through Model Context Protocol (MCP)

Status Python License


๐Ÿ“– Overview

GIMP MCP is an AI-powered image generation tool that integrates with VS Code through the Model Context Protocol. It enables you to generate images from text descriptions using Stable Diffusion, with automatic fallback to PIL-based sketches.

โœจ Key Features

  • ๐Ÿค– AI-Powered: Uses Stable Diffusion for realistic image generation
  • ๐ŸŽฏ VS Code Integrated: Works seamlessly with GPT-4o Agent via MCP
  • โšก Fast: Sub-second generation for sketches, ~10s for AI images
  • ๐ŸŽจ Dual Mode: AI-generated or quick PIL-based drafts
  • ๐Ÿ“ฆ Batch Processing: Generate multiple images at once
  • ๐ŸŽฌ Animation Support: Create animated GIFs from text sequences
  • ๐Ÿ› ๏ธ Easy Setup: Simple bash script for quick generation

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.9+
  • VS Code with GPT-4o Agent
  • Internet connection (for AI mode)

Installation

# 1. Navigate to project directory
cd /path/to/GimpMCP

# 2. Create virtual environment
python3 -m venv .venv

# 3. Activate virtual environment
source .venv/bin/activate

# 4. Install dependencies
pip install -r requirements.txt

Generate Your First Image

Using the bash script:

./generate_image.sh "A serene mountain landscape at sunset" "mountain_sunset"

Using Python directly:

python3 MCP/gimp-image-gen/gimp_image_gen.py \
  --prompt "A serene mountain landscape at sunset" \
  --output_file "output/mountain_sunset.png" \
  --use-ai

๐Ÿ“š Documentation


๐Ÿ’ป Usage

Two Generation Modes

1. AI Mode (Recommended)

Uses Stable Diffusion for realistic, detailed images:

./generate_image.sh "A futuristic cyberpunk city at night" "cyberpunk"

2. Sketch Mode

Fast PIL-based placeholders for quick drafts:

python3 MCP/gimp-image-gen/gimp_image_gen.py \
  --prompt "Quick concept sketch" \
  --output_file "output/sketch.png"

VS Code Integration

Ask the GPT-4o Agent directly:

"Generate an image of a vintage sports car in red, sunset lighting"

The agent will automatically invoke the tool and create your image.

Batch Generation

Generate multiple images at once:

python3 batch_generate.py output/storyboards

Animation Generation

Create animated GIFs from text sequences:

./generate_animation.sh \
  "A sunrise over mountains" \
  "Morning light on peaks" \
  "Full daylight landscape" \
  "mountain_animation"

See ANIMATION_GUIDE.md for detailed animation features.


๐ŸŽจ Examples

Check PROMPT_EXAMPLES.md for 20+ categorized examples:

  • ๐Ÿš— Vehicles & Transportation
  • ๐Ÿ  Architecture & Buildings
  • ๐Ÿ‘ค Characters & People
  • ๐ŸŒ„ Nature & Landscapes
  • ๐ŸŽจ Abstract & Artistic
  • ๐Ÿ• Food & Beverages
  • ๐ŸŽฎ Games & Technology

Sample Outputs

Prompt Output
"A simple 2D Volkswagen Beetle car in black and white, side view, minimalist design" beetle_ai.png
"A serene Japanese garden with cherry blossoms, koi pond, stone lantern" japanese_garden.png
"A futuristic cyberpunk city at night with neon lights, flying cars" cyberpunk_city.png

๐Ÿ—‚๏ธ Project Structure

GimpMCP/
โ”œโ”€โ”€ .venv/                      # Python virtual environment
โ”œโ”€โ”€ .vscode/
โ”‚   โ””โ”€โ”€ settings.json           # VS Code MCP configuration
โ”œโ”€โ”€ MCP/
โ”‚   โ””โ”€โ”€ gimp-image-gen/
โ”‚       โ”œโ”€โ”€ manifest.json       # MCP tool definition
โ”‚       โ””โ”€โ”€ gimp_image_gen.py   # Core image generator
โ”œโ”€โ”€ output/                     # Generated images
โ”œโ”€โ”€ animations/                 # Animation frames and GIFs
โ”œโ”€โ”€ generate_image.sh           # Quick generation script
โ”œโ”€โ”€ generate_animation.sh       # Animation generation script
โ”œโ”€โ”€ generate_animation.py       # Animation generator (Python)
โ”œโ”€โ”€ batch_generate.py           # Batch processing
โ”œโ”€โ”€ requirements.txt            # Python dependencies
โ””โ”€โ”€ README.md                   # This file

โš™๏ธ Configuration

AI Provider

Currently uses Pollinations.ai (free, no API key required).

To add Hugging Face support:

  1. Get API token from Hugging Face
  2. Edit gimp_image_gen.py:
headers["Authorization"] = "Bearer YOUR_TOKEN"

๐Ÿ”ง Troubleshooting

Common Issues

"Module 'PIL' not found"

source .venv/bin/activate
pip install Pillow

"Permission denied: ./generate_image.sh"

chmod +x generate_image.sh

"AI generation failed"

  • Check internet connection
  • Tool automatically falls back to PIL mode
  • Try simplifying the prompt

Getting Help


๐ŸŽฏ Tips for Best Results

For AI Mode

  • Be specific and descriptive
  • Include artistic style ("photorealistic", "cartoon style", etc.)
  • Mention lighting ("golden hour", "studio lighting")
  • Add quality terms ("highly detailed", "professional")

Example Good Prompts

โœ… "A luxury sports car in metallic blue, side view, detailed reflections, photorealistic, studio lighting"
โœ… "A cozy coffee shop interior, warm lighting, wooden furniture, people chatting, illustration style"
โœ… "A majestic medieval castle on hilltop, dramatic cloudy sky, fantasy art style, epic atmosphere"

Example Poor Prompts

โŒ "A car" (too vague)
โŒ "Nice picture of something" (no specifics)
โŒ "Image" (not descriptive)

๐Ÿ“Š Performance

Mode Speed Quality Use Case
AI Mode ~10-15s High Final images, presentations
Sketch Mode <1s Basic Placeholders, quick drafts
Animation (5 frames) ~45s High Animated sequences, demos

๐Ÿš€ Future Enhancements

  • [ ] Support for DALLยทE and other AI providers
  • [ ] Custom image sizes and aspect ratios
  • [ ] Style transfer from reference images
  • [ ] Video format support (MP4, WebM) for animations
  • [ ] Advanced GIMP scripting integration
  • [ ] WebUI for non-technical users

๐Ÿ“„ License

MIT License - See LICENSE for details


๐Ÿ™ Acknowledgments

  • Stable Diffusion - AI image generation model
  • Pollinations.ai - Free AI inference API
  • PIL/Pillow - Python imaging library
  • Model Context Protocol - VS Code integration framework

๐Ÿ“ž Support

For questions or issues:

  1. Check the documentation above
  2. Review PROMPT_EXAMPLES.md
  3. See INTEGRATION_SUMMARY.md

Version: 3.1.0
Last Updated: November 19, 2025
Status: โœ… Production Ready

Made with โค๏ธ for creative workflows

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured