gimp-mcp 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. gimp_mcp-0.2.0/LICENSE +21 -0
  2. gimp_mcp-0.2.0/PKG-INFO +95 -0
  3. gimp_mcp-0.2.0/README.md +71 -0
  4. gimp_mcp-0.2.0/pyproject.toml +90 -0
  5. gimp_mcp-0.2.0/pyproject.toml.orig +72 -0
  6. gimp_mcp-0.2.0/src/gimp_mcp/__init__.py +9 -0
  7. gimp_mcp-0.2.0/src/gimp_mcp/__main__.py +5 -0
  8. gimp_mcp-0.2.0/src/gimp_mcp/bridge.py +334 -0
  9. gimp_mcp-0.2.0/src/gimp_mcp/cli.py +273 -0
  10. gimp_mcp-0.2.0/src/gimp_mcp/colors.py +48 -0
  11. gimp_mcp-0.2.0/src/gimp_mcp/coverage.py +457 -0
  12. gimp_mcp-0.2.0/src/gimp_mcp/doctor.py +514 -0
  13. gimp_mcp-0.2.0/src/gimp_mcp/errors.py +45 -0
  14. gimp_mcp-0.2.0/src/gimp_mcp/headless.py +240 -0
  15. gimp_mcp-0.2.0/src/gimp_mcp/ids.py +61 -0
  16. gimp_mcp-0.2.0/src/gimp_mcp/installer.py +52 -0
  17. gimp_mcp-0.2.0/src/gimp_mcp/models.py +136 -0
  18. gimp_mcp-0.2.0/src/gimp_mcp/paths.py +89 -0
  19. gimp_mcp-0.2.0/src/gimp_mcp/plugin/gimp-mcp-bridge/gimp-mcp-bridge.py +116 -0
  20. gimp_mcp-0.2.0/src/gimp_mcp/plugin/gimp-mcp-bridge/gmb_ops.py +1771 -0
  21. gimp_mcp-0.2.0/src/gimp_mcp/plugin/gimp-mcp-bridge/gmb_policy.py +283 -0
  22. gimp_mcp-0.2.0/src/gimp_mcp/plugin/gimp-mcp-bridge/gmb_server.py +386 -0
  23. gimp_mcp-0.2.0/src/gimp_mcp/plugin/gimp-mcp-bridge/gmb_undo.py +54 -0
  24. gimp_mcp-0.2.0/src/gimp_mcp/plugin_modules.py +24 -0
  25. gimp_mcp-0.2.0/src/gimp_mcp/py.typed +0 -0
  26. gimp_mcp-0.2.0/src/gimp_mcp/server.py +50 -0
  27. gimp_mcp-0.2.0/src/gimp_mcp/setup.py +574 -0
  28. gimp_mcp-0.2.0/src/gimp_mcp/toolkit.py +106 -0
  29. gimp_mcp-0.2.0/src/gimp_mcp/tools/__init__.py +0 -0
  30. gimp_mcp-0.2.0/src/gimp_mcp/tools/files.py +211 -0
  31. gimp_mcp-0.2.0/src/gimp_mcp/tools/filters.py +155 -0
  32. gimp_mcp-0.2.0/src/gimp_mcp/tools/history.py +153 -0
  33. gimp_mcp-0.2.0/src/gimp_mcp/tools/inspect.py +44 -0
  34. gimp_mcp-0.2.0/src/gimp_mcp/tools/layers.py +241 -0
  35. gimp_mcp-0.2.0/src/gimp_mcp/tools/paint.py +130 -0
  36. gimp_mcp-0.2.0/src/gimp_mcp/tools/pdb.py +68 -0
  37. gimp_mcp-0.2.0/src/gimp_mcp/tools/preview.py +85 -0
  38. gimp_mcp-0.2.0/src/gimp_mcp/tools/procedures.py +72 -0
  39. gimp_mcp-0.2.0/src/gimp_mcp/tools/selection.py +167 -0
  40. gimp_mcp-0.2.0/src/gimp_mcp/tools/session.py +55 -0
  41. gimp_mcp-0.2.0/src/gimp_mcp/tools/text.py +190 -0
  42. gimp_mcp-0.2.0/src/gimp_mcp/tools/transform.py +136 -0
  43. gimp_mcp-0.2.0/src/gimp_mcp/versions.py +36 -0
gimp_mcp-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Manoah BERNIER and gimp-mcp contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.4
2
+ Name: gimp-mcp
3
+ Version: 0.2.0
4
+ Summary: A reliable Model Context Protocol server for inspecting and editing GIMP 3 projects.
5
+ Keywords: gimp,mcp,model-context-protocol,image-editing,llm
6
+ Author: Manoah BERNIER
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Topic :: Multimedia :: Graphics :: Editors :: Raster-Based
17
+ Requires-Dist: mcp>=2.3,<3
18
+ Requires-Python: >=3.11
19
+ Project-URL: Homepage, https://github.com/mhbxyz/gimp-mcp
20
+ Project-URL: Documentation, https://github.com/mhbxyz/gimp-mcp/tree/main/docs
21
+ Project-URL: Issues, https://github.com/mhbxyz/gimp-mcp/issues
22
+ Project-URL: Changelog, https://github.com/mhbxyz/gimp-mcp/blob/main/CHANGELOG.md
23
+ Description-Content-Type: text/markdown
24
+
25
+ # gimp-mcp
26
+
27
+ <!-- mcp-name: io.github.mhbxyz/gimp-mcp -->
28
+
29
+ Let an AI assistant inspect and edit images in **your running GIMP** through the
30
+ [Model Context Protocol](https://modelcontextprotocol.io): layers, text, selections, filters, files, previews.
31
+ Linux, GIMP 3.2+. MIT licensed.
32
+
33
+ ## Quickstart
34
+
35
+ You need [uv](https://docs.astral.sh/uv/getting-started/installation/) and an MCP client
36
+ (Claude Code, Claude Desktop, VS Code, Cursor…). On Ubuntu 26.04:
37
+
38
+ <!-- doctest: quickstart -->
39
+ ```sh
40
+ sudo apt install -y gimp python3-gi gir1.2-gimp-3.0 # GIMP 3.2+ (other distributions and Flatpak: see below)
41
+ uvx gimp-mcp setup # installs the GIMP plug-in, adds the server to your MCP clients
42
+ uvx gimp-mcp doctor # after (re)starting GIMP: every check should be [ok]
43
+ ```
44
+
45
+ Then ask your assistant: *"Use GIMP to create a 1280×720 image with the title 'Hello' and export it to
46
+ ~/hello.png"*.
47
+
48
+ * Other distributions (Arch, Debian 14, Fedora 44, openSUSE Tumbleweed, Alpine 3.24) and their packages:
49
+ [compatibility](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/compatibility.md#linux-distributions).
50
+ GIMP from **Flathub** works too: `flatpak install flathub org.gimp.GIMP`, then the two `uvx` commands.
51
+ * Step-by-step per client: [Claude Code](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/claude-code.md),
52
+ [Claude Desktop](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/claude-desktop.md),
53
+ [VS Code and Cursor](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/vscode-cursor.md),
54
+ [any other MCP client](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/generic.md).
55
+ * Something wrong? `uvx gimp-mcp doctor` says what and how to fix it
56
+ ([troubleshooting](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/troubleshooting.md)).
57
+
58
+ Also listed in the [official MCP registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.mhbxyz/gimp-mcp)
59
+ as `io.github.mhbxyz/gimp-mcp` (from the first PyPI release on).
60
+
61
+ ## What it can do
62
+
63
+ 52 tools: inspect images and layer trees, previews, create/open/save XCF/export PNG and JPEG, layers and
64
+ groups, resize/crop/transform, selections and masks, painting, brightness/contrast, hue/saturation, blur
65
+ (destructive or editable filters), editable text, undo groups and checkpoints, and allowlisted access to
66
+ ~420 GIMP procedures. See the [tool reference](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/tools.md)
67
+ and the [coverage matrix](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/coverage.md).
68
+
69
+ ## Demo
70
+
71
+ ```sh
72
+ uv run demo/thumbnail.py # from a checkout: isolated headless GIMP, outputs in demo/out/
73
+ ```
74
+
75
+ Builds a 1280×720 thumbnail through MCP only (blurred backdrop with editable corrections, masked photo,
76
+ banner, editable title, a badge undone and redone with checkpoints), saves and reopens the XCF, exports PNG
77
+ and JPEG, and writes a report of every call and check.
78
+ Walk-through: [docs/guide-thumbnail.md](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/guide-thumbnail.md).
79
+
80
+ ## Documentation
81
+
82
+ - [Installation reference](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/install.md) (manual install, upgrade, uninstall) ·
83
+ [MCP clients](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients.md) ·
84
+ [troubleshooting](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/troubleshooting.md) ·
85
+ [compatibility](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/compatibility.md)
86
+ - [Tool reference](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/tools.md) ·
87
+ [coverage matrix](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/coverage.md)
88
+ - [Architecture](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/architecture.md) ·
89
+ [bridge protocol](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/bridge-protocol.md) ·
90
+ [security](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/security.md) ·
91
+ [decisions](https://github.com/mhbxyz/gimp-mcp/tree/main/docs/adr)
92
+ - [Testing](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/testing.md) ·
93
+ [releasing](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/releasing.md) ·
94
+ [GIMP behaviour notes](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/gimp-notes.md) ·
95
+ [changelog](https://github.com/mhbxyz/gimp-mcp/blob/main/CHANGELOG.md)
@@ -0,0 +1,71 @@
1
+ # gimp-mcp
2
+
3
+ <!-- mcp-name: io.github.mhbxyz/gimp-mcp -->
4
+
5
+ Let an AI assistant inspect and edit images in **your running GIMP** through the
6
+ [Model Context Protocol](https://modelcontextprotocol.io): layers, text, selections, filters, files, previews.
7
+ Linux, GIMP 3.2+. MIT licensed.
8
+
9
+ ## Quickstart
10
+
11
+ You need [uv](https://docs.astral.sh/uv/getting-started/installation/) and an MCP client
12
+ (Claude Code, Claude Desktop, VS Code, Cursor…). On Ubuntu 26.04:
13
+
14
+ <!-- doctest: quickstart -->
15
+ ```sh
16
+ sudo apt install -y gimp python3-gi gir1.2-gimp-3.0 # GIMP 3.2+ (other distributions and Flatpak: see below)
17
+ uvx gimp-mcp setup # installs the GIMP plug-in, adds the server to your MCP clients
18
+ uvx gimp-mcp doctor # after (re)starting GIMP: every check should be [ok]
19
+ ```
20
+
21
+ Then ask your assistant: *"Use GIMP to create a 1280×720 image with the title 'Hello' and export it to
22
+ ~/hello.png"*.
23
+
24
+ * Other distributions (Arch, Debian 14, Fedora 44, openSUSE Tumbleweed, Alpine 3.24) and their packages:
25
+ [compatibility](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/compatibility.md#linux-distributions).
26
+ GIMP from **Flathub** works too: `flatpak install flathub org.gimp.GIMP`, then the two `uvx` commands.
27
+ * Step-by-step per client: [Claude Code](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/claude-code.md),
28
+ [Claude Desktop](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/claude-desktop.md),
29
+ [VS Code and Cursor](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/vscode-cursor.md),
30
+ [any other MCP client](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients/generic.md).
31
+ * Something wrong? `uvx gimp-mcp doctor` says what and how to fix it
32
+ ([troubleshooting](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/troubleshooting.md)).
33
+
34
+ Also listed in the [official MCP registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.mhbxyz/gimp-mcp)
35
+ as `io.github.mhbxyz/gimp-mcp` (from the first PyPI release on).
36
+
37
+ ## What it can do
38
+
39
+ 52 tools: inspect images and layer trees, previews, create/open/save XCF/export PNG and JPEG, layers and
40
+ groups, resize/crop/transform, selections and masks, painting, brightness/contrast, hue/saturation, blur
41
+ (destructive or editable filters), editable text, undo groups and checkpoints, and allowlisted access to
42
+ ~420 GIMP procedures. See the [tool reference](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/tools.md)
43
+ and the [coverage matrix](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/coverage.md).
44
+
45
+ ## Demo
46
+
47
+ ```sh
48
+ uv run demo/thumbnail.py # from a checkout: isolated headless GIMP, outputs in demo/out/
49
+ ```
50
+
51
+ Builds a 1280×720 thumbnail through MCP only (blurred backdrop with editable corrections, masked photo,
52
+ banner, editable title, a badge undone and redone with checkpoints), saves and reopens the XCF, exports PNG
53
+ and JPEG, and writes a report of every call and check.
54
+ Walk-through: [docs/guide-thumbnail.md](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/guide-thumbnail.md).
55
+
56
+ ## Documentation
57
+
58
+ - [Installation reference](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/install.md) (manual install, upgrade, uninstall) ·
59
+ [MCP clients](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/clients.md) ·
60
+ [troubleshooting](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/troubleshooting.md) ·
61
+ [compatibility](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/compatibility.md)
62
+ - [Tool reference](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/tools.md) ·
63
+ [coverage matrix](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/coverage.md)
64
+ - [Architecture](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/architecture.md) ·
65
+ [bridge protocol](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/bridge-protocol.md) ·
66
+ [security](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/security.md) ·
67
+ [decisions](https://github.com/mhbxyz/gimp-mcp/tree/main/docs/adr)
68
+ - [Testing](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/testing.md) ·
69
+ [releasing](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/releasing.md) ·
70
+ [GIMP behaviour notes](https://github.com/mhbxyz/gimp-mcp/blob/main/docs/gimp-notes.md) ·
71
+ [changelog](https://github.com/mhbxyz/gimp-mcp/blob/main/CHANGELOG.md)
@@ -0,0 +1,90 @@
1
+ [project]
2
+ name = "gimp-mcp"
3
+ version = "0.2.0"
4
+ description = "A reliable Model Context Protocol server for inspecting and editing GIMP 3 projects."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ keywords = [
9
+ "gimp",
10
+ "mcp",
11
+ "model-context-protocol",
12
+ "image-editing",
13
+ "llm",
14
+ ]
15
+ requires-python = ">=3.11"
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Operating System :: POSIX :: Linux",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
+ "Topic :: Multimedia :: Graphics :: Editors :: Raster-Based",
25
+ ]
26
+ dependencies = ["mcp>=2.3,<3"]
27
+
28
+ [[project.authors]]
29
+ name = "Manoah BERNIER"
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/mhbxyz/gimp-mcp"
33
+ Documentation = "https://github.com/mhbxyz/gimp-mcp/tree/main/docs"
34
+ Issues = "https://github.com/mhbxyz/gimp-mcp/issues"
35
+ Changelog = "https://github.com/mhbxyz/gimp-mcp/blob/main/CHANGELOG.md"
36
+
37
+ [project.scripts]
38
+ gimp-mcp = "gimp_mcp.cli:main"
39
+
40
+ [build-system]
41
+ requires = ["uv_build>=0.9.26,<0.10.0"]
42
+ build-backend = "uv_build"
43
+
44
+ [dependency-groups]
45
+ dev = [
46
+ "jsonschema>=4.26.0",
47
+ "pillow>=13.0.0",
48
+ "pyright>=1.1.414",
49
+ "pytest>=9.2.0",
50
+ "pytest-asyncio>=1.4.1.post1",
51
+ "pyyaml>=6.0.3",
52
+ "ruff>=0.17.4",
53
+ ]
54
+
55
+ [tool.pytest.ini_options]
56
+ asyncio_mode = "auto"
57
+ asyncio_default_fixture_loop_scope = "function"
58
+ testpaths = ["tests"]
59
+ markers = ["gimp: end-to-end test that drives a real GIMP 3 instance (skipped when GIMP is absent unless GIMP_MCP_REQUIRE_GIMP=1)"]
60
+ addopts = "-ra --strict-markers"
61
+
62
+ [tool.ruff]
63
+ line-length = 120
64
+ target-version = "py311"
65
+
66
+ [tool.ruff.lint]
67
+ select = [
68
+ "E",
69
+ "F",
70
+ "W",
71
+ "I",
72
+ "B",
73
+ "UP",
74
+ "SIM",
75
+ "RUF",
76
+ ]
77
+ ignore = ["SIM105"]
78
+
79
+ [tool.ruff.lint.per-file-ignores]
80
+ "src/gimp_mcp/plugin/**" = ["UP"]
81
+
82
+ [tool.pyright]
83
+ include = [
84
+ "src",
85
+ "tests",
86
+ "demo",
87
+ ]
88
+ exclude = ["src/gimp_mcp/plugin"]
89
+ pythonVersion = "3.11"
90
+ typeCheckingMode = "standard"
@@ -0,0 +1,72 @@
1
+ [project]
2
+ name = "gimp-mcp"
3
+ version = "0.2.0"
4
+ description = "A reliable Model Context Protocol server for inspecting and editing GIMP 3 projects."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "Manoah BERNIER" }]
9
+ keywords = ["gimp", "mcp", "model-context-protocol", "image-editing", "llm"]
10
+ requires-python = ">=3.11"
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Operating System :: POSIX :: Linux",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Topic :: Multimedia :: Graphics :: Editors :: Raster-Based",
20
+ ]
21
+ dependencies = ["mcp>=2.3,<3"]
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/mhbxyz/gimp-mcp"
25
+ Documentation = "https://github.com/mhbxyz/gimp-mcp/tree/main/docs"
26
+ Issues = "https://github.com/mhbxyz/gimp-mcp/issues"
27
+ Changelog = "https://github.com/mhbxyz/gimp-mcp/blob/main/CHANGELOG.md"
28
+
29
+ [project.scripts]
30
+ gimp-mcp = "gimp_mcp.cli:main"
31
+
32
+ [build-system]
33
+ requires = ["uv_build>=0.9.26,<0.10.0"]
34
+ build-backend = "uv_build"
35
+
36
+ [dependency-groups]
37
+ dev = [
38
+ "jsonschema>=4.26.0",
39
+ "pillow>=13.0.0",
40
+ "pyright>=1.1.414",
41
+ "pytest>=9.2.0",
42
+ "pytest-asyncio>=1.4.1.post1",
43
+ "pyyaml>=6.0.3",
44
+ "ruff>=0.17.4",
45
+ ]
46
+
47
+ [tool.pytest.ini_options]
48
+ asyncio_mode = "auto"
49
+ asyncio_default_fixture_loop_scope = "function"
50
+ testpaths = ["tests"]
51
+ markers = [
52
+ "gimp: end-to-end test that drives a real GIMP 3 instance (skipped when GIMP is absent unless GIMP_MCP_REQUIRE_GIMP=1)",
53
+ ]
54
+ addopts = "-ra --strict-markers"
55
+
56
+ [tool.ruff]
57
+ line-length = 120
58
+ target-version = "py311"
59
+
60
+ [tool.ruff.lint]
61
+ select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF"]
62
+ ignore = ["SIM105"]
63
+
64
+ [tool.pyright]
65
+ include = ["src", "tests", "demo"]
66
+ exclude = ["src/gimp_mcp/plugin"]
67
+ pythonVersion = "3.11"
68
+ typeCheckingMode = "standard"
69
+
70
+ [tool.ruff.lint.per-file-ignores]
71
+ # Runs on GIMP's own Python (may be older than the server's): keep it conservative.
72
+ "src/gimp_mcp/plugin/**" = ["UP"]
@@ -0,0 +1,9 @@
1
+ """MCP server for inspecting and editing GIMP 3 projects."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ # Single source of truth: the `version` field of pyproject.toml.
7
+ __version__ = version("gimp-mcp")
8
+ except PackageNotFoundError: # pragma: no cover - running from an uninstalled tree
9
+ __version__ = "0+unknown"
@@ -0,0 +1,5 @@
1
+ import sys
2
+
3
+ from .cli import main
4
+
5
+ sys.exit(main())