GIMP MCP
Overview
This project enables non-technical users to edit images with GIMP through simple conversational commands, bridging the gap between GIMP's powerful capabilities and natural language interaction. It also allows professionals to execute complex multi-step workflows faster than traditional point-and-click methods.
Users can describe what they want to achieve - from basic photo adjustments to sophisticated artistic modifications. For example, "brighten the background and add a vintage filter" or "remove the red-eye and sharpen the subject" - and the system translates these requests into precise GIMP operations.
The project is fully functional and exposes all GIMP features via MCP (Model Context Protocol). New in this version: MCP-compliant image export that allows AI assistants like Claude to directly view and analyze your GIMP images!
Key Features
✨ MCP-Compliant Image Export: Direct image viewing for AI assistants
🎨 Full GIMP 3.0 API Access: Execute any GIMP operation via PyGObject
🔧 Multi-Format Export: PNG, JPEG, BMP, TIFF with quality control
📊 Image Metadata: Get image info without transferring data
🛡️ Robust Error Handling: Multiple fallback methods for reliability
🔌 Universal MCP Support: Works with Claude Desktop, Gemini CLI, PydanticAI, and more
Prerequisites
- GIMP 3.0 and above: This project is developed and tested with GIMP 3.0. Earlier versions are not supported.
- MCP-compatible AI client: Claude Desktop, Gemini CLI, PydanticAI, or other MCP clients.
- Python 3.8+: Required for the MCP server.
- uv: A modern Python package installer and resolver.
Quick Start
1. Install Dependencies
2. Install the GIMP Plugin
Copy the gimp-mcp-plugin.py
to your GIMP plug-ins
directory and make it executable.
Quick Install (Linux/macOS):
Manual Installation:
For detailed instructions on locating your GIMP plugins folder across different operating systems, please refer to this guide:
GIMP Plugin Installation Guide (Wikibooks)
Make sure the plugin file has "execute" permission.
Restart GIMP after installation.
3. Start the MCP Server in GIMP
- Open any image in GIMP
- Navigate to Tools > Start MCP Server
- The server will start on
localhost:9877
4. Configure Your MCP Client
Claude Desktop
Add these lines to your Claude Desktop configuration file:
Location: ~/.config/Claude/claude_desktop_config.json
(Linux/macOS) or %APPDATA%\Claude\claude_desktop_config.json
(Windows)
Gemini CLI
Configure your Gemini CLI MCP server in ~/.config/gemini/.gemini_config.json
:
PydanticAI
For PydanticAI agents, use the MCPServerStdio class:
Other MCP Clients
For other MCP clients that support stdio transport, use the command:
Usage Examples
Basic Usage
- Start GIMP and open any image
- Start MCP Server: Tools > Start MCP Server
- Launch your MCP client (Claude Desktop, etc.)
- Start creating: "Draw a face and a sheep with GIMP"
Advanced Features
Image Analysis
Uses get_image_bitmap()
to retrieve and analyze the current canvas
Fast Image Information
Uses get_image_metadata()
to quickly get image info without transferring bitmap data
Smart Workflow Decisions
Uses get_image_metadata()
to analyze image structure for intelligent decision making
Environment Discovery
Uses get_gimp_info()
to provide comprehensive environment information for optimal support
Troubleshooting Support
Uses get_gimp_info()
to diagnose installation and configuration problems
Complex Workflows
Combines multiple GIMP operations with image export for verification
Available MCP Tools
The GIMP MCP server provides several tools that AI assistants can use:
🖼️ Image Export Tools
get_image_bitmap()
Returns the current image as a base64-encoded PNG bitmap with support for region extraction and scaling.
Parameters:
max_width
(optional): Maximum width for full image scalingmax_height
(optional): Maximum height for full image scalingregion
(optional): Dictionary for region extraction with keys:origin_x
: X coordinate of region top-left cornerorigin_y
: Y coordinate of region top-left cornerwidth
: Width of region to extractheight
: Height of region to extractmax_width
: Maximum width for region scaling (optional)max_height
: Maximum height for region scaling (optional)
Usage Examples:
Example Output
Example output from the prompt "draw me a face and a sheep" using GIMP MCP
Future Enhancements
We welcome contributions! Here are some areas for improvement:
Planned Features
- 📚 Recipe Collection: Common GIMP workflows as reusable MCP tools
- ↩️ Undo System: History management and rollback capabilities
- 🔍 Visual Feedback: Enhanced progress indicators and operation previews
- 🚀 Dynamic Discovery: Auto-generate MCP tools from GIMP's procedure database
- 📝 Enhanced Errors: Context-aware error messages with suggested fixes
- 🛡️ Resource Management: Better cleanup and error recovery in the plugin
Architecture Improvements
- 🔒 Security: Sandboxed execution environment for user commands
- ⚡ Performance: Optimized image transfer for large files
- 🌐 Remote Access: Support for network-accessible GIMP instances
- 📊 Analytics: Usage metrics and performance monitoring
Contributing
Contributions are welcome! Whether it's bug fixes, new features, or documentation improvements, feel free to submit a Pull Request or open an issue.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
MCP server that bridges GIMP 3.0 with natural language commands, enabling conversational image editing through Claude Desktop and other MCP clients. Exposes GIMP's full PyGObject API for AI-powered image manipulation.
Related MCP Servers
- AsecurityAlicenseAqualityA MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.Last updated -4MIT License
- -securityAlicense-qualityAn MCP tool server that enables generating and editing images through OpenAI's image models, supporting text-to-image generation and advanced image editing (inpainting, outpainting) across various MCP-compatible clients.Last updated -71MIT License
- AsecurityAlicenseAqualityAn MCP server that allows Claude to use OpenAI's image generation capabilities (gpt-image-1) to create image assets for users, which is particularly useful for game and web development projects.Last updated -113MIT License
- -securityFlicense-qualityAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.Last updated -42