ultimate-gemini-mcp 1.0.19__py3-none-any.whl → 1.5.1__py3-none-any.whl

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.

src/__init__.py CHANGED
@@ -7,7 +7,7 @@ A unified MCP server that combines the best features from:
7
7
  - Advanced features: batch processing, editing, templates, and more
8
8
  """
9
9
 
10
- __version__ = "1.0.19"
10
+ __version__ = "1.5.1"
11
11
  __author__ = "Ultimate Gemini MCP"
12
12
 
13
13
  from .config import get_settings
src/config/constants.py CHANGED
@@ -74,4 +74,4 @@ ENHANCEMENT_TIMEOUT = 30
74
74
  BATCH_TIMEOUT = 120
75
75
 
76
76
  # Output settings
77
- DEFAULT_OUTPUT_DIR = "/tmp/generated_images"
77
+ DEFAULT_OUTPUT_DIR = "generated_images"
src/server.py CHANGED
@@ -45,7 +45,7 @@ def create_app() -> FastMCP:
45
45
  # Create FastMCP server
46
46
  mcp = FastMCP(
47
47
  "Ultimate Gemini MCP",
48
- version="1.0.0",
48
+ version="1.5.0",
49
49
  )
50
50
 
51
51
  # Register tools
@@ -53,27 +53,6 @@ def create_app() -> FastMCP:
53
53
  register_batch_generate_tool(mcp)
54
54
 
55
55
  # Add resources
56
- @mcp.resource("image://latest", mime_type="image/png")
57
- def get_latest_image() -> bytes:
58
- """
59
- Get the most recently generated image.
60
-
61
- Returns:
62
- Binary PNG image data
63
- """
64
- if not settings.output_dir.exists():
65
- raise FileNotFoundError("No images have been generated yet")
66
-
67
- # Find most recent PNG file
68
- images = sorted(
69
- settings.output_dir.glob("*.png"), key=lambda p: p.stat().st_mtime, reverse=True
70
- )
71
-
72
- if not images:
73
- raise FileNotFoundError("No images found in output directory")
74
-
75
- return images[0].read_bytes()
76
-
77
56
  @mcp.resource("models://list")
78
57
  def list_models() -> str:
79
58
  """List all available image generation models."""
@@ -115,7 +115,6 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
115
115
  output_format: str = "png",
116
116
  batch_size: int | None = None,
117
117
  negative_prompt: str | None = None,
118
- save_to_disk: bool = True,
119
118
  ) -> str:
120
119
  """
121
120
  Generate multiple images from a list of prompts efficiently.
@@ -131,13 +130,9 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
131
130
  output_format: Image format for all images (default: png)
132
131
  batch_size: Parallel batch size (default: from config)
133
132
  negative_prompt: Negative prompt for Imagen models (optional)
134
- save_to_disk: Save images to disk and return file paths (default: True).
135
- When True: Returns file paths only (efficient for MCP clients).
136
- When False: Returns base64 image data (for cloud/serverless).
137
133
 
138
134
  Returns:
139
- JSON string with batch results and either file paths (save_to_disk=True)
140
- or base64 image data (save_to_disk=False)
135
+ JSON string with batch results including individual image paths
141
136
  """
142
137
  try:
143
138
  result = await batch_generate_images(
@@ -148,7 +143,6 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
148
143
  output_format=output_format,
149
144
  batch_size=batch_size,
150
145
  negative_prompt=negative_prompt,
151
- save_to_disk=save_to_disk,
152
146
  )
153
147
 
154
148
  return json.dumps(result, indent=2)
@@ -153,19 +153,10 @@ async def generate_image_tool(
153
153
  }
154
154
 
155
155
  if save_to_disk:
156
- # Try to save to output directory, but don't fail if it errors
157
- try:
158
- file_path = result.save(settings.output_dir)
159
- image_info["path"] = str(file_path)
160
- image_info["filename"] = file_path.name
161
- logger.info(f"Saved image to {file_path}")
162
- except Exception as e:
163
- logger.warning(f"Failed to save image to disk: {e}")
164
- image_info["save_error"] = str(e)
165
- else:
166
- # Only include base64 data when not saving to disk (cloud/serverless scenarios)
167
- # This prevents token overflow for MCP clients with file system access
168
- image_info["image_base64"] = result.image_data
156
+ # Save to output directory
157
+ file_path = result.save(settings.output_dir)
158
+ image_info["path"] = str(file_path)
159
+ image_info["filename"] = file_path.name
169
160
 
170
161
  # Add enhanced prompt info
171
162
  if "enhanced_prompt" in result.metadata:
@@ -196,7 +187,6 @@ def register_generate_image_tool(mcp_server: Any) -> None:
196
187
  use_world_knowledge: bool = False,
197
188
  negative_prompt: str | None = None,
198
189
  seed: int | None = None,
199
- save_to_disk: bool = True,
200
190
  ) -> str:
201
191
  """
202
192
  Generate images using Google's Gemini or Imagen models.
@@ -218,9 +208,6 @@ def register_generate_image_tool(mcp_server: Any) -> None:
218
208
  use_world_knowledge: Use real-world knowledge (Gemini only)
219
209
  negative_prompt: What to avoid in the image (Imagen only)
220
210
  seed: Random seed for reproducibility (NOT SUPPORTED - will be ignored)
221
- save_to_disk: Save images to disk and return file paths (default: True).
222
- When True: Returns file paths only (efficient for MCP clients).
223
- When False: Returns base64 image data (for cloud/serverless).
224
211
 
225
212
  Available models:
226
213
  - gemini-2.5-flash-image (default)
@@ -229,8 +216,7 @@ def register_generate_image_tool(mcp_server: Any) -> None:
229
216
  - imagen-4-ultra
230
217
 
231
218
  Returns:
232
- JSON string with generation results and either file paths (save_to_disk=True)
233
- or base64 image data (save_to_disk=False)
219
+ JSON string with generation results and file paths
234
220
  """
235
221
  try:
236
222
  result = await generate_image_tool(
@@ -246,7 +232,6 @@ def register_generate_image_tool(mcp_server: Any) -> None:
246
232
  use_world_knowledge=use_world_knowledge,
247
233
  negative_prompt=negative_prompt,
248
234
  seed=seed,
249
- save_to_disk=save_to_disk,
250
235
  )
251
236
 
252
237
  return json.dumps(result, indent=2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ultimate-gemini-mcp
3
- Version: 1.0.19
3
+ Version: 1.5.1
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
@@ -0,0 +1,21 @@
1
+ src/__init__.py,sha256=nPaNFXizUWdTOnarUMPZPxfvBrhRHj7ifYKXoN8cvn8,435
2
+ src/server.py,sha256=hyXuhS1h6DN2EiGle8giEPSV1UB3ba7t4do_2olTK3A,5862
3
+ src/config/__init__.py,sha256=hL0recV_ycXBEGCym7BqwyaPCnQHy8o429pBirnBeiA,704
4
+ src/config/constants.py,sha256=ue4dT6wFwCzAgDWvSt8RnbdaoaGHY8c7SViNxI-P73w,1870
5
+ src/config/settings.py,sha256=uTxxblnyqmglz1COd3QxjC2w3o6l51S9MTanP4HBrgE,4257
6
+ src/core/__init__.py,sha256=PQKMAY5eYIEO1oS_hrzeuDgRopl76Wn6NLfhtXBX92I,1200
7
+ src/core/exceptions.py,sha256=NVb4tpwoX_DR-Wp8r73brXvZhEP35SUMyuEis8llFR0,1211
8
+ src/core/validation.py,sha256=JTB6_ft4nN6NHRVD5vOv_q12aPupBrlaNl32jwR2TuE,4758
9
+ src/services/__init__.py,sha256=n6FVDj052zvTerDFJSjaiLIycWGePm8Wr6dabbvd9o0,395
10
+ src/services/gemini_client.py,sha256=VPuBPDHhAag_8xBqzMuVIEWVG0BINXOHkwKIALzcFAk,8324
11
+ src/services/image_service.py,sha256=ovYsxDMwqsSiG1YbwBcTBrgmGTA7bdhDF6_jPs9XV_k,7095
12
+ src/services/imagen_client.py,sha256=mvwbmtYQHqpKKM36tp8JPZTjxav5eeeist37lRJsv4k,6122
13
+ src/services/prompt_enhancer.py,sha256=J_0s1EVmXdPAhjZPM4hL1vk9YiawqfH_ogF89VrFkW8,4776
14
+ src/tools/__init__.py,sha256=zBfAjFT51LvvD7WXTfDYiyJstRdphr2ChddAmGMZxkI,346
15
+ src/tools/batch_generate.py,sha256=LLrIwVvx-0kZBCiR0tcYnmKi5iYIdV-93ekIQbMrabo,5004
16
+ src/tools/generate_image.py,sha256=BGmplbkqaFvLa8mbJWs-a8v1t5i-Pdep4IZhXHIbisk,8456
17
+ ultimate_gemini_mcp-1.5.1.dist-info/METADATA,sha256=KQptxAop21rrwPfCNAPTM0402UaZjuZLvyC93-75lrA,16130
18
+ ultimate_gemini_mcp-1.5.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
+ ultimate_gemini_mcp-1.5.1.dist-info/entry_points.txt,sha256=-BeRTT4oR05e-YnF1ZNbNxlaekD4LsWhD-Zy_1dyRnc,56
20
+ ultimate_gemini_mcp-1.5.1.dist-info/licenses/LICENSE,sha256=ilyzUnN0QHYtYGJks-NFUwiniNu08IedLmn_muRqa0o,1480
21
+ ultimate_gemini_mcp-1.5.1.dist-info/RECORD,,
src/prompts/__init__.py DELETED
@@ -1 +0,0 @@
1
- """Prompts module for Ultimate Gemini MCP Server."""
src/resources/__init__.py DELETED
@@ -1 +0,0 @@
1
- """Resources module for Ultimate Gemini MCP Server."""
src/utils/__init__.py DELETED
@@ -1 +0,0 @@
1
- """Utilities module for Ultimate Gemini MCP Server."""
@@ -1,24 +0,0 @@
1
- src/__init__.py,sha256=Wa2aVVjviit-Fp2M1Hr_9tBYqADE5njmCd3-hVyYuek,436
2
- src/server.py,sha256=ur-IVp_FwzJdWq-SNYT7NdsJo_Ni0M8zfCcCj7ECRZw,6567
3
- src/config/__init__.py,sha256=hL0recV_ycXBEGCym7BqwyaPCnQHy8o429pBirnBeiA,704
4
- src/config/constants.py,sha256=uFQJMk03vLb5YjkYMimeIz06WAVnqW3tuWQlJLYjHtc,1875
5
- src/config/settings.py,sha256=uTxxblnyqmglz1COd3QxjC2w3o6l51S9MTanP4HBrgE,4257
6
- src/core/__init__.py,sha256=PQKMAY5eYIEO1oS_hrzeuDgRopl76Wn6NLfhtXBX92I,1200
7
- src/core/exceptions.py,sha256=NVb4tpwoX_DR-Wp8r73brXvZhEP35SUMyuEis8llFR0,1211
8
- src/core/validation.py,sha256=JTB6_ft4nN6NHRVD5vOv_q12aPupBrlaNl32jwR2TuE,4758
9
- src/prompts/__init__.py,sha256=86jl0abA84m7ugnBVKMmw3-LYTkzIR1A0zpBJCwIX1s,53
10
- src/resources/__init__.py,sha256=LEm1Gy-IyekCbJ4bPiyzj0__-UxyXkM_PI3wgGofJsM,55
11
- src/services/__init__.py,sha256=n6FVDj052zvTerDFJSjaiLIycWGePm8Wr6dabbvd9o0,395
12
- src/services/gemini_client.py,sha256=VPuBPDHhAag_8xBqzMuVIEWVG0BINXOHkwKIALzcFAk,8324
13
- src/services/image_service.py,sha256=ovYsxDMwqsSiG1YbwBcTBrgmGTA7bdhDF6_jPs9XV_k,7095
14
- src/services/imagen_client.py,sha256=mvwbmtYQHqpKKM36tp8JPZTjxav5eeeist37lRJsv4k,6122
15
- src/services/prompt_enhancer.py,sha256=J_0s1EVmXdPAhjZPM4hL1vk9YiawqfH_ogF89VrFkW8,4776
16
- src/tools/__init__.py,sha256=zBfAjFT51LvvD7WXTfDYiyJstRdphr2ChddAmGMZxkI,346
17
- src/tools/batch_generate.py,sha256=ESAUkHX5TOKPlHCzgY2jMLyAvSmInN2Jwm5-51EeWwg,5406
18
- src/tools/generate_image.py,sha256=M8jvqEdcPQpKgnMQqIhlCy7i9yO3hMVdsWR6l1pd8G8,9438
19
- src/utils/__init__.py,sha256=T2UShY0j2kiu63YPOsTACrzOfWTTq4PmC0flzcgeCl0,55
20
- ultimate_gemini_mcp-1.0.19.dist-info/METADATA,sha256=hLzRJMyv2Fxk7BJC3rWZYMk5Mg6aPDNAIVylax239U4,16131
21
- ultimate_gemini_mcp-1.0.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
- ultimate_gemini_mcp-1.0.19.dist-info/entry_points.txt,sha256=-BeRTT4oR05e-YnF1ZNbNxlaekD4LsWhD-Zy_1dyRnc,56
23
- ultimate_gemini_mcp-1.0.19.dist-info/licenses/LICENSE,sha256=ilyzUnN0QHYtYGJks-NFUwiniNu08IedLmn_muRqa0o,1480
24
- ultimate_gemini_mcp-1.0.19.dist-info/RECORD,,