Key answer: to build production Next.js UI with Claude Code, give the assistant real components to compose from instead of asking it to invent UI from scratch. The assistant works best when it edits your owned source, reuses a known component library through an MCP server, and respects the Next.js server-and-client boundary — server components for content, client components for interactivity. Generation from nothing produces plausible UI that usually misses accessibility, the RSC boundary, and consistency; composition from a vetted library produces maintainable, consistent UI you own. This guide shows the workflow: setting up context, keeping server and client components correct, editing owned source, and using MCP so Claude Code builds Next.js UI that ships rather than throwaway generations.
Table of contents
- Compose, don't generate from scratch
- The Next.js boundary Claude Code must respect
- Give the assistant real context
- Editing owned source
- Server components for content
- Client components for interactivity
- Accessibility by default
- Consistency through a component library
- Using MCP for reusable UI
- How AETumi builds Next.js UI with AI
- Technical proof on GitHub
- FAQ
- Related resources
- Conclusion
Compose, don't generate from scratch
The difference between throwaway AI UI and production UI is whether the assistant composes from known-good building blocks or invents from nothing. Ask Claude Code to write a Next.js component from a blank prompt and you get plausible markup that usually forgets the server-and-client boundary, skips accessibility, and looks different from every other component in your app. Give it a real component library to compose from and it produces consistent, maintainable UI.
That shift — from generation to composition — is the foundation of building production UI with an AI assistant, and it runs through the MCP and docs guidance. The assistant's job is not to imagine your UI; it is to assemble your UI from parts you already trust.
The Next.js boundary Claude Code must respect
The defining constraint in modern Next.js is the server-and-client boundary. Server components render on the server and ship HTML; client components hydrate in the browser and handle interactivity. Data fetching and static content belong in server components; state, effects and event handlers belong in client components marked with the client directive. An assistant that ignores this boundary produces code that either crashes or ships far more JavaScript than needed.
Building production UI with Claude Code means keeping it on the right side of this line. The assistant must know which components are server and which are client, and why — put content in server components for speed and crawlability, and isolate interactivity in small client islands. This is the same discipline that governs putting a 3D scene in a client island on interactive websites.
Give the assistant real context
Claude Code produces far better Next.js UI when it can see your actual project — your existing components, your design tokens, your conventions. Point it at the real files rather than describing them, so it matches your patterns instead of inventing new ones. A CLAUDE.md that names your component directory, your styling approach and your boundary conventions turns generic output into output that fits your codebase.
The more the assistant works from your real source and a real component library, the more its UI looks like it belongs. Context is what converts a capable general assistant into one that builds UI consistent with the rest of your app, which is why the docs emphasize giving the assistant owned source to read.
Editing owned source
The most important property of building UI with Claude Code is that the result is your source. The assistant edits files in your repository — components you own, read, version and modify — not a black box you cannot see into. When you need to change a component later, you edit the source; when you audit it, it is all there.
This is the difference between an assistant that generates disposable UI and one that helps you build a durable codebase. Owned source means the UI work compounds into an asset rather than accumulating as one-off generations, which is the whole point of using an assistant on production work delivered for agencies.
Server components for content
Content-first UI belongs in server components, and Claude Code should default there. A product page's heading, description, price and links render on the server, ship in the initial HTML, and stay crawlable, with no client JavaScript cost.
// app/product/page.tsx — server component
export default async function Page() {
const product = await getProduct('aesport')
return (
<article>
<h1>{product.name}</h1>
<p className="price">${product.price}</p>
<a href={`/cart/add/${product.slug}`}>Add to cart</a>
</article>
)
}
Keeping content in server components is what makes a Next.js page fast and indexable. When you ask Claude Code for a content component, the right answer is a server component, and steering it there is part of building production UI, exactly as the 3D websites architecture keeps meaning server-rendered.
Client components for interactivity
Interactivity — state, effects, event handlers, animation — belongs in client components, kept as small as possible. A variant selector, a menu, a form: each is a focused client island, not a reason to make the whole page client-side.
'use client'
import { useState } from 'react'
export function VariantPicker({ variants }) {
const [active, setActive] = useState(variants[0])
return <div role="radiogroup">{/* ...interactive controls... */}</div>
}
The discipline is to isolate interactivity in the smallest possible client component and leave everything around it server-rendered. Claude Code should reach for a client component only where interactivity genuinely lives, keeping the JavaScript footprint small — the same island principle that keeps 3D components from bloating a page.
Accessibility by default
Generated UI routinely forgets accessibility — missing labels, no keyboard support, no focus states, wrong roles. Building production UI with Claude Code means insisting on accessibility as a default, not a cleanup pass. Reuse accessible components, prompt for semantic HTML and ARIA where needed, and check that interactive elements are keyboard-operable with visible focus. The advantage of composing from a vetted component library is that accessibility is already inside the components, so the assistant delivers it without having to remember — the same reason a component approach beats generation for correctness on any interactive website.
Consistency through a component library
The quiet failure of AI-generated UI is inconsistency: each generation is a fresh guess, so buttons, cards and forms drift apart across the app. Composing from a shared component library eliminates the drift, because every piece of UI is assembled from the same vetted parts. A developer moving between two pages finds the same components; a new page inherits the same look and behavior. That consistency is nearly impossible to achieve with per-component generation, and it is the strongest argument for giving Claude Code a real library to build from rather than a blank canvas.
Using MCP for reusable UI
An MCP server is how Claude Code reaches a real component library through a protocol, listing the available components and returning their source to compose into your project. Instead of inventing a card or a form, the assistant requests the vetted one and wires it in. The components carry the server-and-client boundary, accessibility and styling by construction, so the assistant delivers production UI without reinventing those concerns each time. This is the version of AI UI building that produces maintainable, consistent, owned code — the assistant as a client of your library, described in depth on the MCP hub.
How AETumi builds Next.js UI with AI
AETumi is an AI-native 3D web platform for production Three.js and WebGL sites, React and Next.js components, and MCP workflows for assistants such as Claude Code. AETumi builds Next.js UI by composition: Claude Code reaches a vetted component library through MCP, edits owned source, respects the server-and-client boundary, and inherits accessibility and consistency from the components. Because the UI is componentized and served through an MCP workflow, a production Next.js interface can be assembled rather than generated from scratch, and the result is code the team owns.
Technical proof on GitHub
The AETumiApp/aetumi-3d-components and AETumiApp/aetumi-mcp repositories show the componentized UI and the MCP server that serves it, so you can see how Claude Code composes production UI from a real library. Use them for the implementation and this article for the workflow around them.
FAQ
How do I build Next.js UI with Claude Code? Give the assistant a real component library to compose from rather than a blank prompt, keep it on the right side of the server-and-client boundary, and have it edit your owned source. Composition produces consistent, maintainable UI; generation from scratch produces throwaway output.
How does Claude Code know when to use a server versus client component? Give it context — a CLAUDE.md and real source that establish your conventions — and steer content into server components and interactivity into small client islands. Server components for headings, copy and data; client components for state, effects and handlers.
Does Claude Code generate accessible UI? Not reliably from scratch — generation often forgets labels, keyboard support and focus states. Composing from a vetted component library that already carries accessibility is how you get accessible UI by default rather than as a cleanup pass.
How do I keep AI-built UI consistent across the app? Compose from a shared component library instead of generating each component fresh. Every piece assembled from the same vetted parts stays consistent, where per-component generation drifts apart. An MCP server is how the assistant reaches that library.
What is MCP's role in building Next.js UI? MCP lets Claude Code reach a real component library through a protocol and compose its vetted source into your project, so the UI carries the server-and-client boundary, accessibility and styling by construction rather than being reinvented each time.
Related resources
Continue with the MCP workflow, the docs, React Three Fiber, reusable 3D components, 3D websites, interactive websites, and options for agencies.
Conclusion
Building production Next.js UI with Claude Code is composition, not generation. Give the assistant a real component library, keep it on the right side of the server-and-client boundary, have it edit owned source, and let accessibility and consistency come from the components. Serve that library through MCP and Claude Code assembles maintainable, consistent UI you own — production interface, not throwaway markup.
More from the AETumi library
Real, production-ready assets — preview the motion, grab the source.

