Claude Code can't make images on its own, because Claude has no image model. To generate images with Claude Code, add an image-generation MCP server with one claude mcp add command, sign in, and then ask for pictures in plain English: Claude writes the prompt, calls the tool, checks the result and can save the file straight into your repo. This guide walks through the whole setup with the Kenerate MCP server, as of 23 October 2026.
Can Claude Code generate images by itself?
No. Claude Code is a coding agent: it reads and edits files, runs shell commands and reasons about code. It can see images (screenshots, mockups, outputs you give it) and it can draw things that are really code, such as SVG icons, HTML/CSS graphics, Mermaid diagrams or matplotlib charts. What it cannot do is produce a photo, an illustration or a hero image from a prompt, because no image model ships with Claude.
The fix is the Model Context Protocol (MCP), the open standard Claude Code uses to talk to outside tools. An image MCP server exposes tools like generate_image, and Claude Code calls them the same way it calls git or npm. If you want the wider picture for the Claude apps (claude.ai and Claude Desktop), see our post Can Claude generate images?. This post is only about Claude Code in the terminal.
What do you need before you start?
| Requirement | Details |
|---|---|
| Claude Code | Installed and working (claude starts a session) |
| A Kenerate account | Free sign-up; new accounts get starter credits |
| The MCP server URL | https://mcp.kenerateai.com/mcp (Streamable HTTP) |
| Sign-in method | Browser sign-in (OAuth) through /mcp, or an API key starting with ken_ |
| Credits | Same credits and prices as the Kenerate web app |
| Paid plan? | Not for images. Video and 3D need a paid plan |
There is nothing to install locally: the server is remote, so no Node, Python or Docker setup is needed on your machine.
How do you add an image generator to Claude Code?
Step 1: Add the server
Run this once in your terminal:
bashclaude mcp add --transport http kenerate https://mcp.kenerateai.com/mcp
By default Claude Code stores this at local scope, which means it loads only in the current project. Add --scope user after claude mcp add to make the image tools available in every project on your machine:
bashclaude mcp add --scope user --transport http kenerate https://mcp.kenerateai.com/mcp
Claude Code's MCP documentation describes three scopes:
| Scope | Where it loads | Stored in | Good for |
|---|---|---|---|
| local (default) | This project only | ~/.claude.json | Trying it out, private keys |
| project | This project, for the whole team | .mcp.json in the repo | Shared setup (each teammate signs in) |
| user | All your projects | ~/.claude.json | Using images everywhere |
Step 2: Sign in
Start Claude Code with claude, type /mcp, pick kenerate → Authenticate, sign in to Kenerate in the browser that opens, and click Allow. Tokens are stored and refreshed by Claude Code, so you only do this once.
Prefer a key? Create one on the Kenerate MCP page and pass it as a header instead:
bashclaude mcp add --transport http kenerate https://mcp.kenerateai.com/mcp --header "Authorization: Bearer ken_YOUR_KEY"
Keep that key out of .mcp.json and out of git; use local or user scope for anything that contains a key.
Step 3: Check the connection
bashclaude mcp list
Look for kenerate with a connected status. Inside a session, ask: "Check my Kenerate balance." Claude calls the free get_balance tool and tells you how many credits you have. You're ready.
How do you make your first image?
Just describe what you want. For example:
Make a 16:9 hero image for the landing page in this repo: a calm home office at sunrise, laptop and plants, soft photoreal light, no text. Use GPT Image 2.5 Sunburst and save it to public/images/hero.webp.
Behind the scenes Claude Code will:
- Call
generate_imagewith your prompt,aspect_ratio: "16:9"and the model you named. - Get back a job, then call
wait_for_generationuntil the image is ready (images take seconds). - Receive a URL on Kenerate storage, look at the image with its own vision, and download it into the path you gave.
Because Claude can see the result, you can ask it to judge the picture against your brief ("is the laptop screen blank? is there room on the left for the headline?") and try again if it isn't right. Each new try is a new charge, so say how many attempts it may make.
A few prompt habits that help:
- Put exact on-image words in quotes ("a poster that says "OPEN LATE"").
- Say the aspect ratio: 1:1 or 4:5 for feeds, 16:9 for banners and hero images, 9:16 for stories.
- Ask for up to four variations in one call with
count(each one is charged).
Which image model should Claude Code use?
Always name a model. If you don't, the server picks a default that may not suit the job. You can also ask Claude to call the free pick_model tool, which returns a recommended model with reasons. These are the main image models on the Kenerate MCP, with credits per image from Kenerate's pricing config (as of 23 October 2026):
| Model | Model id | Credits per image | Best for |
|---|---|---|---|
| GPT Image 2.5 Sunburst | kenerate/gpt-image-2.5-sunburst | 7.2 (medium, 1K) | Text on images, posters, UI, photoreal people, precise edits; up to 16 references |
| Nano Banana 2.1 | kenerate/nano-banana-2.1 | 21 (1K), 31.5 (2K), 42 (4K) | Same product or character across shots, edits from your photo; up to 14 references |
| Seedream 5.0 Pro | kenerate/seedream-v5.0-pro | 13.5 (1K) | Illustration, anime, all-round images; up to 10 references |
| Recraft V4.1 | kenerate/recraft-v4.1 | 12 | Logos and design work (no references) |
| GPT Image 2 | kenerate/gpt-image-2 | 18 (medium, 1K) | Maximum realism |
More detail on two of them: GPT Image 2 and Nano Banana 2.1. Ask Claude to run list_models to see every model and its current price.
How do you edit an image or keep a product consistent?
Edits work through references. Every input image has to be a Kenerate link, so local files go through upload_media first:
- Tell Claude: "Upload
assets/bottle.pngto Kenerate." It callsupload_mediawith the file as base64 (up to 2.5 MB; larger files need a public https link). - Then: "Using that image as a reference, put the bottle on a sunlit beach. Keep the bottle and label exactly the same."
- Claude calls
generate_imagewith the uploaded URL inreference_image_urlsand a prompt that describes only the change and what must stay.
For a product or character that has to look identical across many shots, Nano Banana 2.1 is the model the server recommends. For removing a background, there is a separate remove_background tool; for print or 4K, upscale_image with the image upscaler.
How do you batch images for a website or app?
This is where Claude Code beats a chat window: it already knows your project. A useful pattern:
- Ask Claude to read your pages or a content file and list the images the site needs, with a file name, aspect ratio and one-line prompt for each.
- Review the list. Ask it to call
estimate_costfor the whole batch before anything is charged. - Approve, and let it generate them one by one, saving each to a predictable path such as
public/images/<page>-hero.webp. - Ask it to update the
<img>tags or your CMS fields with the new paths and write alt text.
Keep the prompts in the repo (for example prompts/images.md) so you can rerun or tweak one image later without starting over. The server allows 8 calls per second and 120 per minute per account, which is plenty for a page's worth of images.
You can also run batches headless: claude -p "..." runs a single prompt without the interactive UI, which is handy in scripts. Set a clear limit on attempts in the prompt so a retry loop can't run away with your credits.
How do you keep costs under control?
Images on the MCP cost exactly what they cost in the Kenerate web app, and everything you make lands in your Kenerate history (our Claude AI image generator page shows real examples with their credit cost). Several tools are free and worth using:
| Free tool | What it does |
|---|---|
get_balance | Shows your credits and plan |
list_models | Lists models with their prices |
estimate_cost | Prices a call before anything is spent |
pick_model | Recommends a model for a task |
wait_for_generation, get_generation, list_generations | Check jobs and find past results |
upload_media | Uploads your files for edits |
Practical habits:
- Draft on the cheapest suitable model (GPT Image 2.5 Sunburst at 7.2 credits for 1K medium is the lowest-cost image in the table above), then rerun only the keeper on a pricier model or upscale it.
- Ask for 1–2 variations, not 4, until the prompt is right.
- Put a line in your project's
CLAUDE.mdsuch as "Ask before spending more than 50 Kenerate credits", so every session follows it.
What are Kenerate Skills, and do you need them?
Skills are reusable instructions that Claude Code loads when a request matches, or when you type /skill-name. Per the Claude Code skills docs, personal skills live in ~/.claude/skills/<name>/SKILL.md and project skills in .claude/skills/ inside a repo.
Kenerate publishes a free Skills pack that pairs with the MCP. Image-related ones include product-photoshoot-batch, background-remove-batch, image-editing, thumbnail-maker, social-carousel and brand-kit; others handle video editing, captions and ad variations. You don't need them to generate images, but they save you writing long prompts for repeat jobs. The install command for macOS, Linux and Windows is on the Kenerate MCP page under "CLI · Skills". After installing, type /thumbnail-maker (for example) in Claude Code.
What goes wrong, and how do you fix it?
| Problem | Likely cause | Fix |
|---|---|---|
kenerate shows "Needs authentication" | Not signed in yet | Run /mcp → kenerate → Authenticate |
| Tools don't appear in a new project | Added at local scope | Re-add with --scope user |
| "Not enough credits" | Balance too low | Top up or change plan at kenerateai.com/app/pricing |
| Edit ignores your local file | Local paths aren't accepted | upload_media first, then use the returned URL |
| "Too many calls" | Rate limit (8/s, 120/min) | Wait a moment; generate in sequence |
| Video request refused | Free plan | Video and 3D need a paid plan |
Is generating images with Claude Code worth it?
If you already work in Claude Code, yes. The win isn't a better image model; it's that the agent that knows your codebase also places, names and wires up the images, and can look at them before you do. Setup takes about two minutes, images use the same credits as the web app, and the same connection gives Claude Code video, music, speech and 3D tools when you need them. Start with the Kenerate MCP setup page.
Sources
- Claude Code docs, "Connect Claude Code to tools via MCP": https://code.claude.com/docs/en/mcp
- Claude Code docs, "Extend Claude with skills": https://code.claude.com/docs/en/skills
- Model Context Protocol, introduction: https://modelcontextprotocol.io/introduction






