youtu.be/skhKhapsmEQ?...
In this video, I installed and walked through the source code of nanobanana gemini-cli-extension. The mcp-server folder has an imageGenerate.ts file that calls the Gemini API to generate images from text or edit an image from an input image and a prompt.
youtu.be