It's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
Magic Component Platform (MCP) is a powerful AI-driven tool that helps developers create beautiful, modern UI components instantly through natural language descriptions. It integrates seamlessly with popular IDEs and provides a streamlined workflow for UI development.
Tell Agent What You Need
/ui
and describe the component you're looking for/ui create a modern navigation bar with responsive design
Let Magic Create It
Seamless Integration
Generate API Key
IDE Setup
npx -y @smithery/cli@latest run @21st-dev/magic-mcp --config "{\"TWENTY_FIRST_API_KEY\":\"your-api-key\"}"
Add to ~/.codeium/windsurf/mcp_config.json
:
{
"mcpServers": {
"magic": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"install",
"@21st-dev/magic-mcp",
"--client",
"windsurf"
],
"env": {
"TWENTY_FIRST_API_KEY": "your-api-key"
}
}
}
}
Add to Cline's MCP configuration:
{
"mcpServers": {
"magic": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"install",
"@21st-dev/magic-mcp",
"--client",
"cline"
],
"env": {
"TWENTY_FIRST_API_KEY": "your-api-key"
}
}
}
}
Magic AI Agent only writes or modifies files related to the components it generates. It follows your project's code style and structure, and integrates seamlessly with your existing codebase without affecting other parts of your application.
Yes! All generated components are fully editable and come with well-structured code. You can modify the styling, functionality, and behavior just like any other React component in your codebase.
If you exceed your monthly generation limit, you'll be prompted to upgrade your plan. You can upgrade at any time to continue generating components. Your existing components will remain fully functional.
Authors can publish components to 21st.dev at any time, and Magic Agent will have immediate access to them. This means you'll always have access to the latest components and design patterns from the community.
Magic AI Agent can handle components of varying complexity, from simple buttons to complex interactive forms. However, for best results, we recommend breaking down very complex UIs into smaller, manageable components.
mcp/
├── app/
│ └── components/ # Core UI components
├── types/ # TypeScript type definitions
├── lib/ # Utility functions
└── public/ # Static assets
IdeInstructions
: Setup instructions for different IDEsApiKeySection
: API key management interfaceWelcomeOnboarding
: Onboarding flow for new usersWe welcome contributions! Please join our Discord community and provide feedback to help improve Magic Agent. The source code is available on GitHub.
Magic Agent is currently in beta. All features are free during this period. We appreciate your feedback and patience as we continue to improve the platform.
MIT License
For more information, join our Discord community or visit 21st.dev/magic.