Generate Images in Claude Code: 2-Minute MCP Setup
Generate images in Claude Code or Claude Desktop through one remote MCP server: no local install, no Google API key, images from $0.03. Real setup, real costs.
Orijinal en dilinde

An image generation MCP server is the missing piece that lets Claude create pictures: Claude writes the prompt and calls a generate_image tool, the server renders the result on a real model (Google's Nano Banana family in our case), and hands back a URL. Claude itself can't draw. Anthropic has never shipped an image model, so Claude Code and Claude Desktop read images perfectly well but produce none.
The quick answer, if that's all you came for: create an API key in your BananaBanana profile, then run one command in your terminal:
claude mcp add --transport http bananabanana https://bananabanana.pro/api/mcp \
--header "Authorization: Bearer bb_live_YOUR_KEY"
That's the whole install. No local server, no Google Cloud account, no subscription. Images bill from $0.03 apiece off a prepaid balance, video from $0.10. And to keep this guide honest: every illustration in this article was generated by Claude Code through this exact server while it was writing the text. The full media bill came to $1.18, receipts at the end.
Why can't Claude generate images on its own?
Anthropic builds text and reasoning models. Vision goes one way: Claude can look at your screenshots and photos, but there is no image generator anywhere in the model family, and none has been announced. ChatGPT ships with a built-in image model. Claude doesn't.
The community answer has been local MCP servers. GitHub has a pile of them, guinacio/claude-image-gen and serkanhaslak's gemini-imagen-mcp-server being the most popular, and they work. But "install" there means: clone a repo or run an npm package, keep Node or Python around, wire the server into a config file on every machine, and, the real catch, bring your own Google AI Studio API key. Billing lands on your Google account with its own quotas and dashboard. For a developer poking around on one laptop, fine. For anyone else it's a small infrastructure project.
A remote MCP server flips that. The server already runs on our side; the pipeline behind it is the same one that serves the BananaBanana generator. You authenticate with one key, pay per generation from a prepaid balance, and the setup is identical in Claude Code on a laptop, in Claude Desktop on a colleague's machine, and in claude.ai in a browser. There is genuinely nothing to maintain.

How do you connect Claude Code to an image generation MCP server?
Two minutes, three steps. First, register and open Profile → MCP API Keys. Create a key: it's shown once, starts with bb_live_, and is stored hashed on our side, so copy it right away. New accounts come with a $0.10 starting balance, enough for three test images on the cheapest model before you decide whether to top up.
Claude Code
One command, as above:
claude mcp add --transport http bananabanana https://bananabanana.pro/api/mcp \
--header "Authorization: Bearer bb_live_YOUR_KEY"
The flags are documented in the Claude Code MCP docs; HTTP is the recommended transport for remote servers. Run /mcp inside a session to confirm the connection is live: you should see seven tools, from list_models to get_result. From then on, "generate a 16:9 hero image for this post" is an instruction Claude Code can actually carry out.
Claude Desktop and claude.ai
In Claude Desktop and claude.ai the path is Settings → Connectors → Add custom connector, then paste https://bananabanana.pro/api/mcp as the server URL. For the key, open the Request headers section and add an Authorization header with the value Bearer bb_live_YOUR_KEY. Enter the full value including the word Bearer and the space; according to Anthropic's connector docs, Claude sends the header exactly as typed and adds no prefix of its own.
One honest caveat: request-header auth in connectors is in beta and Anthropic is rolling it out gradually, so your account may not show that section yet. The fallback works everywhere Claude Desktop runs: add the server through the mcp-remote bridge in claude_desktop_config.json (Settings → Developer → Edit Config), which needs Node.js installed:
{
"mcpServers": {
"bananabanana": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://bananabanana.pro/api/mcp",
"--header", "Authorization: Bearer bb_live_YOUR_KEY"
]
}
}
}
Both variants, plus a raw JSON-RPC example for anything else, live on the MCP server page:

Does it work outside Claude: Gemini CLI, GLM-5.2, ChatGPT, Grok?
MCP is an open protocol, so any client that can send a Bearer header connects the same way. The current state, checked in July 2026:
| Client | Works today? | How |
|---|---|---|
| Claude Code | yes | claude mcp add --transport http … |
| Claude Desktop / claude.ai | yes | custom connector (header auth in beta) or mcp-remote bridge |
| Gemini CLI | yes | httpUrl + headers in settings.json |
| ZCode (GLM-5.2) | yes | Settings → MCP Servers → type HTTP + Authorization header |
| GLM-5.2 inside Claude Code | yes | same server config; only the model endpoint changes |
| ChatGPT | not yet | developer-mode connectors expect OAuth |
| Grok | not yet | custom connectors expect OAuth |
For Gemini CLI, the official MCP docs show the shape: an entry under mcpServers with "httpUrl": "https://bananabanana.pro/api/mcp" and a headers object carrying the Authorization value. Z.ai's ZCode adds HTTP servers through a settings form with an optional headers block, per its MCP services documentation. And since GLM-5.2 also runs inside Claude Code via an Anthropic-compatible endpoint, the connected server simply stays in place when you swap models. ChatGPT and Grok both ship custom MCP connectors now, but their dialogs are built around OAuth rather than pasted keys; until our OAuth 2.1 support lands, those two are out.
Use case 1: a hero image for the post you're writing
The everyday one. You're drafting a blog post in Claude Code and it needs a header. You say: "generate a 16:9 editorial hero about database caching, library metaphor." Claude composes the prompt and makes the call:
→ generate_image {"prompt": "Editorial illustration for a developer blog post
about database caching: a small librarian robot placing three glowing books
onto a tiny fast bookshelf in the foreground, a huge dim archive hall
stretching far behind it, soft pastel background, dark ink details, accents
of violet and warm amber, clean minimal composition, generous negative
space, no text", "model": "nano-banana-pro", "aspect_ratio": "16:9"}
← {"job_id": "cmxq…", "status": "processing", "cost_charged_usd": 0.11,
"balance_remaining_usd": 4.89}
→ get_result {"job_id": "cmxq…"}
← {"status": "completed", "files": [{"url": "https://bananabanana.pro/api/files/…"}]}
Here's that exact prompt's output, first attempt, no rerolls:

Cost: $0.11 on Nano Banana Pro at 1K. The agent downloads the file from the signed URL, drops it into the repo, and writes the alt text. Links stay valid for 24 hours; after that, get_result issues fresh ones.
Use case 2: product shots without a photographer
Marketing mockups are where the photography-style prompting pays off. Describe the shot the way a photographer would brief it: subject, surface, light source, lens.
→ generate_image {"prompt": "A photorealistic product photo of a matte
sage-green ceramic pour-over coffee set on a pale linen tablecloth, soft
diffused daylight from a window on the left, gentle shadows, shallow depth
of field, eye-level shot with a 50mm lens, minimal warm styling, no text",
"model": "nano-banana-pro", "aspect_ratio": "1:1"}

Again first attempt, again $0.11. The part I like most isn't the shot itself but what happens next: an edit_image tool takes the job_id of a finished image plus an instruction like "make the background pure white and add a soft shadow." Multi-turn refinement without re-describing the scene, each pass billed as one image. For catalog work, that loop is the difference between a tool and a toy.
Use case 3: a recurring character across images
Brand mascots, comic panels, storyboards all need the same character to survive from one image to the next. Through MCP the working method is a character sheet: a fixed description block the agent pastes into every prompt. Ours was "a small courier robot with a round matte-teal head, one large friendly amber eye, boxy cream-white body with visible brass screws, and a canvas messenger bag with a brass buckle." Two scenes, two calls, $0.11 each:


I'll be straight about the result: it's good, not perfect. The bag, the amber eye, the cream body with brass screws all carried over. But the head drifted from a sphere toward a helmet, and the dusk scene came back in a more graphic line style. That's the known ceiling of text-only anchoring. Reference images fix it properly, and the web generator accepts up to 5 character references on Nano Banana Pro; the MCP generate_image tool doesn't take image inputs yet. Our character consistency field guide covers both methods, including which features drift first.
Use case 4: a video clip from the same chat
Video runs through the same server, with one extra safeguard. Clips cost more than images (up to $4.40 for a top-end Veo 3.1 render), so generate_video never charges on the first call. It returns a quote, and the agent has to repeat the call accepting the exact amount:
→ generate_video {"prompt": "Aerial drone shot rising slowly over terraced tea
fields at sunrise, thin mist drifting in the valleys, golden light catching
the ridges, smooth cinematic camera motion, wide shot",
"model": "veo-3.1-fast", "duration": 6, "resolution": "720p"}
← {"status": "confirmation_required", "quoted_cost_usd": 0.52, …}
→ generate_video {…same arguments…, "confirm_cost": 0.52}
← {"job_id": "cmxr…", "status": "processing", "cost_charged_usd": 0.52}
The result, six silent 720p seconds from Veo 3.1 Fast, first take:
Videos take one to ten minutes, so the agent polls get_result while doing other work. If you want sound, Omni Flash runs through the same tool at a flat $1.00 with audio always on, though it picks its own duration between 3 and 10 seconds. One thing the MCP tool can't do yet: image-to-video. That needs the web generator, where you set first and last frames.
Every image in this post came from this workflow
This is the part I'd want proof of if I were reading, so here's the concrete loop. Claude Code wrote a section of this article, composed an illustration prompt in our house style, called the generation tool, waited the twenty-odd seconds, checked the returned image, and inserted the markdown with alt text before moving on. Seven generation calls for the media you see here, all usable on the first attempt, which honestly beat my expectations. The only asset that isn't a generation is the docs-page screenshot, taken with a browser tool.
The images aren't flawless (the courier robot's head, as noted, has opinions of its own). The point is that "illustrated" stopped being a separate production step. The same session that writes the text ships the visuals, and the whole thing cost about as much as a bus ticket.
What did this article's media actually cost?
Everything below was billed at the standard per-generation prices from our pricing page, the same numbers list_models reports to the agent. No staff discounts.
| Asset | Model | Price |
|---|---|---|
| Cover image | Nano Banana Pro, 1K | $0.11 |
| Writer-and-painter illustration | Nano Banana Pro, 1K | $0.11 |
| Caching-guide hero (use case 1) | Nano Banana Pro, 1K | $0.11 |
| Coffee set mockup (use case 2) | Nano Banana Pro, 1K | $0.11 |
| Courier robot series, 2 images (use case 3) | Nano Banana Pro, 1K | $0.22 |
| Tea fields clip, 6 s silent 720p (use case 4) | Veo 3.1 Fast | $0.52 |
| Docs screenshot | browser, not a generation | $0.00 |
| Total | $1.18 |
We used the top image model everywhere because these images ship on a public page. Drafting with Nano Banana 2 Lite at $0.03 would have cut the image part of the bill from $0.66 to $0.18; our Lite guide covers when the cheap model is enough.
Ready to try it? Connect the BananaBanana MCP server and ask Claude for your first image.
FAQ
Does the BananaBanana MCP server work with clients other than Claude?
Yes, with any MCP client that supports Streamable HTTP and lets you attach an Authorization header: Claude Code, Claude Desktop, Gemini CLI (httpUrl plus headers in settings.json), Z.ai's ZCode for GLM-5.2 (HTTP server type with a headers form), and editor agents like Cursor or VS Code. GLM-5.2 running inside Claude Code through Z.ai's Anthropic-compatible endpoint inherits the connection unchanged, since MCP servers are configured per client, not per model. The holdouts are ChatGPT and Grok: both added custom MCP connectors, but their dialogs authenticate through OAuth rather than pasted keys, so a bb_live_ key has nowhere to go yet. OAuth 2.1 support is planned on our side to close that gap; anything you build yourself can already connect directly over JSON-RPC.
Do I need a Google API key or a Google Cloud account?
No, and that's most of the reason this server exists. Local image-generation MCP servers from GitHub call the Gemini API directly, so they need your own Google AI Studio key; you manage its quotas and billing yourself. Here, generation runs on BananaBanana's managed pool of Vertex AI keys, and your only credential is the bb_live_ key from your profile. You never touch Google's console, and Google never bills you. The trade-off is honest: you give up Google's raw API pricing and direct parameter access, and you get per-generation prices with no minimum spend, automatic key rotation, and one balance shared between the MCP server, the web generator, and the Telegram app. Revoking a leaked key takes one click and disturbs nothing else.
How does billing work on the MCP server?
Prepaid balance, per-generation prices, no subscription. You top up, and each generation deducts its listed price: images $0.03 to $0.20 depending on model and resolution, video $0.10 to $4.40 depending on model, duration, resolution and audio. The agent knows every price beforehand: list_models serves live numbers, and every video call (plus any multi-image batch) must first receive a quote and confirm it with confirm_cost before a cent moves. Every result reports cost_charged_usd and balance_remaining_usd, so cost tracking is built into the conversation. Failed generations refund automatically. If a runaway agent worries you, set a daily USD cap per key in Profile → MCP API Keys and audit the per-key usage log, which records tool, model, cost and a prompt preview.
What happens when my balance hits zero mid-task?
The next paid tool call fails cleanly with an INSUFFICIENT_BALANCE error that includes a top-up link, and the agent relays it to you. Nothing goes negative; there is no overdraft or surprise invoice. The free tools (list_models, get_account, get_result, list_generations) keep working, so everything already generated stays reachable, and a generation that started before the balance ran out finishes normally, because the charge happens once, at start. In practice Claude just reports the failed call with the top-up URL and carries on with the rest of the task. For a buffer instead of a hard stop, watch balance_remaining_usd on each result or have the agent check get_account before batch jobs.
What does the content filter block, and do I pay for filtered prompts?
The upstream Google models apply their own safety filters; when a generation is rejected, the server returns one unified SAFETY_FILTERED code instead of Google's half-dozen internal variants. Blocked categories are what you'd expect from Gemini and Veo policies: sexual content involving minors, explicit violence, real-person deepfakes and similar. The filters also throw occasional false positives on innocent prompts, which is not our call and we won't pretend otherwise. Billing is simple: a fully filtered generation is refunded automatically, and for video, where Google sometimes filters only part of the output, the refund is proportional. You pay only for media you receive. If a prompt keeps tripping the filter, reword the concrete detail that triggers it rather than retrying the same text.
Who owns the images I generate through the MCP server?
You do. Under our terms, generated images and videos are yours for personal and commercial use, subject to the underlying model provider's terms; we claim no ownership of your content, and prompts you submit remain yours. Two storage details matter in practice. The URLs get_result returns are signed links valid for 24 hours, so download what you care about or call get_result again for fresh ones. And generated media is stored for 30 days, then permanently deleted: the MCP server is a generation pipeline, not an archive. Everything generated over MCP also lands in your web account's generation history, so you can browse and re-download it from the site within the retention window.