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.
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)
๐ 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
- QUICKSTART.md - Get started in 30 seconds
- ANIMATION_GUIDE.md - Create animated GIFs from text sequences
- PROMPT_EXAMPLES.md - 20+ sample prompts and best practices
- INTEGRATION_SUMMARY.md - Technical implementation details
- CHANGELOG.md - Version history and updates
๐ป 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:
- Get API token from Hugging Face
- 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
- Review QUICKSTART.md for setup issues
- Check PROMPT_EXAMPLES.md for prompt tips
- See INTEGRATION_SUMMARY.md for technical details
๐ฏ 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:
- Check the documentation above
- Review PROMPT_EXAMPLES.md
- 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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
E2B
Using MCP to run code via e2b.