What it is
21st MCP is an MCP server from 21st-dev that lets developers search for components through a coding agent in their editor and generate UI when AI access is enabled. It supports clients including Cursor, Claude Code, VS Code, Windsurf, and Codex. It replaces Magic MCP, whose old package remains available as a compatibility proxy.
Highlights:
- Search for React and Tailwind components, as well as themes and templates.
- Use hosted UI generation when AI access is enabled.
- Publish your own components from your editor.
How to use:
- First, obtain an API key at https://21st.dev/mcp.
- Then run `npx @21st-dev/cli@latest init --client cursor` and adjust the client parameter as needed. Alternatively, configure https://21st.dev/api/mcp manually and add the key to the `x-api-key` header.
- Finally, ask your coding agent in natural language to search for components or generate UI.
Who it's for:
Developers who want to find components or generate UI from their editor.
Before you start:
- You need an MCP-compatible client and a 21st API key; old Magic API keys were reset.
- The compatibility proxy forwards each MCP message to the 21st MCP server.
- Some code retrieval is paid, and hosted AI generation requires access. Check the official information for fees and payment details.
- The repository code uses the ISC license.
Based on the project's public documentation. Not tested by AI Inspiration World.
