@chrischall/gemini-mcp 0.3.0 → 0.5.0

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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "MCP server for Google Gemini image generation and editing — generate and edit images via the Gemini API",
10
- "version": "0.3.0"
10
+ "version": "0.5.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "Gemini Images",
16
16
  "source": "./",
17
17
  "description": "Generate and edit images with Google Gemini image models (Nano Banana / Nano Banana Pro) via natural language prompts",
18
- "version": "0.3.0",
18
+ "version": "0.5.0",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gemini-mcp",
3
3
  "displayName": "Gemini Images",
4
- "version": "0.3.0",
4
+ "version": "0.5.0",
5
5
  "description": "MCP server for Google Gemini image generation and editing — generate and edit images via the Gemini API",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/.mcp.json CHANGED
@@ -6,7 +6,8 @@
6
6
  "env": {
7
7
  "GEMINI_API_KEY": "${GEMINI_API_KEY}",
8
8
  "GEMINI_IMAGE_MODEL": "${GEMINI_IMAGE_MODEL}",
9
- "GEMINI_OUTPUT_DIR": "${GEMINI_OUTPUT_DIR}"
9
+ "GEMINI_OUTPUT_DIR": "${GEMINI_OUTPUT_DIR}",
10
+ "GEMINI_INPUT_DIR": "${GEMINI_INPUT_DIR}"
10
11
  }
11
12
  }
12
13
  }
package/README.md CHANGED
@@ -11,6 +11,7 @@ Developed and maintained by AI (Claude Code).
11
11
  | `GEMINI_API_KEY` | Yes | Your Google Gemini API key ([aistudio.google.com/apikey](https://aistudio.google.com/apikey)) |
12
12
  | `GEMINI_IMAGE_MODEL` | No | Override the default image model (default: `gemini-3-pro-image`) |
13
13
  | `GEMINI_OUTPUT_DIR` | No | Default directory for generated images (default: current working directory) |
14
+ | `GEMINI_INPUT_DIR` | No | Directory to resolve bare input-image filenames against (so `images: ["foo.jpg"]` works) |
14
15
 
15
16
  ## Tools
16
17
 
package/SKILL.md CHANGED
@@ -71,6 +71,7 @@ Note: Image generation requires a billing-enabled Google Cloud project.
71
71
  | `GEMINI_API_KEY` | Yes | Your Google Gemini API key |
72
72
  | `GEMINI_IMAGE_MODEL` | No | Override the default image model (default: `gemini-3-pro-image`) |
73
73
  | `GEMINI_OUTPUT_DIR` | No | Default directory for saved images (default: current working directory) |
74
+ | `GEMINI_INPUT_DIR` | No | Directory to resolve bare input-image filenames against (e.g. point at Cowork's `uploads/` folder so `images: ["house.jpg"]` works) |
74
75
 
75
76
  ## Tools
76
77
 
@@ -129,7 +130,7 @@ gemini_generate_set(
129
130
  → returns master + 5 variations
130
131
  ```
131
132
 
132
- **Use a reference photo by value (no file needed):**
133
+ **Use a reference photo by value (when you have the bytes):**
133
134
  ```
134
135
  gemini_edit_image(
135
136
  prompt: "place this house on a vintage travel-poster background",
@@ -137,6 +138,8 @@ gemini_edit_image(
137
138
  )
138
139
  → returns path to the edited image
139
140
  ```
141
+ `images_base64` is for bytes you actually have — a file you `Read`/encode, a URL
142
+ you fetch, or a `data:` URI the user pastes as **text**.
140
143
 
141
144
  **Iterate on ONE image conversationally (multi-turn):**
142
145
  ```
@@ -147,7 +150,25 @@ r2 = gemini_interact(input: "add a sleeping cat on the chair",
147
150
  → refined image that preserves r1; returns a NEW interaction_id
148
151
  ```
149
152
  Prefer this over re-running `gemini_edit_image` when you're making a *series* of incremental edits — the model keeps the prior result in context.
150
- Pasted/attached images aren't written to disk by the host, so pass their bytes via `images_base64` (a `data:` URI or raw base64) instead of a path.
153
+ **⚠️ Chat-pasted/attached images can't be fed to these tools directly.** A pasted
154
+ image reaches the assistant as a *vision* block — the assistant can SEE it but
155
+ never receives the original bytes, and the host doesn't write it to disk. So
156
+ neither `images` (no file exists) nor `images_base64` (the bytes can't be
157
+ reconstructed from a downscaled vision rendering) is obtainable from a paste.
158
+ To use a real reference photo, the **user** must make the bytes available: save
159
+ the file and give its **path** (→ `images`), drop it into the project dir, paste
160
+ it as a **`data:` URI in text**, or host it at a **URL** (fetch → base64 →
161
+ `images_base64`). This is a host/Cowork limitation, not an MCP one.
162
+
163
+ Two built-in ways to get past the unreachable-paste problem without any manual
164
+ extraction:
165
+ - **`from_clipboard: true`** (macOS) — the tool reads the image off the system
166
+ clipboard itself (osascript), downscales it, and uses it. The user just needs
167
+ to **copy** the image (⌘C — distinct from pasting it inline into chat, which
168
+ doesn't keep it on the clipboard). Works on every image tool:
169
+ `gemini_edit_image(prompt: "…", from_clipboard: true)`.
170
+ - **`GEMINI_INPUT_DIR`** — point it at a folder (e.g. Cowork's `uploads/`); then a
171
+ **bare filename** resolves against it: `gemini_edit_image(prompt: "…", images: ["house.jpg"])`.
151
172
 
152
173
  ## Notes
153
174