The gist
Claude Code can write code. But a product isn't just code. It's images, icons, animations, good-looking dashboards. This used to take a whole team: a designer, an illustrator, an animator. Now Claude Code, with the right connectors, can do all of it in one session. This lesson is a map: where to get what, how to connect it, and what you get at the end.
Key concepts
- AI Image Generation: generating images through an API (gpt-image-2, Flux, Stable Diffusion; DALL-E was removed from the OpenAI API in May 2026)
- fal.ai MCP: single access to hundreds of AI models through one MCP server
- Figma MCP: the official plugin for working with design files from Claude Code
- shadcn/ui: ready-made React components that Claude Code uses by default
- Lucide Icons: 1500+ icons built into shadcn/ui
- Motion (formerly Framer Motion): animations for React in code
- Lottie: JSON animations from After Effects, straight in the browser
Block 1: AI image generation
Why this matters for a developer
Claude Code writes code, but a product needs images:
- A hero image on the landing page
- An avatar for an AI bot
- Icons for buttons
- OG images for social media
- Placeholders for prototypes
Before: open Figma, draw, export. Now: write a prompt right in the code → API → PNG → done.
Provider map (as of October 2026)
Per-image prices aren't listed here: they change and depend on size and quality. For current prices, see the providers' pages and the What's current page. Current model versions are also on the providers' sites.
| Provider | MCP/API | Best at |
|---|---|---|
| GPT Image (OpenAI, gpt-image-2 in the API) | API | Following the prompt precisely, editing |
| Flux (Black Forest Labs) | fal.ai MCP | Photorealism, speed |
| Stable Diffusion | Replicate MCP | Custom models, self-hosted |
| Ideogram | API | Text inside images |
| Recraft | MCP | Vector graphics, icons |
| Nano Banana (Google, models in Gemini) | Gemini API | Consistent character style, text in many languages |
| Midjourney | ❌ No official API announced | Web interface only |
fal.ai MCP: hundreds of models through one connector
fal.ai is the most practical choice. One MCP gives you access to hundreds of models: images, video, audio. Bonus: it's free to install, you only pay for runs.
Installation:
# Claude Code CLI (once)
claude mcp add --transport http fal-ai \
https://mcp.fal.ai/mcp \
--header "Authorization: Bearer $FAL_KEY"Or in .mcp.json:
{
"mcpServers": {
"fal-ai": {
"url": "https://mcp.fal.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_FAL_KEY"
}
}
}
}What fal.ai MCP can do (the set of tools changes; see the fal.ai docs for the current list):
search_models: find a model by descriptionget_model_schema: look up a model's parametersget_pricing: check the cost BEFORE runningrun_model: run synchronouslysubmit_job: run asynchronously (for slow models)check_job: check the statusupload_file: upload an input imagerecommend_model: the AI picks the best model for the tasksearch_docs: documentation for any model
Example in code:
import fal_client
# Flux Schnell is a fast, cheap model. Model names in the fal.ai catalog change
# (newer FLUX families keep coming out): find the current ones with search_models
result = fal_client.subscribe(
"fal-ai/flux/schnell",
arguments={
"prompt": "Modern dashboard UI, dark theme, data visualization, clean design",
"image_size": "landscape_16_9",
"num_images": 1
}
)
image_url = result["images"][0]["url"]
# Save it
import requests
img_data = requests.get(image_url).content
with open("hero.png", "wb") as f:
f.write(img_data)Flux prices on fal.ai depend on the model: fast versions are cheaper, higher-quality versions cost more. Before running, check the cost with the get_pricing tool or on the model's page.
OpenAI gpt-image-2: precision and editing
from openai import OpenAI
import base64, requests
client = OpenAI() # the key is read from the OPENAI_API_KEY environment variable; don't put it in the code
# Generation
result = client.images.generate(
model="gpt-image-2",
prompt="Minimalist SaaS landing page hero illustration, blue gradient, no text",
size="1024x1024",
quality="medium" # low/medium/high
)
# Editing an existing image
with open("screenshot.png", "rb") as img:
edited = client.images.edit(
model="gpt-image-2",
image=img,
prompt="Add a dark mode toggle button to the top right corner",
size="1024x1024"
)
# GPT Image models return the image as base64: save it to a file
with open("edited.png", "wb") as f:
f.write(base64.b64decode(edited.data[0].b64_json))gpt-image-2 pricing is token-based: the price of an image depends on quality (low, medium, high) and size, not one flat rate. See OpenAI's pricing page for current rates.
Replicate MCP: any open-source model
Replicate is like a store with thousands of open-source models. Want Stable Diffusion XL, Kandinsky, ControlNet, an anime style? It's all here.
# Install with Code mode (runs TypeScript code in a Deno sandbox). Flags and the package version change; check the Replicate docs
export REPLICATE_API_TOKEN=r8_...
claude mcp add "replicate" --scope user --transport stdio -- \
npx -y replicate-mcp@alpha --tools=codeAfter installation, Claude Code writes and runs the code itself:
User: "Find the best upscaler model and upscale this image 4x"
Claude: searches for models → writes TypeScript → runs it in a Deno sandbox → returns the resultRecraft MCP: vector graphics and icons
Recraft specializes in SVG/vector and precise style. Ideal for icons, logos, infographics.
# Install from GitHub (see the repository and recraft.ai for current instructions)
git clone https://github.com/recraft-ai/mcp-recraft-server
cd mcp-recraft-server && npm install{
"mcpServers": {
"recraft": {
"command": "node",
"args": ["/path/to/mcp-recraft-server/index.js"],
"env": { "RECRAFT_API_KEY": "your-key" }
}
}
}A practical workflow: generating assets for a product
#!/usr/bin/env python3
# generate-assets.py: generates all the assets for a landing page
import fal_client
import requests
import os
ASSETS = [
{
"name": "hero",
"prompt": "Modern SaaS dashboard hero image, purple gradient, floating UI cards, no text",
"size": "landscape_16_9",
"model": "fal-ai/flux/dev"
},
{
"name": "persona-bot",
"prompt": "Friendly AI assistant persona, minimalist, blue, circular",
"size": "square_hd",
"model": "fal-ai/flux/schnell"
},
{
"name": "og-image",
"prompt": "Clean tech product Open Graph image, 1200x630, bold typography space",
"size": "landscape_16_9",
"model": "fal-ai/flux/schnell"
}
]
os.makedirs("public/assets", exist_ok=True)
for asset in ASSETS:
print(f"Generating {asset['name']}...")
result = fal_client.subscribe(
asset["model"],
arguments={
"prompt": asset["prompt"],
"image_size": asset["size"],
"num_images": 1,
"num_inference_steps": 4 if "schnell" in asset["model"] else 28
}
)
url = result["images"][0]["url"]
img = requests.get(url).content
filename = f"public/assets/{asset['name']}.png"
with open(filename, "wb") as f:
f.write(img)
print(f" ✅ Saved: {filename}")
print("✅ All assets are ready!")Block 2: Figma MCP, design and code together
The official Figma plugin for Claude Code. It lets Claude read design files and write code from them.
Installation (2 minutes)
# Once
claude plugin install figma@claude-plugins-official
# Restart Claude Code → /plugin → Installed → Figma → AuthWhat Figma MCP can do
| Capability | What it gives you |
|---|---|
| Read components | Claude sees all the components in the design |
| Read variables | Gets colors, spacing, fonts |
| Generate code | Writes React/HTML from the selected frame |
| Write to the canvas | Creates elements right in Figma |
| Code Connect | Code stays in sync with the real components |
| Export a web interface | Sends a live site back into Figma |
The working workflow
1. A designer created a mockup in Figma 2. Claude Code: "Make a React component from this frame" 3. Claude reads the component through Figma MCP 4. Writes accurate React code with the right colors/fonts 5. Optionally: updates Figma directly
Alongside Figma, other tools have appeared where design meets code: Claude Design (prototypes and presentations from a description, with handoff to Claude Code) and Stitch from Google Labs (screen mockups from a description). For their plans and status, see the What's current page and the tools catalog.
Block 3: UI components, libraries Claude Code knows by heart
Claude Code knows popular UI libraries well enough to use them without documentation. That noticeably speeds up development.
shadcn/ui: the de facto standard (as of October 2026)
Not a library but a set of components that get copied into your project. Claude Code installs and uses them automatically.
# Initialize (once per project)
npx shadcn@latest init
# Add components
npx shadcn@latest add button card dialog table chartWhat it includes:
- 50+ components (Button, Card, Dialog, Table, Form, Chart...)
- Lucide React icons built in
- Themes (light/dark/system)
- Tailwind CSS under the hood
- TypeScript out of the box
Example through Claude Code:
Create a dashboard with a users table, a chart of activity over the week and metric cards (total users, revenue, conversion rate)
Claude immediately uses <DataTable>, <AreaChart>, <Card>, <Badge> with no explanations needed.
Tremor: dashboards and analytics
Specialized in data dashboards. 30+ components for data visualization.
npm install @tremor/reactDistinctive components:
<AreaChart>: area chart with tooltip<BarChart>: bar chart<DonutChart>: donut chart with legend<SparklineChart>: inline mini chart<ProgressBar>: progress bar with colors<Tracker>: uptime tracker<ScatterChart>: scatter plot<Callout>: info block<Metric>: card with a number + trend
import { Card, Metric, Text, AreaChart } from "@tremor/react";
const data = [
{ date: "Jan 23", Revenue: 2890 },
{ date: "Feb 23", Revenue: 4890 },
{ date: "Mar 23", Revenue: 3890 },
];
export default function Dashboard() {
return (
<Card>
<Text>Revenue</Text>
<Metric>$45,231</Metric>
<AreaChart
data={data}
index="date"
categories={["Revenue"]}
colors={["blue"]}
/>
</Card>
);
}MagicUI: wow effects
50+ animated components. For when you need something beautiful on a landing page.
# Installs like shadcn/ui: copies the components.
# MagicUI's install command has changed over time: see magicui.design docs for the current one
npx magicui-cli add animated-gradient-text
npx magicui-cli add sparkles-text
npx magicui-cli add bento-grid
npx magicui-cli add particlesPopular ones:
<AnimatedGradientText>: text with a moving gradient<SparklesText>: text with sparkles<BentoGrid>: a grid like on Apple.com<Particles>: interactive background particles<NumberTicker>: a counter that animates as it counts<WordFadeIn>: text that appears word by word<TypewriterEffect>: typewriter text<ShinyButton>: a button with a shine<Ripple>: an Android-style ripple
Aceternity UI: cinematic effects
The most complex animations: 3D cards, parallax, spotlight.
npm install framer-motion clsx tailwind-merge
# Components are copied manually from the siteHits:
<3DCard>: a card that rotates in 3D on hover<HeroParallax>: a parallax section like Aceternity's own<Spotlight>: a spotlight that follows the mouse<BackgroundBeams>: beams on a dark background<TracingBeam>: a beam that follows scrolling (Medium-style)<InfiniteMovingCards>: a nonstop testimonials carousel
Block 4: Icons, 10,000+ ready-made
Lucide React (built into shadcn/ui)
The standard choice. 1500+ icons, SVG, React components.
npm install lucide-reactimport { Search, Settings, ChevronRight, ArrowUpRight } from "lucide-react";
<Search className="w-5 h-5 text-gray-500" />
<Settings size={24} strokeWidth={1.5} />What's there: arrows, UI elements, brand icons (GitHub, Twitter, Youtube), nature, medicine, transportation, technology.
Heroicons (from Tailwind Labs)
About 300 icons in several styles: outline, solid, mini.
npm install @heroicons/reactimport { MagnifyingGlassIcon } from "@heroicons/react/24/outline";
import { StarIcon } from "@heroicons/react/24/solid";Phosphor Icons
6000+ icons in 6 styles (Regular, Bold, Fill, Duotone, Light, Thin). The largest set.
npm install @phosphor-icons/reactimport { Horse, Heart, Cube } from "@phosphor-icons/react";
<Horse size={32} weight="duotone" color="#FF69B4" />Tabler Icons
5000+ icons. There's an MCP server for searching them!
npm install @tabler/icons-reactimport { IconBrandGithub, IconDashboard } from "@tabler/icons-react";Free resources via API
// Unsplash: millions of photos via API
const response = await fetch(
`https://api.unsplash.com/photos/random?query=technology&client_id=${UNSPLASH_KEY}`
);
const photo = await response.json();
// photo.urls.regular, photo.urls.full
// Pexels: a similar service, also free
const pexels = await fetch(`https://api.pexels.com/v1/search?query=dashboard`, {
headers: { Authorization: PEXELS_KEY }
});
// Google Fonts API: programmatic access to 1500+ fonts
const fonts = await fetch(
`https://www.googleapis.com/webfonts/v1/webfonts?key=${GOOGLE_FONTS_KEY}&sort=popularity`
);Block 5: Animation, motion makes a product feel alive
Motion (formerly Framer Motion): the standard for React
The most popular animation library for React. Claude Code knows it well. Since November 2024 the project has been called Motion and is developed independently of Framer: the package is motion, imported from motion/react. The old framer-motion package still works, but write new code with motion.
npm install motionThe 5 most common patterns:
import { motion, AnimatePresence } from "motion/react";
// 1. Appear on load
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
>
Hello!
</motion.div>
// 2. Hover effect
<motion.button
whileHover={{ scale: 1.05, boxShadow: "0 10px 30px rgba(0,0,0,0.2)" }}
whileTap={{ scale: 0.95 }}
>
Click me
</motion.button>
// 3. Appear on scroll
<motion.div
initial={{ opacity: 0 }}
whileInView={{ opacity: 1 }}
viewport={{ once: true, margin: "-100px" }}
>
Visible on scroll
</motion.div>
// 4. Stagger: items appear one after another
const container = {
hidden: { opacity: 0 },
show: {
opacity: 1,
transition: { staggerChildren: 0.1 }
}
};
const item = { hidden: { opacity: 0, x: -20 }, show: { opacity: 1, x: 0 } };
<motion.ul variants={container} initial="hidden" animate="show">
{items.map(i => <motion.li key={i} variants={item}>{i}</motion.li>)}
</motion.ul>
// 5. AnimatePresence: animation on unmount
<AnimatePresence>
{isOpen && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: "auto" }}
exit={{ opacity: 0, height: 0 }}
>
Modal window
</motion.div>
)}
</AnimatePresence>Lottie: After Effects animations in the browser
A designer makes an animation in After Effects → exports JSON → Lottie plays it in the browser. LottieFiles.com has thousands of free animations (check the license terms for each one).
npm install lottie-reactimport Lottie from "lottie-react";
import loadingAnimation from "./loading.json"; // downloaded from LottieFiles
<Lottie
animationData={loadingAnimation}
style={{ width: 200, height: 200 }}
loop={true}
/>Where to get free Lottie animations:
- LottieFiles.com: a catalog of free and paid animations
- Icons8 Animated: animated icons
Three.js / React Three Fiber: 3D in the browser
For wow effects: 3D graphics, particles, interactive scenes.
npm install three @react-three/fiber @react-three/dreiimport { Canvas } from "@react-three/fiber";
import { OrbitControls, Sphere, MeshDistortMaterial } from "@react-three/drei";
export default function AnimatedSphere() {
return (
<Canvas>
<ambientLight intensity={0.5} />
<directionalLight position={[10, 10, 5]} />
<Sphere args={[1, 100, 200]} scale={2.4}>
<MeshDistortMaterial
color="#8352FD"
attach="material"
distort={0.5}
speed={2}
/>
</Sphere>
<OrbitControls enableZoom={false} />
</Canvas>
);
}GSAP: animation for non-React projects
The most powerful JavaScript animation library. For when Motion isn't enough.
npm install gsapimport { gsap } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
gsap.registerPlugin(ScrollTrigger);
// Animation on scroll
gsap.from(".hero-text", {
scrollTrigger: ".hero-text",
y: 100,
opacity: 0,
duration: 1,
stagger: 0.2
});
// Timeline: sequential animation
const tl = gsap.timeline({ defaults: { duration: 1 } });
tl.from(".logo", { opacity: 0, y: -50 })
.from(".nav", { opacity: 0, y: -30 }, "-=0.5")
.from(".hero", { opacity: 0, scale: 0.8 }, "-=0.3");Block 6: AI video generation
Runway API
Professional video generation (the service now lives at runway.com; for the current flagship model, see the Runway site). The example is illustrative: check the API address, version and model names against the Runway docs.
import requests
response = requests.post(
"https://api.runwayml.com/v1/image_to_video",
headers={"Authorization": f"Bearer {RUNWAY_API_KEY}"},
json={
"promptImage": "https://example.com/product.jpg",
"promptText": "Product rotating slowly on white background, studio lighting",
"model": "model_name_from_the_docs", # model names change; older versions (for example Gen-3 Alpha Turbo) get retired
"duration": 5,
"ratio": "1280:768"
}
)
task_id = response.json()["id"]Kling AI (Kuaishou)
A video generation model line with regular new releases. There's a free plan; for current versions, prices and limits, see kling.ai.
Sora (OpenAI): shut down
Important: Sora has been shut down: according to OpenAI's help center, the site and app were turned off on April 26, 2026, and the Sora API on September 24, 2026 (per the API deprecations page). There's no replacement in the OpenAI API. For video, look at Runway, Kling, Luma, Google Flow.
Summary: the design stack for Claude Code
Task → Tool
─────────────────────────────────────────────────────
Hero image, illustrations → fal.ai MCP (Flux Dev/Pro)
Cheap placeholders → fal.ai MCP (fast Flux models)
Photo editing → OpenAI gpt-image-2 API
Vector icons → Recraft MCP
Design → code → Figma MCP (official plugin)
UI components (React) → shadcn/ui (standard)
Data dashboards → Tremor
Landing wow effects → MagicUI + Aceternity UI
Icon sets → Lucide (small) / Phosphor (large)
React animation → Motion (formerly Framer Motion)
JSON animations → Lottie + LottieFiles.com
3D effects → React Three Fiber
Stock photos → Unsplash API / Pexels API
Fonts → Google Fonts APIPractice
- Sign up at fal.ai and get an API key
- Add fal.ai MCP to your project:
claude mcp add --transport http fal-ai https://mcp.fal.ai/mcp --header "Authorization: Bearer $FAL_KEY" - Ask Claude: "Generate a hero image for a SaaS product in the style of Linear.app using fal.ai"
- Add shadcn/ui to the project:
npx shadcn@latest init→ build a dashboard - Install Figma MCP:
claude plugin install figma@claude-plugins-official→ import a real design
Tools and resources
- fal.ai: hundreds of AI models through one MCP ($FAL_KEY)
- fal.ai MCP docs: MCP setup
- replicate.com: open-source models (Replicate MCP)
- bfl.ai: Flux directly (Black Forest Labs)
- recraft.ai: AI vector graphics
- figma.com/mcp →
claude plugin install figma@claude-plugins-official - ui.shadcn.com: UI components
- tremor.so: dashboard components
- magicui.design: animated components
- ui.aceternity.com: cinematic effects
- lucide.dev: icons
- phosphoricons.com: 6000+ icons
- lottiefiles.com: free JSON animations
- motion.dev: React animation (formerly Framer Motion)
- unsplash.com/developers: stock photo API
Key takeaways
fal.ai MCP = a Swiss Army knife for AI generation. One connector → hundreds of models. Takes a couple of minutes to set up.
shadcn/ui = the de facto standard. Claude Code knows it by heart. Don't learn other libraries until you've got this one down.
Figma MCP = the official design ↔︎ code bridge. The designer draws, and Claude Code codes straight from Figma.
Motion + MagicUI = the minimal stack for wow effects. Gives you most of the visual impact for little effort.
Next lesson
→ Product and income atlas: a catalog of MCP connectors, professions and ideas
The mark stays in this browser only and is never sent anywhere. My progress