@chrischall/gemini-mcp 0.7.2 → 0.9.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +21 -0
- package/dist/bundle.js +594 -139
- package/dist/client.js +55 -29
- package/dist/images.js +42 -1
- package/dist/index.js +2 -1
- package/dist/jobs.js +0 -0
- package/dist/tools/_confirm.js +39 -0
- package/dist/tools/generate.js +108 -64
- package/dist/tools/interact.js +92 -41
- package/dist/tools/jobs.js +17 -0
- package/dist/tools/set.js +63 -37
- package/dist/tools/shared.js +132 -8
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
|
@@ -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.
|
|
10
|
+
"version": "0.9.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.
|
|
18
|
+
"version": "0.9.0",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
package/README.md
CHANGED
|
@@ -16,6 +16,26 @@ Developed and maintained by AI (Claude Code).
|
|
|
16
16
|
| `GEMINI_IMAGE_MODEL` | No | Override the default image model (default: `gemini-3.1-flash-image`) |
|
|
17
17
|
| `GEMINI_OUTPUT_DIR` | No | Default directory for generated images (default: current working directory) |
|
|
18
18
|
| `GEMINI_INPUT_DIR` | No | Directory to resolve bare input-image filenames against (so `images: ["foo.jpg"]` works) |
|
|
19
|
+
| `GEMINI_TIMEOUT_MS` | No | Upstream request timeout in ms (default: `60000`, or `120000` for `image_size: "4K"`); each generation tool also takes a per-call `timeout_ms` |
|
|
20
|
+
| `GEMINI_HEARTBEAT_MS` | No | Progress-notification cadence in ms while a generation runs (default: `10000`; `0` disables) — keeps MCP hosts that reset their timeout on progress from timing out long generations |
|
|
21
|
+
|
|
22
|
+
### Long generations and client timeouts
|
|
23
|
+
|
|
24
|
+
4K / Pro-model generations can outrun an MCP host's own `tools/call` timeout (error `-32001`).
|
|
25
|
+
The server sends `notifications/progress` heartbeats so hosts that reset their timeout on
|
|
26
|
+
progress wait it out. If the host still gives up, the server-side generation usually completes
|
|
27
|
+
anyway: the image is written to the output dir, `gemini_interact` also writes an
|
|
28
|
+
`<image>.json` sidecar recording the `interaction_id`, and `continue_last: true` resumes the
|
|
29
|
+
interaction the lost response belonged to.
|
|
30
|
+
|
|
31
|
+
For hosts whose timeout can't be tamed (e.g. Claude Desktop, a fixed ~30s cap that ignores
|
|
32
|
+
progress), two guards make re-issuing safe and unnecessary:
|
|
33
|
+
|
|
34
|
+
- **`async: true`** returns a `job_id` immediately instead of the image, so the call can't
|
|
35
|
+
time out at all; poll `gemini_get_result` with the `job_id` until it's `done`.
|
|
36
|
+
- **`idempotency_key`** makes a repeat call idempotent — a retry with the same key returns the
|
|
37
|
+
recorded result (`reused: true`) instead of billing a second generation. (Even without a key,
|
|
38
|
+
two identical in-flight calls are deduplicated automatically.)
|
|
19
39
|
|
|
20
40
|
## Tools
|
|
21
41
|
|
|
@@ -26,6 +46,7 @@ Developed and maintained by AI (Claude Code).
|
|
|
26
46
|
| `gemini_edit_image` | One-off edits or multi-image composition with a text instruction (for a series of edits, use `gemini_interact`) |
|
|
27
47
|
| `gemini_generate_set` | Generate a master image plus N consistent images referencing it |
|
|
28
48
|
| `gemini_interact` | Preferred tool for iterative refinement: multi-turn generation/editing via the Interactions API — chain the returned `interaction_id` via `previous_interaction_id` (or `continue_last: true`) |
|
|
49
|
+
| `gemini_get_result` | Fetch an async generation started with `async: true` by its `job_id` (status `running` → `done` result). Lets a long generation outlive a host's `tools/call` timeout |
|
|
29
50
|
|
|
30
51
|
## Quick Start
|
|
31
52
|
|