GIMP MCP

GIMP MCP

Enables AI models and external applications to control GIMP remotely via the Model Context Protocol, allowing image manipulation and object querying through natural language.

Category
Visit Server

README

GIMP MCP

<!-- markdownlint-disable MD033 --> <div align="center"> <img src="resources/docs/logos/wilbericon.svg" alt="Wilber Icon" height="100" /> <img src="resources/docs/logos/mcp.svg" alt="MCP Logo" height="100" /> </div> <!-- markdownlint-enable MD033 -->

GIMP (GNU Image Manipulation Program) integration with MCP (Model Context Protocol). Allows external AI models and applications to control GIMP remotely.

Table of Contents

Introduction

Architecture

%%{init:{
  "iconSize": 24
}}%%
flowchart LR
    subgraph gimp["GIMP 3"]
        direction TB
        mcp-plugin["GIMP MCP Plugin"]
    end

    plugin-server["Bridge Server"]
    mcp-server["GIMP MCP Server"]

    subgraph apps["
        External Applications
        <br>
        <div style='display: flex; gap: 10px;'>
            <img src='resources/docs/logos/claude-color.svg' height='30' width='30'/>
            <img src='resources/docs/logos/gemini-color.svg' height='30' width='30'/>
            <img src='resources/docs/logos/openai.svg' height='30' width='30'/>
        </div>
        "]

    end

    apps <--> mcp-server
    mcp-plugin <--> plugin-server
    mcp-server <--> plugin-server

This project is comprised of two main components:

  • GIMP MCP Plugin: Opens a server to act as a bridge between a running GIMP application and the GIMP MCP server. Executes commands received from the MCP server to control GIMP.
  • GIMP MCP Server: Connects to the bridge server to send commands from external applications.

By splitting up the functionality between these two components, we isolate the GIMP-specific logic in the plugin, which allows for easier integration by end-users and facilitates MCP server development.

Features

  • GIMP 3 Support: The plugin and server are designed to work with GIMP 3 via its Python SDK.
  • Command Execution: The plugin executes commands received from the MCP server, allowing external applications to manipulate GIMP objects.
  • Extensibility: The plugin can be extended to support additional GIMP features and commands, making it adaptable to various use cases.
  • Object Serialization: The plugin serializes GIMP objects (e.g., images, layers, paths, selections) into JSON, which can be sent over the MCP protocol and provided to LLMs or agents as contextual input.
  • Containerized Execution: The plugin and server can run in a containerized environment, allowing for easy setup and development.
  • Containerized/Remote GIMP: The plugin supports running GIMP in a containerized environment with VNC-based browser access, making it easy to prototype and develop without needing a local GIMP installation.

Installation

The MCP server and plugin are designed to work with GIMP 3 only. To install the GIMP MCP Plugin and Server, follow these steps:

Environment Variables

Both the GIMP MCP Plugin and the GIMP MCP Server can be configured using environment variables. Please check the environments/example.env file in this repository for a list of available environment variables and their descriptions.

GIMP Containerization

For quick prototyping and development purposes, we support running GIMP 3 in a containerized environment with VNC-based browser access. To know more, check out the docker-compose.yaml file in this repository.

To run GIMP 3 versions, we use a custom Docker image based on linuxserver/gimp, which builds upon kasmweb/gimp. Since those images don't officially support GIMP 3 yet, we download a GIMP 3 AppImage and replace the GIMP binary in the container. This is a workaround that won't be necessary once GIMP 3 is officially supported in the linuxserver/gimp image.

Usage

To start using the GIMP MCP Plugin and Server, follow these steps:

  • Open GIMP 3
  • Start the GIMP MCP Bridge Server by executing the start server action in the plugin
  • Start the GIMP MCP Server
  • Register the MCP server with your external application

After these steps, you can start asking questions about GIMP objects, executing commands, and manipulating images, layers, paths, and selections using models connected via the MCP protocol.

Examples

We provide examples of how to use the GIMP MCP Plugin and Server:

Contributing

We welcome contributions to the GIMP MCP Plugin and Server! If you have ideas for new features, improvements, or bug fixes, please open an issue or submit a pull request. You can also check the TODOs for ideas on what to work on next.

Adding functionality to the GIMP MCP Plugin and Server is straightforward. For instance, to add a new GIMP operation, follow these steps:

  1. Implement the desired functionality in the GIMP MCP Plugin operations module, which will handle the GIMP-specific logic.
  2. Add the corresponding commands to the GIMP MCP Server in the tools module to expose that functionality over the MCP protocol.

We provide a VS Code workspace with recommended settings and extensions to help you get started quickly. You can also check out the stubs generator to generate type stubs for GIMP's Python API, which can be useful for developing plugins and scripts.

Related Projects

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
E2B

E2B

Using MCP to run code via e2b.

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
Qdrant Server

Qdrant Server

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

Official
Featured