ultimate-gemini-mcp 1.5.1__tar.gz → 1.6.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.
Potentially problematic release.
This version of ultimate-gemini-mcp might be problematic. Click here for more details.
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/PKG-INFO +44 -5
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/README.md +43 -4
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/pyproject.toml +1 -1
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/__init__.py +1 -1
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/core/validation.py +7 -5
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/services/image_service.py +6 -4
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/tools/batch_generate.py +15 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/tools/generate_image.py +21 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.env.example +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.github/workflows/README.md +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.github/workflows/claude-code-review.yml +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.github/workflows/claude.yml +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.github/workflows/publish.yml +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.github/workflows/test.yml +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.gitignore +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/CLAUDE.md +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/LICENSE +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/MANIFEST.in +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/PUBLISHING.md +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/TEST_RESULTS.md +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/config/__init__.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/config/constants.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/config/settings.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/core/__init__.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/core/exceptions.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/server.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/services/__init__.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/services/gemini_client.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/services/imagen_client.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/services/prompt_enhancer.py +0 -0
- {ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/src/tools/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ultimate-gemini-mcp
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Ultimate image generation MCP server unifying Gemini 2.5 Flash Image and Imagen 4/Fast/Ultra with advanced features
|
|
5
5
|
Project-URL: Homepage, https://github.com/anand-92/ultimate-image-gen-mcp
|
|
6
6
|
Project-URL: Repository, https://github.com/anand-92/ultimate-image-gen-mcp
|
|
@@ -201,13 +201,25 @@ Add to your `claude_desktop_config.json`:
|
|
|
201
201
|
"command": "uvx",
|
|
202
202
|
"args": ["ultimate-gemini-mcp"],
|
|
203
203
|
"env": {
|
|
204
|
-
"GEMINI_API_KEY": "your-api-key-here"
|
|
204
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
205
|
+
"OUTPUT_DIR": "/path/to/your/images"
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
```
|
|
210
211
|
|
|
212
|
+
**Important Notes:**
|
|
213
|
+
|
|
214
|
+
1. **OUTPUT_DIR is required** when using `uvx` to avoid read-only file system errors. Set it to an absolute path where you want generated images saved:
|
|
215
|
+
- **macOS**: `"/Users/yourusername/gemini_images"`
|
|
216
|
+
- **Windows**: `"C:\\Users\\YourUsername\\gemini_images"`
|
|
217
|
+
|
|
218
|
+
2. **uvx path issues on macOS**: If you get `spawn uvx ENOENT` errors, use the full path to uvx:
|
|
219
|
+
```json
|
|
220
|
+
"command": "/Users/yourusername/.local/bin/uvx"
|
|
221
|
+
```
|
|
222
|
+
|
|
211
223
|
**Config file locations:**
|
|
212
224
|
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
213
225
|
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
@@ -215,10 +227,15 @@ Add to your `claude_desktop_config.json`:
|
|
|
215
227
|
### With Claude Code (VS Code)
|
|
216
228
|
|
|
217
229
|
```bash
|
|
218
|
-
# Add MCP server to Claude Code
|
|
219
|
-
claude mcp add ultimate-gemini
|
|
230
|
+
# Add MCP server to Claude Code (with required OUTPUT_DIR)
|
|
231
|
+
claude mcp add ultimate-gemini \
|
|
232
|
+
--env GEMINI_API_KEY=your-api-key \
|
|
233
|
+
--env OUTPUT_DIR=/path/to/your/images \
|
|
234
|
+
-- uvx ultimate-gemini-mcp
|
|
220
235
|
```
|
|
221
236
|
|
|
237
|
+
**Note**: Replace `/path/to/your/images` with an absolute path to where you want images saved.
|
|
238
|
+
|
|
222
239
|
### With Cursor
|
|
223
240
|
|
|
224
241
|
Add to Cursor's MCP configuration (`.cursor/mcp.json`):
|
|
@@ -230,13 +247,16 @@ Add to Cursor's MCP configuration (`.cursor/mcp.json`):
|
|
|
230
247
|
"command": "uvx",
|
|
231
248
|
"args": ["ultimate-gemini-mcp"],
|
|
232
249
|
"env": {
|
|
233
|
-
"GEMINI_API_KEY": "your-api-key-here"
|
|
250
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
251
|
+
"OUTPUT_DIR": "/path/to/your/images"
|
|
234
252
|
}
|
|
235
253
|
}
|
|
236
254
|
}
|
|
237
255
|
}
|
|
238
256
|
```
|
|
239
257
|
|
|
258
|
+
**Note**: Set `OUTPUT_DIR` to an absolute path where you want generated images saved.
|
|
259
|
+
|
|
240
260
|
## 🎯 Available Models
|
|
241
261
|
|
|
242
262
|
### Gemini Models
|
|
@@ -412,6 +432,24 @@ View current server configuration.
|
|
|
412
432
|
|
|
413
433
|
## 🐛 Troubleshooting
|
|
414
434
|
|
|
435
|
+
### "spawn uvx ENOENT" error
|
|
436
|
+
- **Cause**: Claude Desktop cannot find the `uvx` command in its PATH
|
|
437
|
+
- **Solution**: Use the full path to uvx in your config:
|
|
438
|
+
```json
|
|
439
|
+
"command": "/Users/yourusername/.local/bin/uvx"
|
|
440
|
+
```
|
|
441
|
+
- Find your uvx location with: `which uvx`
|
|
442
|
+
|
|
443
|
+
### "[Errno 30] Read-only file system: 'generated_images'"
|
|
444
|
+
- **Cause**: When using `uvx`, the default directory is in a read-only cache location
|
|
445
|
+
- **Solution**: Add `OUTPUT_DIR` to your MCP config:
|
|
446
|
+
```json
|
|
447
|
+
"env": {
|
|
448
|
+
"GEMINI_API_KEY": "your-key",
|
|
449
|
+
"OUTPUT_DIR": "/Users/yourusername/gemini_images"
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
415
453
|
### "GEMINI_API_KEY not found"
|
|
416
454
|
- Add your API key to `.env` or environment variables
|
|
417
455
|
- Get a free key at [Google AI Studio](https://makersuite.google.com/app/apikey)
|
|
@@ -427,6 +465,7 @@ View current server configuration.
|
|
|
427
465
|
### Images not saving
|
|
428
466
|
- Check that OUTPUT_DIR exists and is writable
|
|
429
467
|
- Verify you have sufficient disk space
|
|
468
|
+
- Create the directory manually: `mkdir -p /path/to/your/images`
|
|
430
469
|
|
|
431
470
|
## 🤝 Contributing
|
|
432
471
|
|
|
@@ -165,13 +165,25 @@ Add to your `claude_desktop_config.json`:
|
|
|
165
165
|
"command": "uvx",
|
|
166
166
|
"args": ["ultimate-gemini-mcp"],
|
|
167
167
|
"env": {
|
|
168
|
-
"GEMINI_API_KEY": "your-api-key-here"
|
|
168
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
169
|
+
"OUTPUT_DIR": "/path/to/your/images"
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
```
|
|
174
175
|
|
|
176
|
+
**Important Notes:**
|
|
177
|
+
|
|
178
|
+
1. **OUTPUT_DIR is required** when using `uvx` to avoid read-only file system errors. Set it to an absolute path where you want generated images saved:
|
|
179
|
+
- **macOS**: `"/Users/yourusername/gemini_images"`
|
|
180
|
+
- **Windows**: `"C:\\Users\\YourUsername\\gemini_images"`
|
|
181
|
+
|
|
182
|
+
2. **uvx path issues on macOS**: If you get `spawn uvx ENOENT` errors, use the full path to uvx:
|
|
183
|
+
```json
|
|
184
|
+
"command": "/Users/yourusername/.local/bin/uvx"
|
|
185
|
+
```
|
|
186
|
+
|
|
175
187
|
**Config file locations:**
|
|
176
188
|
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
177
189
|
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
@@ -179,10 +191,15 @@ Add to your `claude_desktop_config.json`:
|
|
|
179
191
|
### With Claude Code (VS Code)
|
|
180
192
|
|
|
181
193
|
```bash
|
|
182
|
-
# Add MCP server to Claude Code
|
|
183
|
-
claude mcp add ultimate-gemini
|
|
194
|
+
# Add MCP server to Claude Code (with required OUTPUT_DIR)
|
|
195
|
+
claude mcp add ultimate-gemini \
|
|
196
|
+
--env GEMINI_API_KEY=your-api-key \
|
|
197
|
+
--env OUTPUT_DIR=/path/to/your/images \
|
|
198
|
+
-- uvx ultimate-gemini-mcp
|
|
184
199
|
```
|
|
185
200
|
|
|
201
|
+
**Note**: Replace `/path/to/your/images` with an absolute path to where you want images saved.
|
|
202
|
+
|
|
186
203
|
### With Cursor
|
|
187
204
|
|
|
188
205
|
Add to Cursor's MCP configuration (`.cursor/mcp.json`):
|
|
@@ -194,13 +211,16 @@ Add to Cursor's MCP configuration (`.cursor/mcp.json`):
|
|
|
194
211
|
"command": "uvx",
|
|
195
212
|
"args": ["ultimate-gemini-mcp"],
|
|
196
213
|
"env": {
|
|
197
|
-
"GEMINI_API_KEY": "your-api-key-here"
|
|
214
|
+
"GEMINI_API_KEY": "your-api-key-here",
|
|
215
|
+
"OUTPUT_DIR": "/path/to/your/images"
|
|
198
216
|
}
|
|
199
217
|
}
|
|
200
218
|
}
|
|
201
219
|
}
|
|
202
220
|
```
|
|
203
221
|
|
|
222
|
+
**Note**: Set `OUTPUT_DIR` to an absolute path where you want generated images saved.
|
|
223
|
+
|
|
204
224
|
## 🎯 Available Models
|
|
205
225
|
|
|
206
226
|
### Gemini Models
|
|
@@ -376,6 +396,24 @@ View current server configuration.
|
|
|
376
396
|
|
|
377
397
|
## 🐛 Troubleshooting
|
|
378
398
|
|
|
399
|
+
### "spawn uvx ENOENT" error
|
|
400
|
+
- **Cause**: Claude Desktop cannot find the `uvx` command in its PATH
|
|
401
|
+
- **Solution**: Use the full path to uvx in your config:
|
|
402
|
+
```json
|
|
403
|
+
"command": "/Users/yourusername/.local/bin/uvx"
|
|
404
|
+
```
|
|
405
|
+
- Find your uvx location with: `which uvx`
|
|
406
|
+
|
|
407
|
+
### "[Errno 30] Read-only file system: 'generated_images'"
|
|
408
|
+
- **Cause**: When using `uvx`, the default directory is in a read-only cache location
|
|
409
|
+
- **Solution**: Add `OUTPUT_DIR` to your MCP config:
|
|
410
|
+
```json
|
|
411
|
+
"env": {
|
|
412
|
+
"GEMINI_API_KEY": "your-key",
|
|
413
|
+
"OUTPUT_DIR": "/Users/yourusername/gemini_images"
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
379
417
|
### "GEMINI_API_KEY not found"
|
|
380
418
|
- Add your API key to `.env` or environment variables
|
|
381
419
|
- Get a free key at [Google AI Studio](https://makersuite.google.com/app/apikey)
|
|
@@ -391,6 +429,7 @@ View current server configuration.
|
|
|
391
429
|
### Images not saving
|
|
392
430
|
- Check that OUTPUT_DIR exists and is writable
|
|
393
431
|
- Verify you have sufficient disk space
|
|
432
|
+
- Create the directory manually: `mkdir -p /path/to/your/images`
|
|
394
433
|
|
|
395
434
|
## 🤝 Contributing
|
|
396
435
|
|
|
@@ -124,11 +124,13 @@ def validate_prompts_list(prompts: list[str]) -> None:
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
def sanitize_filename(filename: str) -> str:
|
|
127
|
-
"""Sanitize filename to remove unsafe characters."""
|
|
128
|
-
#
|
|
129
|
-
safe_name = re.sub(r'[
|
|
130
|
-
# Remove
|
|
131
|
-
safe_name =
|
|
127
|
+
"""Sanitize filename to remove unsafe and special characters."""
|
|
128
|
+
# Replace all non-alphanumeric characters (except hyphens) with underscores
|
|
129
|
+
safe_name = re.sub(r'[^a-zA-Z0-9-]', '_', filename)
|
|
130
|
+
# Remove multiple consecutive underscores
|
|
131
|
+
safe_name = re.sub(r'_+', '_', safe_name)
|
|
132
|
+
# Remove leading/trailing underscores
|
|
133
|
+
safe_name = safe_name.strip("_")
|
|
132
134
|
# Ensure filename is not empty
|
|
133
135
|
if not safe_name:
|
|
134
136
|
safe_name = "image"
|
|
@@ -54,12 +54,14 @@ class ImageResult:
|
|
|
54
54
|
raise ImageProcessingError(f"Failed to save image: {e}") from e
|
|
55
55
|
|
|
56
56
|
def _generate_filename(self) -> str:
|
|
57
|
-
"""Generate
|
|
57
|
+
"""Generate clean, short filename."""
|
|
58
58
|
timestamp = self.timestamp.strftime("%Y%m%d_%H%M%S")
|
|
59
|
-
#
|
|
60
|
-
|
|
59
|
+
# Shorten model name (e.g., gemini-2.5-flash-image -> gemini-flash)
|
|
60
|
+
model_short = self.model.replace("gemini-2.5-flash-image", "gemini-flash").replace("imagen-4-", "img4-")
|
|
61
|
+
# Sanitize and shorten prompt (max 30 chars)
|
|
62
|
+
prompt_snippet = sanitize_filename(self.prompt[:30])
|
|
61
63
|
index_str = f"_{self.index + 1}" if self.index > 0 else ""
|
|
62
|
-
return f"{
|
|
64
|
+
return f"{model_short}_{timestamp}_{prompt_snippet}{index_str}.png"
|
|
63
65
|
|
|
64
66
|
def get_size(self) -> int:
|
|
65
67
|
"""Get image size in bytes."""
|
|
@@ -133,6 +133,21 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
|
|
|
133
133
|
|
|
134
134
|
Returns:
|
|
135
135
|
JSON string with batch results including individual image paths
|
|
136
|
+
|
|
137
|
+
IMPORTANT - AI Assistant Instructions:
|
|
138
|
+
After batch generation completes, you MUST:
|
|
139
|
+
1. Parse the JSON response to extract file paths from result["results"][i]["images"][0]["path"]
|
|
140
|
+
2. Show the user a summary of all generated images with their file paths
|
|
141
|
+
3. Optionally display one or more images using the Read tool
|
|
142
|
+
4. Let the user know the total count of successful vs failed generations
|
|
143
|
+
|
|
144
|
+
Example response to user:
|
|
145
|
+
"Successfully generated 3 images:
|
|
146
|
+
1. /path/to/image1.png - [description]
|
|
147
|
+
2. /path/to/image2.png - [description]
|
|
148
|
+
3. /path/to/image3.png - [description]"
|
|
149
|
+
|
|
150
|
+
DO NOT just say "batch generation completed" without listing the file paths!
|
|
136
151
|
"""
|
|
137
152
|
try:
|
|
138
153
|
result = await batch_generate_images(
|
|
@@ -217,6 +217,27 @@ def register_generate_image_tool(mcp_server: Any) -> None:
|
|
|
217
217
|
|
|
218
218
|
Returns:
|
|
219
219
|
JSON string with generation results and file paths
|
|
220
|
+
|
|
221
|
+
IMPORTANT - AI Assistant Instructions:
|
|
222
|
+
After generating an image, you MUST:
|
|
223
|
+
1. Parse the JSON response to extract the file path from result["images"][0]["path"]
|
|
224
|
+
2. Inform the user of the EXACT file path where the image was saved
|
|
225
|
+
3. Use the Read tool to load and display the image to the user
|
|
226
|
+
4. Optionally: Use bash to open the image in the default viewer:
|
|
227
|
+
- macOS: `open /path/to/image.png`
|
|
228
|
+
- Linux: `xdg-open /path/to/image.png`
|
|
229
|
+
- Windows: `start /path/to/image.png`
|
|
230
|
+
|
|
231
|
+
Example workflow:
|
|
232
|
+
```
|
|
233
|
+
1. Call generate_image tool
|
|
234
|
+
2. Parse response JSON to get file_path
|
|
235
|
+
3. Tell user: "Image saved to: /Users/name/gemini_images/image.png"
|
|
236
|
+
4. Call Read tool with the file_path to display the image
|
|
237
|
+
5. Optionally call Bash with `open /path/to/image.png` to open in Preview
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
DO NOT just say "image generated successfully" without showing the path and image!
|
|
220
241
|
"""
|
|
221
242
|
try:
|
|
222
243
|
result = await generate_image_tool(
|
|
File without changes
|
|
File without changes
|
{ultimate_gemini_mcp-1.5.1 → ultimate_gemini_mcp-1.6.0}/.github/workflows/claude-code-review.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|