generateLABSCO SUMMARY
Generating from a curated library beats generating from nothing, and that is the real difference here.
A model asked to write a component from scratch produces something plausible and inconsistent with everything around it. Drawing from a maintained set of pieces means the output shares conventions with itself, which is most of what "looks designed" means. The preview matters more than it sounds: UI is the one thing you cannot evaluate by reading the diff.
What it is
A component generator wired into the editor: you describe what you want in words and it produces a modern, typed component, drawing on a library of pre-built pieces rather than inventing from scratch.
What you get
- Components generated from a natural-language description
- A library of pre-built, customisable components to draw from
- Real-time preview as the component takes shape
- TypeScript throughout
- A collection of brand assets and logos available alongside
Requirements
A 21st API key from 21st.dev/mcp; keys from the old Magic console were reset and no longer work. The 21st CLI sets it up for Cursor, Claude, VS Code, Windsurf and Codex; added by hand, the key goes in the x-api-key header, and the older @21st-dev/magic package still takes it on the launch line. MIT licensed.
Setup effort
One command plus a key — npx @21st-dev/cli@latest init --client cursor, then supply credentials
USE CASES
Building a component by describing it
Words to typed component, in the editor.
Keeping the look consistent
Generated from a curated library rather than from scratch.
Seeing it before committing
Real-time preview.
4 tools
Listed in project docs. Your client may show a different list.
get_inspirationsearch_logosearchBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
INSTALLATION
Connect your client
Server setup
npx
npx @21st-dev/cli@latest init --client cursor # or: claude | vscode | windsurf | codexHosted endpoint
https://21st.dev/api/mcpAdd this hosted endpoint to your MCP client using the credentials listed under Requirements.
MCP Clients
Cursor
npx @21st-dev/cli@latest init --client cursorAny MCP client — HTTP
{
"mcpServers": {
"21st": {
"url": "https://21st.dev/api/mcp",
"headers": {
"x-api-key": "<YOUR_API_KEY>"
}
}
}
}