21st MCP server (formerly 21st.dev Magic MCP)
Lets your coding assistant search 21st.dev's UI component library, add components to your project and draft new UI with 21st AI.
This is 21st.dev's own server, the new name for Magic MCP, for developers who build React and Tailwind interfaces in Cursor, Claude Code, VS Code or Codex. It lets your assistant search the 21st.dev component library, copy a component's code into your project, and draft new UI with 21st AI. Searching is free, but a free account can copy only two components a day and cannot generate UI. You need a 21st API key, and keys from the old Magic console no longer work.
Good for
- React and Tailwind developers who want ready-made components instead of hand-written UI
- Developers building landing pages, pricing tables and dashboards inside Cursor or Claude Code
- Builder or Team subscribers who want to generate UI drafts with 21st AI from their editor
- Component authors who publish to 21st.dev and want to manage their items from the assistant
- Past Magic MCP users moving to the current setup
Works in
5 supported · 1 with issues · 8 should work
Tap an app to see how to set it up and any known problems.
21st says Claude Desktop signs in with your 21st account, so you do not need an API key. 21st.dev
21st's docs cover it: its setup command writes the Cursor config with your API key, or install 21st from the Cursor Marketplace. help.21st.dev
21st's docs cover it: VS Code asks for your API key once and stores it securely. help.21st.dev
21st's setup command writes the Devin Desktop config; the older Windsurf Cascade agent uses its own config file. help.21st.dev
21st's docs cover it: add the server to your Codex config and set your key as an environment variable, or use the Codex plugin. help.21st.dev
21st documents a Claude Code plugin and a config written by its setup command; both use your API key.
Known problems
- Open
Plugin from the old Magic repo loads the skill but the 21st server never appears
Workaround: Install from the 21st-dev/claude-code-plugin marketplace instead, which declares the server type.
Since Sep 2026 · GitHub
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Install 21st.dev MCP
Claude Code
- 1
Copy this prompt.
Add the 21st.dev MCP server to Claude Code. Run this command: npx @21st-dev/cli@latest init --client claude --write Ask me for API_KEY_21ST and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires A 21st API key from 21st.dev/settings/api-keys, Node.js 18+.
Set API_KEY_21ST in your environment to your 21st API key before you start the app. Free accounts can search freely but copy only two components a day; generating UI needs a paid plan with AI turned on. Use 21st's claude-code-plugin marketplace; the plugin in the old Magic repo does not load the server.
From the vendor's docs. Source.
Tools
Finds components, themes and templates in the 21st.dev library
Searches the 21st.dev library for components, themes and templates that match what you describe, with filters. Free on every plan.
Try: “Find a pricing table with a monthly and yearly toggle on 21st”
Network ·
searchShows search results as a visual picker you can choose from
Runs the same library search but shows the results as a picker inside apps that support it, so you can choose one by eye.
Try: “Show me hero sections from 21st so I can pick one”
Network ·
search_pickerGets a component's code and demo so it can be added to your project
Fetches a component's source code and demo. Free accounts get two of these a day; paid plans have no limit.
Try: “Add the efferd pricing component from 21st to my pricing page”
Network ·
get_componentGets a theme's CSS
Fetches the CSS for a theme from the library. Free and not counted against any limit.
Try: “Get a dark theme from 21st and apply it to my app”
Network ·
get_themeFinds brand and UI logos as SVG files
Finds brand and interface logos by name and returns links to their SVG files.
Try: “Find the Stripe logo as an SVG”
Network ·
search_logoStarts a new UI draft with 21st AI from your description
Starts a sketch or code generation with 21st AI from a prompt. Only shown when AI is turned on for your account, and it uses paid credits.
Try: “Generate three variants of a signup form with 21st AI”
Write ·
generateLists the drafts from a 21st AI generation
Lists the drafts a 21st AI generation produced and whether each one is ready. Free.
Try: “Show me the drafts from my last 21st generation”
Network ·
get_generationGets the code and details of a saved draft version
Fetches one exact saved version of a draft, including its code, prompt and structure, so it can go into your project. Free.
Try: “Pull version 3 of my second pricing draft into the project”
Network ·
get_takeRefines one of your 21st AI drafts
Refines an existing draft based on your feedback. Only shown when AI is turned on, and it uses paid credits.
Try: “Make the second draft more compact and use our brand colors”
Write ·
iterate_generationMakes exact edits to a saved draft, such as moving or copying a part
Applies precise edits to a saved sketch draft, such as duplicating or moving a section, and saves it as a new version. Free.
Try: “Duplicate the feature card in my draft and move it into the main section”
Write ·
edit_takeReads the notes you left on a draft in the 21st editor
Reads the notes you sent from the 21st web editor for a draft, so the assistant knows what to change. Free.
Try: “What notes did I leave on my latest 21st draft?”
Network ·
get_notesMarks your editor notes as in progress, done or won't do
Reports progress on notes you left in the 21st editor by marking them in progress, done or won't do. Free.
Try: “Mark my header note as done”
Write ·
update_noteShows edits made to a draft since you last pulled it
Reads the edits saved to a draft since a given version or since you last pulled it, with a plan for applying them. Free.
Try: “What changed in my draft since I last pulled it?”
Network ·
get_changesLists components you bookmarked
Lists the components and other items you saved as bookmarks on 21st.dev.
Try: “Show my 21st bookmarks”
Network ·
list_bookmarksBookmarks a component or other item
Saves a component, theme or template to your 21st.dev bookmarks.
Try: “Bookmark this testimonial component”
Write ·
bookmarkCreates a new list for your bookmarks
Creates a named list to group your 21st.dev bookmarks.
Try: “Create a bookmark list called Landing page ideas”
Write ·
create_bookmark_listAdds a bookmarked item to one of your lists
Adds a component or other item to one of your bookmark lists.
Try: “Add this hero section to my Landing page ideas list”
Write ·
add_to_listLists the 21st teams you belong to
Lists the 21st.dev teams your account is a member of.
Try: “Which 21st teams am I in?”
Network ·
list_teamsLists a team's component libraries
Lists the component libraries a team has on 21st.dev.
Try: “Show the libraries for my design team”
Network ·
list_team_librariesLists the components in a team library
Lists the components inside one of your team's libraries.
Try: “List the components in our team's marketing library”
Network ·
list_team_componentsEdits details of a component you published
Changes the details of a component you published on 21st.dev. Needs your API key.
Try: “Update the description of my navbar component”
Write ·
edit_componentDeletes a component you published
Removes a component you published from 21st.dev. Needs your API key.
Try: “Delete my old button component from 21st”
Delete ·
delete_componentEdits a theme you published
Changes a theme you published on 21st.dev. Needs your API key.
Try: “Rename my published theme to Ocean”
Write ·
edit_themeDeletes a theme you published
Removes a theme you published from 21st.dev. Needs your API key.
Try: “Delete my draft theme from 21st”
Delete ·
delete_themeEdits a template you published
Changes a template you published on 21st.dev. Needs your API key.
Try: “Update the tags on my dashboard template”
Write ·
edit_templateDeletes a template you published
Removes a template you published from 21st.dev. Needs your API key.
Try: “Delete my old landing page template”
Delete ·
delete_templateReads your 21st.dev profile
Reads your 21st.dev profile board.
Try: “Show my 21st profile”
Network ·
get_profileChanges your 21st.dev profile
Replaces or clears your 21st.dev profile board.
Try: “Update my 21st profile bio”
Write ·
edit_profileUploads an image or video to your profile
Uploads media for your 21st.dev profile board.
Try: “Upload this screenshot to my 21st profile”
Write ·
upload_profile_mediaSends your feedback on a draft to 21st
Forwards feedback you asked to send about a draft to 21st, with the draft's context. It must not include your code or secrets.
Try: “Tell 21st the generated form ignored my color tokens”
Write ·
send_feedbackUsed by the assistant behind the scenes
Reports whether a draft was used, adapted or dropped
Records what happened after a draft was taken into your project, such as landed, adapted or abandoned, with the build result.
Write ·
record_take_outcomeChecks on a running draft refinement
Lets the assistant check the status of a refinement it started until the new version is ready. Free.
Network ·
get_generation_jobShows your plan, AI access, free copies left and AI credits
Shows your account tier, whether AI is on, how many free component copies you have left today and your AI credit balance.
Try: “How many 21st AI credits do I have left?”
Network ·
get_usage
From the official docs
Pros and cons
Good
- Made and run by 21st.dev, with nothing to install beyond one setup command.
- Searching the library is free on every plan.
- Pulls real components from a library of more than 12,000, so your assistant starts from existing code instead of writing it from scratch.
- One setup command writes the config for Cursor, Claude Code, VS Code, Codex or Devin Desktop.
- Old Magic MCP configs keep working through a proxy package.
- Plugins for Claude Code and Codex add the server and 21st's skills in one step.
Watch out
- A free account can copy only two components a day and cannot generate UI.
- Generating UI needs a paid plan with AI turned on, from $15 a month billed yearly.
- There is no read-only mode, and it can edit or delete items you published.
- Keys from the old Magic console were reset, so old setups need a new key.
- The plugin from the old Magic repo does not load the server in Claude Code.
Permissions
medium risk · 4 things to watch
Medium risk
With your key, the assistant can edit or delete components, themes and templates you published, and it can spend paid AI credits. Keep your key out of shared config files and approve edit, delete and generate calls yourself.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It can delete your published components
With your key it can edit or delete components, themes and templates you published, and change your profile. Approve those calls one by one. help.21st.dev
It can spend your AI credits
On a plan with AI turned on, each generate or refine call uses paid credits. Check your balance with the usage tool before long sessions. help.21st.dev
Your API key sits in a config file
Most setups keep the key in a config file or environment variable. Keep that file out of git, or use VS Code, which stores the key securely. help.21st.dev
Old Magic keys no longer work
Keys from the retired Magic console were reset. Make a new key at 21st.dev/mcp. github.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Talks to | 21st.dev |
|---|---|
| Sign-in and keys | An API key sent with each request, kept in your client's config file or an environment variable; VS Code stores it securely, and Claude Desktop signs in with your 21st account instead. |
Alternatives
Use the 21st MCP for any new setup; old Magic MCP configs keep working because that package now forwards to this server. Pick the shadcn/ui server if you want free, local access to shadcn components without a 21st account.
| Server | Official | Runs | Sign-in | Can change things | GitHub stars |
|---|---|---|---|---|---|
| For 21st.dev Magic | |||||
| 21st MCPThis page | Official | Hosted | API key | Yes | – |
| Other tools for the same job | |||||
| shadcn-ui-mcp-server | Community | Local | – | – | 3.1K |
What people say
People like that search is free, and dislike the Magic key reset, the paid plan needed to generate UI and a recent search outage.
What people like
- Searching the library is free, and a free key covers browsing and two component copies a day.
Common complaints
- Keys from the old Magic console were reset, so existing setups stopped working until users made a new key.
- Component search broke for a few days in October 2026 for MCP and CLI users before 21st fixed it.
- Generating UI needs a paid plan with AI turned on and credits.
In their words
“Component keyword search is failing through the hosted 21st MCP endpoint. Authentication, theme/template search, bookmarks, and retrieval of known component IDs still work.”irahmoraes5-droidGitHub issueOct 2026
“Fixed! Component search should work again now. Please try again.”serafimcloudGitHub issue
“TL;DR: Magic MCP was renamed and unified into the 21st MCP. Same product, new home.”serafimcloud
Questions
Is the 21st MCP free?
Partly. Search is free on every plan, and a free account can copy two components a day but cannot generate UI. Builder costs $8 a month billed quarterly or $6 billed yearly for unlimited copies, and 21st AI adds credits from $15 a month billed yearly.
Is this the same as Magic MCP?
Yes. Magic MCP was renamed the 21st MCP. Old configs that use the Magic package still work because it forwards every call to the same server.
Why did my Magic MCP stop working?
21st reset every key from the old Magic console. Make a new key at 21st.dev/mcp and your old config works again, though 21st recommends switching to its setup command.
What is the 21st MCP server URL?
https://21st.dev/api/mcp. Most clients send your API key with it in an x-api-key header.
Do I need an API key?
Yes, for most clients. Get one at 21st.dev/settings/api-keys. Claude Desktop and Lovable sign in with your 21st account instead.
Why can't my assistant generate components?
Generating needs Builder or Team with AI turned on and credits left. Until then the generate tools stay hidden, so turn AI on, then reconnect the server or refresh its tool list.
Can it delete my components?
Yes. With your key it can edit or delete components, themes and templates you published. Approve those calls yourself.
Do I still type /ui?
No. Ask in plain words, such as "find a pricing table on 21st". The /ui and /21 phrases came from the old Magic tools.
How do I add it to Claude Code?
Use the Claude Code steps in the install box above. If you use a plugin, install it from 21st's claude-code-plugin marketplace; the one in the old Magic repo does not load the server.
Examples
Add a pricing table from the library to a page, then check the build.
add a pricing table with a monthly/yearly toggle from 21st
SourceDraft several versions of a component with 21st AI (needs AI credits).
Generate three variants of a pricing table with 21st AI
Find a brand logo as an SVG file.
Find the GitHub logo SVG on 21st
Apply a theme from the library to your project.
Find a dark theme on 21st and apply its CSS to my app
Information
updated Nov 2, 2026
- Publisher
- 21st.dev (official)
- Endpoint
https://21st.dev/api/mcp- Transport
- Streamable HTTP
- Auth
- API key
- Version
- 1.0.1
- Listed in
- Official MCP registry
WebsiteDocsOfficial MCP RegistryEditor and MCP setupPricing and creditsPrivacy
Other 21st.dev Magic MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 9Hide
- MCP · help.21st.dev
- 21st MCP · 21st.dev
- Editor & MCP setup · help.21st.dev
- Magic MCP → 21st MCP · github.com
- Pricing & Credits · help.21st.dev
- Claude Code plugin: .mcp.json has url but no type · github.com
- Component keyword search fails with catalog search failed · github.com
- Magic MCP is now the 21st MCP · github.com
- shadcn-ui-mcp-server · github.com