21st MCP (formerly Magic MCP)
Generate and search UI components from 21st.dev inside your coding agent.
Overview
21st MCP, formerly published as Magic MCP, connects coding agents to 21st.dev for searching and generating React UI components and patterns. The project now recommends a hosted endpoint or the 21st CLI, while the original @21st-dev/magic package acts as a compatibility proxy. An API key from 21st.dev is required.
Capabilities
- UI component search
- Component generation
- Logo search
- Pattern lookup
Connection profile
- Transports
- Streamable HTTP, stdio
- Authentication
- 21st API key
- License
- ISC
- Vendor
- 21st.dev (community)
- Repository
- github.com/21st-dev/magic-mcp
Client format support is reviewed against official client documentation. It is not a claim that this specific server was tested with every client.
Configuration starting point
A documented preset is available for this server. It contains placeholders, not real credentials. Generate a client-correct file or review the raw values below.
npx -y @21st-dev/magic@latest
Security notes
- Component prompts leave your machine; avoid pasting proprietary business logic into UI generation prompts.
- Review generated components and dependencies before adding them to production code.
The catalog records source evidence, not a security audit. Review the server's permissions, recent releases, and the data it can access before connecting it to a real account.
Sources & evidence
- github.com/21st-dev/magic-mcpRepository · checked Nov 27, 2026 · documented
The 21st-dev/magic-mcp repository documents the transition to 21st MCP, the hosted endpoint, and compatibility proxy; about 6.7k stars and active on the check date.