21st.dev Magic MCP Server
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
Install
npx -y @21st-dev/magic@latest API_KEY="..."Example config (Cursor / Claude Desktop)
{
"mcpServers": {
"magic": {
"command": "npx",
"args": [
"-y",
"@21st-dev/magic@latest",
"API_KEY=\"...\""
],
"env": {
"TWENTY_FIRST_API_KEY": "<your-value>"
}
}
}
}The same mcpServers block works in Cursor, Claude Desktop and Devin Desktop. VS Code (Copilot) uses a "type" field, Claude Code is easiest with claude mcp add, and Codex uses TOML: see the setup guide for your app. On Windows, wrap npx with cmd /c (fix).
At a glance
| Repository | 21st-dev/magic-mcp |
| GitHub stars | 6,700 |
| Last commit | 2026-09-09 (82 days ago) |
| Status | maintained |
| Security advisories | No published advisories found as of 2026-11-30. Details |
| Clients mentioned in README | Claude Code, Cursor, VS Code, Windsurf, Codex |
| Auth | API key/token · TWENTY_FIRST_API_KEY |
| Language / License | TypeScript / ISC |
Security advisories
No published advisories found as of 2026-11-30.
Checked 2026-11-30 in the repo's GitHub security advisories and OSV.dev for @21st-dev/magic (npm). No advisory doesn't prove a server is safe. How to stay updated.