Anthropic · Coding agent
How to Generate Images in Claude Code with MCP
Connect PixelMCP to Claude Code and your agent can generate images while it builds: hero images, icons, illustrations, blog headers and OG cards. It can save the files straight into your project using Nano Banana, GPT Image, FLUX, Seedream or Recraft.
Generate site images, icons and illustrations straight from your terminal while you build.
- 1
Add the server
Run this once. Use --scope user for every project, or --scope project to share it with your team via .mcp.json.
claude mcp add --transport http --scope user pixelmcp https://pixelmcp.com/mcp - 2
Authenticate
Start Claude Code, run /mcp, select pixelmcp and choose Authenticate. Your browser opens to sign in.
/mcp - 3
Check it's connected
The server should show as connected. You can also run:
claude mcp list
Things to try
“Generate a hero image for this landing page that matches the colors in our Tailwind theme and save it to public/hero.png.”
“Make a square app icon in our brand colors and wire it up as the favicon.”
Image models you can use in Claude Code
Not sure which to pick? Compare the models.
FAQ
What do I need to use PixelMCP in Claude Code?+
Claude Code installed (curl -fsSL https://claude.ai/install.sh | bash, or npm install -g @anthropic-ai/claude-code). You also need a PixelMCP account, which starts with 100 free credits.
Which image models can I use in Claude Code?+
Nano Banana 2 and Pro, GPT Image 2 and GPT Image 2 HD, FLUX.2 Pro and Klein, Seedream 5.0 Pro and Recraft V4.1. Name a model in your prompt or let the assistant choose.
How much does it cost?+
You pay per image with credits, from 6 credits (6¢) an image. There's no subscription and credits never expire. New accounts get 100 free credits.
How long does setup take?+
About a minute. Add the PixelMCP server URL to Claude Code, sign in once, and you're ready to generate.
Menus change often. If a label here doesn't match what you see, look for “Connectors”, “MCP” or “Integrations” in Claude Code's settings, or check Anthropic's docs.