Labsco
MCP SERVER

Gemini Imagen 3.0

by falahgs

Generate images with Google's Imagen 3.0 and get them saved to disk with an HTML preview you can open.

Image Generation
Summary
Imagen 3.0 with the file handling already done.

The generation is Google's; what is added is everything after it. Images land on disk with collision-free names and an HTML wrapper you can open, so a batch of four is browsable instead of four blobs in a transcript.

What it is

A TypeScript server in front of Google's Imagen 3.0 model, reached through the Gemini API. It generates images, writes each to a local images directory under a filename built from the sanitized prompt plus a timestamp, and can emit HTML preview tags pointing at those files.

What you get
  • generate_images takes a prompt and an optional count from 1 to 4, and returns that many images from Imagen 3.0.
  • Files are written locally as PNGs, named from the sanitized prompt and a timestamp, so a batch never overwrites the last one and a week-old render is still identifiable.
  • create_image_html turns a list of image paths into HTML tags with absolute file:// URLs, at a width and height you choose — 512 by 512 unless you say otherwise.
  • MIT-licensed TypeScript you run yourself, with two named error codes for a tool that is missing and for a generation that failed.
Requirements

Node.js 18 or higher and a Google Gemini API key, passed to the server as an environment variable. There is no published package to launch: clone the repository, run the build, and point your client at the built entry file. The README names an absolute Windows path for the output directory, so check where your images actually land before wiring anything to that location.

Setup effort

Build from source — clone the repository and build it, then point your client at the binary