21st.dev Agent Magique Ai
C'est comme la version 0 mais dans votre Cursor/WindSurf/Cline. Serveur Magic MCP de développement 21 pour travailler avec votre frontend comme Magic.
Aperçu
Qu'est-ce que Magic MCP ?
Magic MCP est un serveur innovant développé par 21st-dev qui améliore la fonctionnalité des applications frontend. Il offre une expérience d'intégration fluide pour les développeurs travaillant avec divers frameworks frontend comme Cursor, WindSurf et Cline. Cet outil permet aux développeurs d'interagir avec leurs projets frontend d'une manière qui semble magique, d'où le nom "Magic MCP".
Fonctionnalités de Magic MCP
- Intégration fluide : Magic MCP s'intègre sans effort avec des frameworks frontend populaires, facilitant ainsi l'amélioration des projets des développeurs sans configuration extensive.
- Interface conviviale : Le serveur est conçu avec un accent sur l'utilisabilité, garantissant que les développeurs peuvent naviguer et utiliser ses fonctionnalités facilement.
- Collaboration en temps réel : Magic MCP prend en charge la collaboration en temps réel, permettant à plusieurs développeurs de travailler sur le même projet simultanément sans conflits.
- Documentation exhaustive : Une documentation complète est disponible pour aider les développeurs à démarrer rapidement et à tirer le meilleur parti des capacités du serveur.
- Support communautaire actif : Avec une communauté d'utilisateurs en pleine croissance, les développeurs peuvent trouver du soutien et partager des expériences, améliorant ainsi le processus de développement global.
Comment utiliser Magic MCP
- Installation : Commencez par installer Magic MCP sur votre machine locale ou votre serveur. Suivez les instructions d'installation fournies dans la documentation.
- Configuration : Configurez les paramètres du serveur pour correspondre aux exigences de votre projet. Cela inclut la configuration des variables d'environnement et des dépendances nécessaires.
- Intégration : Intégrez Magic MCP avec votre framework frontend en suivant les directives spécifiques à votre technologie choisie.
- Développement : Commencez à développer votre application frontend en utilisant les fonctionnalités fournies par Magic MCP. Utilisez les outils de collaboration en temps réel pour travailler efficacement avec votre équipe.
- Déploiement : Une fois votre application prête, déployez-la en utilisant les outils de déploiement intégrés ou votre méthode de déploiement préférée.
Questions Fréquemment Posées
Q : Quels frameworks Magic MCP prend-il en charge ?
R : Magic MCP prend en charge divers frameworks frontend, y compris Cursor, WindSurf et Cline, permettant aux développeurs de choisir celui qui convient le mieux à leurs projets.
Q : Magic MCP est-il gratuit à utiliser ?
R : Oui, Magic MCP est un projet open-source, et il est gratuit à utiliser pour des projets personnels et commerciaux.
Q : Comment puis-je contribuer à Magic MCP ?
R : Les contributions sont les bienvenues ! Vous pouvez contribuer en signalant des problèmes, en suggérant des fonctionnalités ou en soumettant des demandes de tirage sur le dépôt GitHub du projet.
Q : Où puis-je trouver la documentation pour Magic MCP ?
R : La documentation est disponible sur le site officiel 21st.dev/magic, où vous pouvez trouver des guides et des tutoriels détaillés.
Q : Existe-t-il une communauté pour les utilisateurs de Magic MCP ?
R : Oui, il existe une communauté active d'utilisateurs de Magic MCP où vous pouvez poser des questions, partager vos expériences et collaborer avec d'autres développeurs.
Détail
21st.dev Magic AI Agent
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.
🌟 Features
- AI-Powered UI Generation: Create UI components by describing them in natural language
- Multi-IDE Support:
- Cursor IDE integration
- Windsurf support
- VSCode support
- VSCode + Cline integration (Beta)
- Modern Component Library: Access to a vast collection of pre-built, customizable components inspired by 21st.dev
- Real-time Preview: Instantly see your components as you create them
- TypeScript Support: Full TypeScript support for type-safe development
- SVGL Integration: Access to a vast collection of professional brand assets and logos
- Component Enhancement: Improve existing components with advanced features and animations (Coming Soon)
🎯 How It Works
-
Tell Agent What You Need
- In your AI Agent's chat, just type
/ui
and describe the component you're looking for - Example:
/ui create a modern navigation bar with responsive design
- In your AI Agent's chat, just type
-
Let Magic Create It
- Your IDE prompts you to use Magic
- Magic instantly builds a polished UI component
- Components are inspired by 21st.dev's library
-
Seamless Integration
- Components are automatically added to your project
- Start using your new UI components right away
- All components are fully customizable
🚀 Getting Started
Prerequisites
- Node.js (Latest LTS version recommended)
- One of the supported IDEs:
- Cursor
- Windsurf
- VSCode (with Cline extension)
Installation
-
Generate API Key
- Visit 21st.dev Magic Console
- Generate a new API key
-
Choose Installation Method
Method 1: CLI Installation (Recommended)
One command to install and configure MCP for your IDE:
npx @21st-dev/cli@latest install <client> --api-key <key>
Supported clients: cursor, windsurf, cline, claude
Method 2: Manual Configuration
If you prefer manual setup, add this to your IDE's MCP config file:
{
"mcpServers": {
"@21st-dev/magic": {
"command": "npx",
"args": ["-y", "@21st-dev/magic@latest", "API_KEY=\"your-api-key\""]
}
}
}
Config file locations:
- Cursor:
~/.cursor/mcp.json
- Windsurf:
~/.codeium/windsurf/mcp_config.json
- Cline:
~/.cline/mcp_config.json
- Claude:
~/.claude/mcp_config.json
Method 3: VS Code Installation
For one-click installation, click one of the install buttons below:
Manual VS Code Setup
First, check the install buttons above for one-click installation. For manual setup:
Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open User Settings (JSON)
:
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "21st.dev Magic API Key",
"password": true
}
],
"servers": {
"@21st-dev/magic": {
"command": "npx",
"args": ["-y", "@21st-dev/magic@latest"],
"env": {
"API_KEY": "${input:apiKey}"
}
}
}
}
}
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace:
{
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "21st.dev Magic API Key",
"password": true
}
],
"servers": {
"@21st-dev/magic": {
"command": "npx",
"args": ["-y", "@21st-dev/magic@latest"],
"env": {
"API_KEY": "${input:apiKey}"
}
}
}
}
❓ FAQ
How does Magic AI Agent handle my codebase?
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.
Can I customize the generated components?
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.
What happens if I run out of generations?
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.
How soon do new components get added to 21st.dev's library?
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.
Is there a limit to component complexity?
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.
🛠️ Development
Project Structure
mcp/
├── app/
│ └── components/ # Core UI components
├── types/ # TypeScript type definitions
├── lib/ # Utility functions
└── public/ # Static assets
Key Components
IdeInstructions
: Setup instructions for different IDEsApiKeySection
: API key management interfaceWelcomeOnboarding
: Onboarding flow for new users
🤝 Contributing
We welcome contributions! Please join our Discord community and provide feedback to help improve Magic Agent. The source code is available on GitHub.
👥 Community & Support
- Discord Community - Join our active community
- Twitter - Follow us for updates
⚠️ Beta Notice
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.
📝 License
MIT License
🙏 Acknowledgments
- Thanks to our beta testers and community members
- Special thanks to the Cursor, Windsurf, and Cline teams for their collaboration
- Integration with 21st.dev for component inspiration
- SVGL for logo and brand asset integration
For more information, join our Discord community or visit 21st.dev/magic.
Configuration du serveur
{
"mcpServers": {
"magic-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--21st-dev--magic-mcp--magic-mcp",
"npm run start --api-key api-key"
],
"env": {}
}
}
}