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
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选