shadcn's new MCP server fixes hallucinated components. Not your theme

By The WAALEE Team · · 4 min read

shadcn's new MCP server fixes hallucinated components. Not your theme

shadcn/ui shipped cli v4 in March 2026, and the headline feature is an MCP server that lets Claude, Cursor, and Windsurf query the real component registry instead of generating shadcn-flavored code from memory. It's a genuine fix for a genuine problem. It's also not the problem most people mean when they say their AI build looks generic, and the preset system that shipped alongside it can make that second problem worse before it makes it better.

What the MCP server actually fixes

Before the MCP server, an agent asked for a shadcn `DataTable` or `Combobox` was working from training data, which meant plausible-looking code that sometimes referenced props that don't exist, or a component API from an older version of the library. The MCP server closes that gap directly: an agent can list what's actually in your registry, pull the current source for a component, and run the install command itself, so the code it writes matches what's really there. One integration guide frames the win correctly: fewer hallucinated props, fewer broken imports, less time spent debugging code that looked right and wasn't. That's a real, narrow improvement, and it's worth having.

Presets solve a different problem, and it's not yours

cli v4 also introduced presets: a way to bundle an entire look (colors, radius, fonts, theme) into a shareable code, built and previewed at shadcn/create, then applied with `init --preset` or swapped later on an existing project. It's a smart answer to "stop shipping the unedited default theme," and if you're picking between ten strangers' presets instead of one default palette, that is technically more variety. It is not your brand. A preset is still somebody else's design decision, just one of several instead of the only one. Run the same preset code twice, on two different projects, and you get the same look twice.

The line that matters: "MCP-generated code may fight your overrides"

Here's the part worth reading twice. The same integration guide has a pitfall section, and it says plainly: if you've heavily customized your shadcn theme, MCP-generated code may fight your overrides, and the fix offered is to spell out your customizations in the prompt every time. That's an honest admission that the MCP server has no model of your actual design decisions. It knows the component API. It doesn't know that your `--radius` is 2px because your brand is sharp-cornered, or that your accent color was chosen for a reason, so it keeps generating against the shadcn default unless you re-explain your theme in every prompt.

  • The MCP server fixes component correctness: real props, real imports, real install commands.
  • Presets fix theme laziness: nobody has to accept the unedited default anymore.
  • Neither one carries your actual brand decisions from one prompt, or one project, to the next.
  • Without that, an agent still needs to be told your colors, type, spacing, and radius every single time, in every single prompt.

Give the agent your theme once, in a form it keeps

The fix isn't a bigger prompt repeated forever, it's a token file the agent reads instead of being told. Extract your real colors, type scale, spacing, and radius, either off your own live site or off a reference whose look you're building toward, and drop them into `globals.css` as the values shadcn's theme layer expects. Now the MCP server's component code and your theme aren't fighting: the components come from the registry, correct and current, and the values they render with are actually yours, not a preset code you picked off a gallery.

Three pieces of the same stack, each solving a different slice of the problem:

  • shadcn/cli v4 + MCP server: Fixes component hallucination: agents query the real registry instead of guessing from training data. Doesn't know or manage your theme values.
  • shadcn presets (shadcn/create): Bundles a shareable look (color, radius, font) so you're not stuck on the bare default. Still someone else's preset until you swap in your own values.
  • WAALEE: Paste your own live URL or a reference site and get the actual colors, type scale, spacing, and radius as W3C tokens, ready to drop into shadcn's theme layer instead of a stranger's preset code.

None of this is a knock on cli v4, it's a real step forward and worth updating for. But it's worth being precise about which step it took. It made agents better at writing shadcn's components. It didn't make them better at knowing what your brand looks like, and that's still the part you have to bring yourself, once, in a form that sticks.

Latest from the blog