# nanobanana-mcp-image-generation

The nanobanana-mcp-image-generation skill connects an agent to Gemini image generation and editing with model selection, 4K output, aspect ratios, and templates. Use it for visual assets from a coding workspace.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 172 installs · ★ 9 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/nanobanana-mcp-image-generation/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/nanobanana-mcp-image-generation

## What it does

The skill documents an MCP server for creating images from text and changing existing files. It supports automatic routing across the `nb2`, `pro`, and `flash` tiers, with controls for `4k` or `1k` output, aspect ratios such as `1:1` and `16:9`, variation count, negative prompts, and output paths. Templates cover photography and design, while image files can be sent through the Gemini Files API.

A Google Gemini API key is required, exposed through `GEMINI_API_KEY`. The MCP setup runs `uvx` with `nanobanana-mcp-server@latest`; Google Cloud deployments can use `vertex_ai`, `GCP_PROJECT_ID`, and `GCP_REGION`. Without `GEMINI_API_KEY`, Gemini generation will not run.

The documented tools cover generation, masked edits, and uploading a reference image. Choose `pro` for demanding compositions with `thinking_level`, `flash` for quick drafts, or pass a `seed` when you need a repeatable result.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill nanobanana-mcp-image-generation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/nanobanana-mcp-image-generation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/nanobanana-mcp-image-generation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill nanobanana-mcp-image-generation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/nanobanana-mcp-image-generation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill nanobanana-mcp-image-generation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/nanobanana-mcp-image-generation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/mcp-skills skills/nanobanana-mcp-image-generation
```

2. **Manually: put the files in place**
- File: `.github/skills/nanobanana-mcp-image-generation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill nanobanana-mcp-image-generation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/nanobanana-mcp-image-generation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/nanobanana-mcp-image-generation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill nanobanana-mcp-image-generation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/nanobanana-mcp-image-generation/SKILL.md

## When to use it
- generate an image from a text prompt
- set an image ratio and output resolution
- produce several variations of one concept
- edit an existing image with a prompt
- upload a reference file for generation

## Example prompts
- Generate a coffee mug product image in `4:3` and save it as `output.png`.
- Edit `photo.jpg` by adding a sunset sky, then save the result as `edited.jpg`.
- Use `mask.png` with `portrait.jpg` to change the shirt to blue with the `pro` model.

## Similar
- [nanobanana](https://affpapa.org/en/nevibecode/skills/resciencelab-nanobanana.md) — skill · 3000 installs
- [nanobanana-ppt](https://affpapa.org/en/nevibecode/skills/nanobanana-ppt.md) — skill · 3000 installs
- [image-generation](https://affpapa.org/en/nevibecode/skills/zc277584121-image-generation.md) — skill · 4000 installs
- [nanobanana-skill](https://affpapa.org/en/nevibecode/skills/nanobanana-skill.md) — skill · 335 installs
- [nanobanana-mcp-server](https://affpapa.org/en/nevibecode/mcp/nanobanana-mcp-server.md) — MCP server · ★ 411 repo stars
- [qianwen-image-generation](https://affpapa.org/en/nevibecode/skills/qianwen-image-generation.md) — skill · 6300 installs

From the same set: [reason-machines/mcp-skills](https://affpapa.org/en/nevibecode/by/reason-machines/mcp-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
