{"_id":"@creating-cat/gemini-image-mcp-server","_rev":"3-409caa7a5f60a9d9908e0c15a195a499","name":"@creating-cat/gemini-image-mcp-server","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.2":{"name":"@creating-cat/gemini-image-mcp-server","version":"0.1.2","keywords":["gemini","image-generation","mcp","google-ai"],"author":{"url":"https://creating-cat.com/","name":"creating-cat"},"license":"MIT","_id":"@creating-cat/gemini-image-mcp-server@0.1.2","maintainers":[{"name":"creating-cat","email":"legacycat51@gmail.com"}],"homepage":"https://github.com/creating-cat/gemini-image-mcp-server#readme","bugs":{"url":"https://github.com/creating-cat/gemini-image-mcp-server/issues"},"bin":{"gemini-image-mcp-server":"dist/index.js"},"dist":{"shasum":"70e3aa6765d18334f34b8a848724644d82c0a30e","tarball":"https://registry.npmjs.org/@creating-cat/gemini-image-mcp-server/-/gemini-image-mcp-server-0.1.2.tgz","fileCount":8,"integrity":"sha512-x2/zjKpRSbL9C5OsHkM/DagzdJjSGdndHJHQaqmYxwHJ6kuGhpFGnILoSyH+DlXziYO+GwA3MSMMjh1RBl2pKw==","signatures":[{"sig":"MEQCIF1w3rQDPJr4bEW0HXkuLaTXTL73CTPgqUMpCSCuET55AiBLGYg097WDjS+HIHTt0I9atL28l2US8Xk3av4BU4VtZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42730},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"dc4742dae28d963626acaef667b1cc5fdf877038","scripts":{"dev":"ts-node src/index.ts","build":"tsc","check":"npx tsc --noEmit","start":"node dist/index.js","prepare":"npm run build"},"_npmUser":{"name":"creating-cat","email":"legacycat51@gmail.com"},"repository":{"url":"git+https://github.com/creating-cat/gemini-image-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for image generation using the Gemini API.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.25.28","sharp":"^0.34.2","dotenv":"^16.5.0","imagemin":"^9.0.1","@google/genai":"^1.0.1","imagemin-webp":"^8.0.0","imagemin-mozjpeg":"^10.0.0","imagemin-optipng":"^8.0.0","@types/imagemin-optipng":"^5.2.4","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^22.15.21","@types/imagemin":"^9.0.1","@types/imagemin-webp":"^7.0.3","@types/imagemin-mozjpeg":"^8.0.4"},"_npmOperationalInternal":{"tmp":"tmp/gemini-image-mcp-server_0.1.2_1752546325171_0.44400296626578917","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@creating-cat/gemini-image-mcp-server","version":"0.1.3","keywords":["gemini","image-generation","mcp","google-ai"],"author":{"url":"https://creating-cat.com/","name":"creating-cat"},"license":"MIT","_id":"@creating-cat/gemini-image-mcp-server@0.1.3","maintainers":[{"name":"creating-cat","email":"legacycat51@gmail.com"}],"homepage":"https://github.com/creating-cat/gemini-image-mcp-server#readme","bugs":{"url":"https://github.com/creating-cat/gemini-image-mcp-server/issues"},"bin":{"gemini-image-mcp-server":"dist/index.js"},"dist":{"shasum":"c6ce5375bebfd08c6bdc6335d1d264f7780208ee","tarball":"https://registry.npmjs.org/@creating-cat/gemini-image-mcp-server/-/gemini-image-mcp-server-0.1.3.tgz","fileCount":8,"integrity":"sha512-lBcw9VF/u/sPuBElXTur65mhQK69NC4F1FmNGlJQCsTZrlfNH1QivM/3EAKRvDOYxNV+E8AT0yCWYHARFldY5Q==","signatures":[{"sig":"MEUCIBSOSAINuXc8r9PhBTPbxWOO0yv42dyfaK6QWpqN3s80AiEA5nyaAsxFyV+KuCBaFJ7s6F+jB/zgVD2DpgmmXy4nrqU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42728},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c6f813b804876c9bfaf1eea02017c4013e8a3ce0","scripts":{"dev":"ts-node src/index.ts","build":"tsc","check":"npx tsc --noEmit","start":"node dist/index.js","prepare":"npm run build"},"_npmUser":{"name":"creating-cat","email":"legacycat51@gmail.com"},"repository":{"url":"git+https://github.com/creating-cat/gemini-image-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for image generation using the Gemini API.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.25.28","sharp":"^0.34.2","dotenv":"^16.5.0","imagemin":"^9.0.1","@google/genai":"^1.0.1","imagemin-webp":"^8.0.0","imagemin-mozjpeg":"^10.0.0","imagemin-optipng":"^8.0.0","@types/imagemin-optipng":"^5.2.4","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^22.15.21","@types/imagemin":"^9.0.1","@types/imagemin-webp":"^7.0.3","@types/imagemin-mozjpeg":"^8.0.4"},"_npmOperationalInternal":{"tmp":"tmp/gemini-image-mcp-server_0.1.3_1752548370896_0.010950448398020063","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@creating-cat/gemini-image-mcp-server","version":"0.1.4","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"start":"node dist/index.js","build":"tsc","dev":"ts-node src/index.ts","check":"npx tsc --noEmit","prepare":"npm run build"},"bin":{"gemini-image-mcp-server":"dist/index.js"},"author":{"name":"creating-cat","url":"https://creating-cat.com/"},"license":"MIT","description":"An MCP server for image generation using the Gemini API.","keywords":["gemini","image-generation","mcp","google-ai"],"repository":{"type":"git","url":"git+https://github.com/creating-cat/gemini-image-mcp-server.git"},"bugs":{"url":"https://github.com/creating-cat/gemini-image-mcp-server/issues"},"homepage":"https://github.com/creating-cat/gemini-image-mcp-server#readme","dependencies":{"@google/genai":"^1.0.1","@modelcontextprotocol/sdk":"^1.12.0","@types/imagemin-optipng":"^5.2.4","dotenv":"^16.5.0","imagemin":"^9.0.1","imagemin-mozjpeg":"^10.0.0","imagemin-optipng":"^8.0.0","imagemin-webp":"^8.0.0","sharp":"^0.34.2","zod":"^3.25.28"},"devDependencies":{"@types/imagemin":"^9.0.1","@types/imagemin-mozjpeg":"^8.0.4","@types/imagemin-webp":"^7.0.3","@types/node":"^22.15.21","ts-node":"^10.9.2","typescript":"^5.8.3"},"_id":"@creating-cat/gemini-image-mcp-server@0.1.4","gitHead":"e51247a0d8f7a2428254ce1a1c3cad90ca7500bc","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-02U3N9R6cerZKLfWCSZMBu66RLinMinS3b2WQ4b0CdEJ9YZz4xFjDIKDBdfFrAlTSAEX8cRs7I5LUSyh112tww==","shasum":"5b4fd542d8ea3b76c083a9034f946c683d9954a9","tarball":"https://registry.npmjs.org/@creating-cat/gemini-image-mcp-server/-/gemini-image-mcp-server-0.1.4.tgz","fileCount":8,"unpackedSize":42146,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCSmGTdShjeTfwBEO5hvlZqssMqKFdt9MKiQr+wSG+nXQIhANBuCRQTUMo8yxrONXtd4csEHuIPAwxwrqexUgZkYuP2"}]},"_npmUser":{"name":"creating-cat","email":"legacycat51@gmail.com"},"directories":{},"maintainers":[{"name":"creating-cat","email":"legacycat51@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gemini-image-mcp-server_0.1.4_1752550167356_0.8341661096724986"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-15T02:25:25.111Z","modified":"2025-07-15T03:29:27.730Z","0.1.2":"2025-07-15T02:25:25.354Z","0.1.3":"2025-07-15T02:59:31.122Z","0.1.4":"2025-07-15T03:29:27.548Z"},"bugs":{"url":"https://github.com/creating-cat/gemini-image-mcp-server/issues"},"author":{"name":"creating-cat","url":"https://creating-cat.com/"},"license":"MIT","homepage":"https://github.com/creating-cat/gemini-image-mcp-server#readme","keywords":["gemini","image-generation","mcp","google-ai"],"repository":{"type":"git","url":"git+https://github.com/creating-cat/gemini-image-mcp-server.git"},"description":"An MCP server for image generation using the Gemini API.","maintainers":[{"name":"creating-cat","email":"legacycat51@gmail.com"}],"readme":"[日本語版はこちら (Read in Japanese)](./README.ja.md)\n\n# Gemini Image MCP Server\n\nThis is an MCP (Model Context Protocol) server that uses Google's Gemini API to generate images and save them to a specified directory.\nIn addition to text prompts, you can optionally provide input images to guide the image generation process.\nGenerated images are automatically compressed to reduce file size.\n\n---\n\n## Features\n\n* Image generation from text prompts\n* (Optional) Image generation using input reference images\n* Automatic compression of generated images (JPEG, PNG)\n* Unique file name assignment to prevent file name conflicts\n* Operates as an MCP server, accepting tool calls via standard input/output\n\n---\n\n## Prerequisites\n\n* Node.js (v18 or higher recommended)\n* Google Cloud Project with Gemini API enabled\n* Gemini API Key\n\n---\n\n## Setup\n\n### Example MCP server configuration for Roo Code\n\n```json\n{\n  \"mcpServers\": {\n    \"gemini-image-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@creating-cat/gemini-image-mcp-server\"\n      ],\n      \"env\": {\n        \"GEMINI_API_KEY\": \"YOUR_GEMINI_API_KEY\"\n      },\n      \"disabled\": false,\n      \"timeout\": 300\n    }\n  }\n}\n```\n\n* Replace `YOUR_GEMINI_API_KEY` with your actual Gemini API Key.\n\n  * You can also use `${env:GEMINI_API_KEY}` to retrieve the key from environment variables (Roo Code feature).\n\n---\n\n## Tool: `generate_image`\n\nThis MCP server provides a tool named `generate_image`.\n\n### Input Parameters\n\n| Parameter Name                  | Description                                                                                                                                                                          | Default Value      |\n| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |\n| `prompt`                        | (string, required) Text prompt for image generation. If input images are provided, include instructions on how to incorporate them into the generated image. English is recommended. | None               |\n| `output_directory`              | (string, optional) Directory path where the generated image will be saved.                                                                                                           | `output/images`    |\n| `file_name`                     | (string, optional) Name of the saved image file (without extension).                                                                                                                 | `generated_image`  |\n| `input_image_paths`             | (string\\[], optional) List of file paths for input reference images.                                                                                                                 | `[]` (empty array) |\n| `use_enhanced_prompt`           | (boolean, optional) Whether to use enhanced prompts to assist AI instructions.                                                                                                       | `true`             |\n| `target_image_max_size`         | (number, optional) Maximum size (in pixels) for the longer edge after resizing. The aspect ratio is preserved.                                                                       | `512`              |\n| `force_conversion_type`         | (string, optional) Optionally force conversion to a specific format ('jpeg', 'webp', 'png'). If not specified, the original format will be processed, defaulting to PNG for non-JPEG images. | None               |\n| `skip_compression_and_resizing` | (boolean, optional) Whether to skip compression and resizing of generated images. If `true`, `force_conversion_type` and `target_image_max_size` will be ignored.                    | `false`            |\n| `jpeg_quality`                  | (number, optional) JPEG quality (0-100). Lower values result in higher compression.                                                                                                  | `80`               |\n| `webp_quality`                  | (number, optional) WebP quality (0-100). Lower values result in higher compression.                                                                                                  | `80`               |\n| `png_compression_level`         | (number, optional) PNG compression level (0-9). Higher values result in higher compression.                                                                                          | `9`                |\n| `optipng_optimization_level`    | (number, optional) OptiPNG optimization level (0-7). Higher values result in higher compression.                                                                                     | `2`                |\n\n### Output\n\nOn success, the server returns the save path of the generated image and a message detailing the process, including the original and compressed file sizes.\nExample:\n\n```json\n{\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"Image successfully generated and compressed at output/images/my_cat.jpg.\\nOriginal size: 1024.12KB, Final size: 150.45KB\"\n    }\n  ]\n}\n```\n\nIf an error occurs, an error message will be returned.\n\n---\n\n## Notes\n\n* The MIME type and aspect ratio of the generated images depend on the default settings of the Gemini API.\n* Handle your API key with care.\n* This server uses the model `gemini-2.0-flash-preview-image-generation`. Google may discontinue this model in the future.\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}