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
Magic MCP → 21st MCP
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. This package remains published as a thin compatibility proxy so old configs keep working.
Install the 21st MCP (recommended)
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.
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.
What this package does now (v0.2.0+)
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 full current toolset.
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.
Old tool names → new tool names
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:
| Legacy Magic tool | 21st MCP tool |
|---|---|
21st_magic_component_builder | generate |
21st_magic_component_inspiration | get_inspiration |
21st_magic_component_refiner | generate (new generation from the refinement prompt) |
logo_search | search_logo (one query per call) |
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 full set.
Install as a plugin
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:
# Claude Code
claude plugin marketplace add 21st-dev/magic-mcp # then: /plugin install 21st
# Grok Build
grok plugin marketplace add 21st-dev/magic-mcp && grok plugin install 21st --trust
# Codex CLI
codex plugin marketplace add 21st-dev/magic-mcp # then install "21st" from /plugins
Set your API key in the API_KEY_21ST variable (free key at 21st.dev/mcp).
Store listings:
- Cursor / Grok Bot — install "21st" from the Cursor Marketplace, then set your
API_KEY_21STunder Plugins → Configure. Get a key at 21st.dev/mcp. - Grok Build —
grok plugin install 21st --trust(from the official xAI marketplace), then exportAPI_KEY_21ST. - Claude Code — the repo carries a
.claude-plugin/manifest:/plugin installit from any marketplace that lists this repo, or load locally withclaude --plugin-dir .and exportAPI_KEY_21ST.
The plugin config expects the API key in the API_KEY_21ST variable in every client.
Links
- 21st MCP setup & API keys: https://21st.dev/mcp
- 21st CLI on npm: https://www.npmjs.com/package/@21st-dev/cli
- 21st.dev — discover, publish, and generate UI components: https://21st.dev
FAQ
같은 카테고리 다른 리소스
Next.js
React 기반 풀스택 프레임워크. App Router와 서버 컴포넌트(RSC)가 사실상 표준이며, SSR·SSG·ISR을 한 프로젝트 안에서 다룬다.
shadcn/ui
복사·붙여넣기 방식의 React 컴포넌트 모음. npm 의존성이 아닌 코드 소유권 모델이라 커스터마이징이 자유롭다.
Supabase
PostgreSQL 기반 BaaS. Auth · Realtime · Storage · Edge Functions 통합.
Anthropic MCP
Claude가 외부 도구/데이터에 접근하도록 해주는 프로토콜 표준. 생태계의 근간.