Skip to content
Back to search

magic-mcp

It's like v0, but in your Cursor / Claude Code / Windsurf: search 10,000+ React/Tailwind components, generate new UI with AI, and publish your own — right from your editor. Magic MCP is now the 21st MCP; this package keeps old configs working. Setup: 21st.dev/mcp

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/21st-dev--magic-mcp/badge.svg)](/listings/21st-dev--magic-mcp)

HTML

<a href="/listings/21st-dev--magic-mcp"><img src="/api/listings/21st-dev--magic-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx @21st-dev/cli@latest init --client cursor   # or: claude | vscode | windsurf | codex

Or add it manually — it is a plain HTTP MCP server:

{
  "mcpServers": {
    "21st": {
      "url": "https://21st.dev/api/mcp",
      "headers": { "x-api-key": "YOUR_21ST_API_KEY" }
    }
  }
}

Get an API key at [21st.dev/mcp](https://21st.dev/mcp).

> **Old Magic API keys were reset.** Keys issued by the old Magic console no longer work anywhere. Generate a fresh key at [21st.dev/mcp](https://21st.dev/mcp).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 18 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "21st-dev",
  3. "description": "Official 21st.dev plugins: the 21st MCP (component search, install, AI UI generation) and UI skills.",
  4. "owner": {
  5. "name": "21st.dev",
  6. "email": "sergey@21st.dev"
  7. },
  8. "plugins": [
  9. {
  10. "name": "21st",
  11. "source": "./",
  12. "description": "Find UI components and themes, retrieve their code, and use hosted 21st AI when enabled.",
  13. "category": "design",
  14. "homepage": "https://21st.dev/mcp",
  15. "keywords": ["21st", "21st.dev", "magic-mcp", "ui-components", "react", "tailwind"]
  16. }
  17. ]
  18. }
README.md · README · 100 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Magic MCP → 21st MCP
  2. > **Magic MCP is now the 21st MCP.** The Magic MCP server (`@21st-dev/magic`) has been replaced by the unified **21st MCP**, installed via the **21st CLI** — setup at [21st.dev/mcp](https://21st.dev/mcp). This package remains published as a thin compatibility proxy so old configs keep working.
  3. ## Install the 21st MCP (recommended)
  4. ```bash
  5. npx @21st-dev/cli@latest init --client cursor # or: claude | vscode | windsurf | codex
  6. ```
  7. Or add it manually — it is a plain HTTP MCP server:
  8. ```json
  9. {
  10. "mcpServers": {
  11. "21st": {
  12. "url": "https://21st.dev/api/mcp",
  13. "headers": { "x-api-key": "YOUR_21ST_API_KEY" }
  14. }
  15. }
  16. }
  17. ```
  18. Get an API key at [21st.dev/mcp](https://21st.dev/mcp).
  19. > **Old Magic API keys were reset.** Keys issued by the old Magic console no longer work anywhere. Generate a fresh key at [21st.dev/mcp](https://21st.dev/mcp).
  20. ## What this package does now (v0.2.0+)
  21. `npx -y @21st-dev/magic@latest API_KEY="..."` still works: since v0.2.0 it is a small stdio proxy that forwards every MCP message to the 21st MCP server. Existing `mcp.json` entries that reference `@21st-dev/magic` keep functioning — but they now speak to the same server as the 21st CLI, with the tools available to the authenticated account.
  22. The API key is accepted in all the historical forms: positional `API_KEY="..."`, `--API_KEY=...`, `/API_KEY:...`, `-API_KEY ...`, or the `TWENTY_FIRST_API_KEY` / `API_KEY_21ST` environment variables.
  23. ## AI access
  24. Builder component access does not enable hosted 21st AI. The server lists
  25. `generate` and `iterate_generation` only when AI access is enabled. Check
  26. `get_usage.aiGenerationEnabled`; this reports access, not the remaining AI
  27. credit balance. With AI off, use `search` and `get_component`, then adapt the
  28. code with your own coding agent. Existing drafts remain readable.
  29. A cached or legacy generation call can return `ai_subscription_required`. Do
  30. not retry until AI is enabled. Refresh the client tool list or reconnect after
  31. enabling AI. The proxy forwards discovery to the server, so existing proxy
  32. versions receive this behavior without an npm update.
  33. `server.json` mirrors the official `dev.21st/mcp` registry listing. The registry
  34. version is independent of this compatibility package version.
  35. ## Old tool names → new tool names
  36. The 21st MCP still accepts the legacy Magic tool names and translates them, so agents that remember the old names keep working. Prefer the new names:
  37. | Legacy Magic tool | 21st MCP tool |
  38. | --- | --- |
  39. | `21st_magic_component_builder` | `generate` |
  40. | `21st_magic_component_inspiration` | `get_inspiration` |
  41. | `21st_magic_component_refiner` | `generate` (new generation from the refinement prompt) |
  42. | `logo_search` | `search_logo` (one query per call) |
  43. The current server exposes much more than the old four tools: catalog search across components/themes/templates, paid code retrieval, bookmarks, team libraries, UI generation with variants, profile management, and more. Connect and call `tools/list` to see the tools available to your account.
  44. ## Install as a plugin
  45. This repository is also packaged as an agent plugin (MCP server + a UI skill). You don't need to wait for any store — this repo IS a marketplace, add it directly:
  46. ```bash
  47. # Claude Code
  48. claude plugin marketplace add 21st-dev/magic-mcp # then: /plugin install 21st
  49. # Grok Build
  50. grok plugin marketplace add 21st-dev/magic-mcp && grok plugin install 21st --trust
  51. # Codex CLI
  52. codex plugin marketplace add 21st-dev/magic-mcp # then install "21st" from /plugins
  53. ```
  54. Set your API key in the `API_KEY_21ST` variable (free key at [21st.dev/mcp](https://21st.dev/mcp)).
  55. Store listings:
  56. - **Cursor / Grok Bot** — install "21st" from the [Cursor Marketplace](https://cursor.com/marketplace), then set your `API_KEY_21ST` under **Plugins → Configure**. Get a key at [21st.dev/mcp](https://21st.dev/mcp).
  57. - **Grok Build** — `grok plugin install 21st --trust` (from the official [xAI marketplace](https://github.com/xai-org/plugin-marketplace)), then export `API_KEY_21ST`.
  58. - **Claude Code** — the repo carries a `.claude-plugin/` manifest: `/plugin install` it from any marketplace that lists this repo, or load locally with `claude --plugin-dir .` and export `API_KEY_21ST`.
  59. The plugin config expects the API key in the `API_KEY_21ST` variable in every client.
  60. ## Links
  61. - 21st MCP setup & API keys: https://21st.dev/mcp
  62. - 21st CLI on npm: https://www.npmjs.com/package/@21st-dev/cli
  63. - 21st.dev — discover, publish, and generate UI components: https://21st.dev
  64. ## FAQ
  65. **Why did my old Magic MCP stop working?**
  66. The Magic backend (`magic.21st.dev`) was superseded by the unified 21st MCP, and all old API keys were reset for security. Update to a fresh key from [21st.dev/mcp](https://21st.dev/mcp) — your existing `@21st-dev/magic` config will then work again through this compatibility proxy, though we recommend switching to `npx @21st-dev/cli@latest init`.
  67. **Is `/ui` still a thing?**
  68. Use natural language: ask your agent to search 21st for components (`search`), or use hosted UI generation (`generate`) when AI is enabled. The old `/ui`, `/21` trigger phrases were a convention of the legacy tools' descriptions, not the protocol.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.