imgx-mcp 1.0.3 → 1.0.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.4 (2026-03-03)
4
+
5
+ ### Added
6
+
7
+ - **Skill ZIP for Claude Desktop** — `dist/image-generation-skill.zip` for uploading via Settings > Profile > Customize > Skills. Included in npm package under `dist/`
8
+ - **`build:skill-zip` npm script** — `python scripts/build-skill-zip.py` generates the ZIP with forward-slash paths and ZIP_DEFLATED compression
9
+
3
10
  ## 1.0.3 (2026-03-03)
4
11
 
5
12
  ### Fixed
package/README.md CHANGED
@@ -60,6 +60,16 @@ The skill files are included in the [npm package](https://www.npmjs.com/package/
60
60
 
61
61
  > **Personal skill** (all projects): Place in `~/.claude/skills/image-generation/` instead of `.claude/skills/`.
62
62
 
63
+ ### Claude Desktop
64
+
65
+ Claude Desktop supports skills via ZIP upload:
66
+
67
+ 1. Download [`image-generation-skill.zip`](dist/image-generation-skill.zip) from the repository (or find it in the [npm package](https://www.npmjs.com/package/imgx-mcp) under `dist/`)
68
+ 2. In Claude Desktop: **Settings > Profile > Customize > Skills > Add Skill**
69
+ 3. Upload the ZIP
70
+
71
+ > Update the skill by re-downloading and re-uploading the ZIP after new releases.
72
+
63
73
  ### What the skill does
64
74
 
65
75
  The skill guides Claude Code through image workflows: blog covers, iterative editing, provider comparison, icon generation. It knows the MCP tool parameters and best practices, so you get better results with less effort.
@@ -69,7 +79,7 @@ The skill guides Claude Code through image workflows: blog covers, iterative edi
69
79
  | | MCP server | Skill |
70
80
  |---|---|---|
71
81
  | What it does | Exposes image tools to AI agents | Guided prompt for using the tools |
72
- | Works with | Any MCP-compatible tool | Claude Code |
82
+ | Works with | Any MCP-compatible tool | Claude Code, Claude Desktop |
73
83
  | Install | Add to `.mcp.json` | Copy skill files to project |
74
84
  | Team sharing | Commit `.mcp.json` to repo | Commit `.claude/skills/` to repo |
75
85
 
@@ -82,9 +92,15 @@ The skill guides Claude Code through image workflows: blog covers, iterative edi
82
92
  | `generate_image` | Generate an image from a text prompt |
83
93
  | `edit_image` | Edit an existing image with text instructions |
84
94
  | `edit_last` | Edit the last generated/edited image (no input path needed) |
95
+ | `undo_edit` | Undo the last edit, reverting to the previous image in the session |
96
+ | `redo_edit` | Redo a previously undone edit |
97
+ | `edit_history` | Show all sessions and their edit history with metadata |
98
+ | `switch_session` | Switch to a different editing session |
99
+ | `clear_history` | Clear all history (optionally delete image files) |
100
+ | `set_output_dir` | Change the default output directory (optionally move existing files) |
85
101
  | `list_providers` | List available providers and capabilities |
86
102
 
87
- Images are saved to `~/Pictures/imgx/` by default. File paths are returned in the response. Inline image preview is included in MCP responses (base64).
103
+ Images are saved to `~/Pictures/imgx/<session-id>/` by default. Each session gets its own directory. File paths are returned in the response. Inline image preview is included in MCP responses (base64).
88
104
 
89
105
  ### Iterative editing
90
106
 
@@ -98,6 +114,27 @@ The `edit_last` tool uses the output of the previous `generate_image` or `edit_i
98
114
 
99
115
  No need to specify file paths between steps.
100
116
 
117
+ ### Session management
118
+
119
+ Each `generate_image` call starts a new session. Subsequent `edit_last` calls are added to the same session, forming an edit chain. Each session has its own output directory.
120
+
121
+ **Undo / Redo** — Step backward and forward through the edit chain:
122
+
123
+ ```
124
+ generate → edit_last → edit_last → edit_last
125
+ ↑ current
126
+ ← undo_edit
127
+ ↑ current
128
+ redo_edit →
129
+ ↑ current
130
+ ```
131
+
132
+ After undo, calling `edit_last` branches from the current position (newer entries are discarded).
133
+
134
+ **Session switching** — Use `edit_history` to see all sessions, then `switch_session` to resume a previous session. The `edit_last` tool will use the current position in the switched session.
135
+
136
+ **Output directory** — `edit_last` inherits the output directory from the session. If `generate_image` was called with `output_dir`, all subsequent `edit_last` calls in that session output to the same directory.
137
+
101
138
  ## API key setup
102
139
 
103
140
  Set up at least one provider:
@@ -222,7 +259,7 @@ imgx separates **model-independent** and **model-dependent** concerns:
222
259
  ```
223
260
  MCP server (tool definitions, stdio transport) CLI (argument parsing, output formatting)
224
261
  ↓ ↓
225
- Core (Capability enum, ImageProvider interface, provider registry, file I/O)
262
+ Core (Capability enum, ImageProvider interface, provider registry, file I/O, history)
226
263
 
227
264
  Provider (model-specific API calls, capability declarations)
228
265
  ```
@@ -270,6 +307,17 @@ imgx edit -i photo.png -p "Make the background darker"
270
307
  imgx edit --last -p "Add warm lighting"
271
308
  imgx edit --last -p "Crop to 16:9" -o final.png
272
309
 
310
+ # Undo / redo
311
+ imgx undo # Revert to previous image in session
312
+ imgx redo # Re-apply an undone edit
313
+
314
+ # History
315
+ imgx history # Show all sessions and entries
316
+ imgx history switch <session-id> # Switch to a different session
317
+ imgx history clear # Clear all history (interactive)
318
+ imgx history clear --yes # Clear without confirmation
319
+ imgx history clear --keep-files # Clear history but keep image files
320
+
273
321
  # Provider management
274
322
  imgx providers # List providers and capabilities
275
323
  imgx capabilities # Detailed capabilities of current provider
@@ -40138,7 +40138,7 @@ function runRedo() {
40138
40138
  }
40139
40139
 
40140
40140
  // build/cli/index.js
40141
- var VERSION2 = "1.0.3";
40141
+ var VERSION2 = "1.0.4";
40142
40142
  var HELP = `imgx v${VERSION2} \u2014 AI image generation and editing for MCP-compatible AI agents
40143
40143
 
40144
40144
  Commands:
Binary file
@@ -69820,7 +69820,7 @@ function buildImageContent(images, paths, extra) {
69820
69820
  }
69821
69821
  var server = new McpServer({
69822
69822
  name: "imgx",
69823
- version: "1.0.3"
69823
+ version: "1.0.4"
69824
69824
  });
69825
69825
  initGemini();
69826
69826
  initOpenAI();
package/package.json CHANGED
@@ -1,60 +1,62 @@
1
- {
2
- "name": "imgx-mcp",
3
- "version": "1.0.3",
4
- "mcpName": "io.github.somacoffeekyoto/imgx",
5
- "description": "AI image generation and editing for Claude Code, Codex CLI, and MCP-compatible AI agents",
6
- "type": "module",
7
- "bin": {
8
- "imgx": "dist/cli.bundle.js",
9
- "imgx-mcp": "dist/mcp.bundle.js"
10
- },
11
- "scripts": {
12
- "build": "tsc",
13
- "bundle": "npm run build && node esbuild.config.js",
14
- "dev": "tsc --watch",
15
- "test": "vitest run",
16
- "test:watch": "vitest"
17
- },
18
- "keywords": [
19
- "image-generation",
20
- "image-editing",
21
- "gemini",
22
- "openai",
23
- "ai",
24
- "mcp",
25
- "skill",
26
- "claude-code",
27
- "cli"
28
- ],
29
- "author": "SOMA COFFEE KYOTO",
30
- "license": "MIT",
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/somacoffeekyoto/imgx-mcp.git"
34
- },
35
- "homepage": "https://somacoffee.net/imgx-mcp/",
36
- "bugs": {
37
- "url": "https://github.com/somacoffeekyoto/imgx-mcp/issues"
38
- },
39
- "files": [
40
- "dist/cli.bundle.js",
41
- "dist/mcp.bundle.js",
42
- "skills/",
43
- "LICENSE",
44
- "README.md",
45
- "CHANGELOG.md"
46
- ],
47
- "engines": {
48
- "node": ">=18.0.0"
49
- },
50
- "dependencies": {
51
- "@google/genai": "^1.0.0",
52
- "@modelcontextprotocol/sdk": "^1.27.1"
53
- },
54
- "devDependencies": {
55
- "@types/node": "^20.0.0",
56
- "esbuild": "^0.27.0",
57
- "typescript": "^5.4.0",
58
- "vitest": "^4.0.18"
59
- }
60
- }
1
+ {
2
+ "name": "imgx-mcp",
3
+ "version": "1.0.4",
4
+ "mcpName": "io.github.somacoffeekyoto/imgx",
5
+ "description": "AI image generation and editing for Claude Code, Codex CLI, and MCP-compatible AI agents",
6
+ "type": "module",
7
+ "bin": {
8
+ "imgx": "dist/cli.bundle.js",
9
+ "imgx-mcp": "dist/mcp.bundle.js"
10
+ },
11
+ "scripts": {
12
+ "build": "tsc",
13
+ "bundle": "npm run build && node esbuild.config.js",
14
+ "dev": "tsc --watch",
15
+ "build:skill-zip": "python scripts/build-skill-zip.py",
16
+ "test": "vitest run",
17
+ "test:watch": "vitest"
18
+ },
19
+ "keywords": [
20
+ "image-generation",
21
+ "image-editing",
22
+ "gemini",
23
+ "openai",
24
+ "ai",
25
+ "mcp",
26
+ "skill",
27
+ "claude-code",
28
+ "cli"
29
+ ],
30
+ "author": "SOMA COFFEE KYOTO",
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/somacoffeekyoto/imgx-mcp.git"
35
+ },
36
+ "homepage": "https://somacoffee.net/imgx-mcp/",
37
+ "bugs": {
38
+ "url": "https://github.com/somacoffeekyoto/imgx-mcp/issues"
39
+ },
40
+ "files": [
41
+ "dist/cli.bundle.js",
42
+ "dist/mcp.bundle.js",
43
+ "dist/image-generation-skill.zip",
44
+ "skills/",
45
+ "LICENSE",
46
+ "README.md",
47
+ "CHANGELOG.md"
48
+ ],
49
+ "engines": {
50
+ "node": ">=18.0.0"
51
+ },
52
+ "dependencies": {
53
+ "@google/genai": "^1.0.0",
54
+ "@modelcontextprotocol/sdk": "^1.27.1"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^20.0.0",
58
+ "esbuild": "^0.27.0",
59
+ "typescript": "^5.4.0",
60
+ "vitest": "^4.0.18"
61
+ }
62
+ }