npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lensika/gemini-mcp

v2.0.0

Published

MCP server exposing Google Gemini image generation — both Imagen 4 and Gemini 2.5 Flash Image (Nano Banana) with Identity Locking via reference images.

Downloads

18

Readme

@lensika/gemini-mcp

MCP server exposing Google Gemini image generation — both Imagen 4 and Gemini 2.5 Flash Image (Nano Banana) with Identity Locking via reference images.

What this fork adds over upstream [email protected]

| Capability | Upstream | This fork | |---|---|---| | Imagen 4 generation | yes | yes | | Gemini 2.5 Flash Image (Nano Banana) | no — wrong API method | yes | | Native text rendering inside images | partial (Imagen) | yes (Nano Banana) | | Identity Locking via reference photos | no input slot | yes — pass referenceImages | | Per-call model override on the tool | no | yes — pass model |

Install

npm install -g @lensika/gemini-mcp

Or invoke via npx -y @lensika/gemini-mcp --api-key "$GEMINI_API_KEY".

Register with Claude Code

claude mcp add --scope user gemini-mcp -- \
  npx -y @lensika/gemini-mcp --api-key "$GEMINI_API_KEY"

Or use the launcher script in lensika-core/scripts/hooks/gemini-mcp-launcher.sh.

Tools exposed

geminiGenerateImage

Returns image bytes as MCP image content.

{
  "prompt": "YouTube thumbnail, navy #004179 background, 'Stop Doing X' in orange #FF9E00, 16:9",
  "aspectRatio": "16:9",
  "numberOfImages": 2,
  "model": "gemini-2.5-flash-image",
  "referenceImages": ["~/lensika-core/skills/thumbnail-design/refs/wegaa/01.jpg"]
}

geminiGenerateImageToFile

Same inputs plus dstFilePath. Writes to disk. Use {id} in the path for multi-image runs.

Model selection

  • model parameter on the tool call → highest priority
  • GEMINI_IMAGE_MODEL env var → fallback default
  • Hardcoded imagen-4.0-generate-001 → final fallback

Routing: model name starting with gemini- and containing image → Gemini path (generateContent). Otherwise → Imagen path (generateImages).

Identity Locking

Pass 1–3 photos of the subject as referenceImages. Each entry can be:

  • An absolute path: /Users/.../wegaa/01.jpg
  • A ~-prefixed path: ~/lensika-core/skills/thumbnail-design/refs/wegaa/01.jpg
  • A raw base64 string of the image bytes

Only honored when model is a Gemini image model. Imagen calls reject referenceImages with a clear error.

License

MIT — see LICENSE and NOTICE for attribution.