PlugWiki

21st MCP server (formerly 21st.dev Magic MCP)

Official · by 21st.devRemote
Gethttps://21st.dev/api/mcpDocs

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.

Install 21st.dev MCP

Claude Code

  1. 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. 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 · search

  • Shows 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_picker

  • Gets 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_component

  • Gets 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_theme

  • Finds 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_logo

  • Starts 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 · generate

  • Lists 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_generation

  • Gets 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_take

  • Refines 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_generation

  • Makes 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_take

  • Reads 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_notes

  • Marks 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_note

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 to21st.dev
Sign-in and keysAn 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.

ServerOfficialRunsSign-inCan change thingsGitHub stars
For 21st.dev Magic
21st MCPThis pageOfficialHostedAPI keyYes–
Other tools for the same job
shadcn-ui-mcp-serverCommunityLocal––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

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

    Source
  • Draft 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 9
  1. MCP · help.21st.dev
  2. 21st MCP · 21st.dev
  3. Editor & MCP setup · help.21st.dev
  4. Magic MCP → 21st MCP · github.com
  5. Pricing & Credits · help.21st.dev
  6. Claude Code plugin: .mcp.json has url but no type · github.com
  7. Component keyword search fails with catalog search failed · github.com
  8. Magic MCP is now the 21st MCP · github.com
  9. shadcn-ui-mcp-server · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.