Create UI components instantly using AI integration with popular IDEs and customizable 21st.dev library
The Magic Component Platform (MCP) Server acts as a universal adapter, enabling AI applications like Claude Desktop, Continue, Cursor, and others to connect to specific data sources and tools through a standardized protocol. Similar to how USB-C connects various devices to multiple functionalities, MCP servers facilitate seamless integration between advanced artificial intelligence tools and the development environment, ensuring smooth data exchange and enhanced functionality.
The MCP Server offers a robust suite of features that significantly boost AI application development. Key among them is the AI-Powered UI Generation feature, which allows developers to create beautiful, modern UI components simply by describing their requirements in natural language. This capability leverages machine learning models trained on vast datasets, ensuring that generated components not only meet design standards but also follow industry best practices.
Additionally, the MCP Server supports multi-IDE integration, including Cursor, Windsurf, Visual Studio Code (VSCode) with Cline extension support, and VSCode itself. Each integration is designed to ensure a seamless experience for developers using these popular development environments. The server also ensures compatibility through versioned interfaces and robust error handling mechanisms.
The MCP protocol flow can be visualized as follows:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The architecture of the MCP Server is designed for flexibility and extensibility. At its core, it consists of multiple layers:
The protocol implementation within the MCP Server is modular, allowing easy updates to new versions of AI applications. For instance, if an AI application like Continue offers a new feature, the server can be updated without impacting existing integrations.
To get started with the MCP Server, follow these steps:
Generate API Key Visit 21st.dev Magic Console and generate a new API key.
Choose Installation Method
Use 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
Add the following JSON block to your IDE's configuration file:
{
"mcpServers": {
"@21st-dev/magic": {
"command": "npx",
"args": ["-y", "@21st-dev/magic@latest", "API_KEY=\"your-api-key\""]
}
}
}
Config file locations:
ide_instructions/cursor.json
ide_instructions/windsurf.json
api_key_section/cplane.json
Here is a sample configuration for the server:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
A scenario where developers might use the MCP Server is generating UI components using natural language prompts. For instance, a designer can describe the desired layout and functionality of a user interface, and the MCP Server will provide the necessary code snippets or even fully rendered components.
Another practical application is integrating external data sources into AI applications. Developers can use the server to fetch real-time data from APIs or databases and present it within their applications seamlessly.
The MCP Server supports multiple clients, each of which has its unique requirements:
The MCP Client compatibility matrix ensures that all supported AI applications seamlessly integrate with the MCP Server:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The MCP Server includes several advanced configuration options and security measures:
To install the MCP Server, use the provided CLI commands or manually configure your IDE settings.
Yes, the server supports a range of clients such as Claude Desktop and Continue. Visit the documentation for detailed integration steps.
Store API keys securely and ensure they are only accessed by authorized personnel to maintain security.
Currently, it supports Cursor, Windsurf, VSCode (with Cline extension), and VSCode itself.
The server includes detailed error handling mechanisms which can be configured for logging specific error scenarios.
We welcome contributions to the MCP Server project. To contribute, join our Discord community and review the development guidelines available on GitHub.
Magic Component Platform (MCP) Server is currently in beta. All features are free during this period, but we appreciate your feedback for ongoing improvements.
MIT License, allowing developers to use and modify the code as needed.
Thanks to our beta testers and community members, as well as special thanks to the Cursor, Windsurf, and Cline teams for their collaboration.
For more information about the MCP Server or MCP protocol, visit 21st.dev/magic.
This comprehensive documentation highlights the key features and capabilities of the Magic Component Platform (MCP) Server, designed to enhance AI applications through seamless integration. It covers detailed installation instructions, real-world use cases, and extensive integration scenarios to assist developers in leveraging the full potential of MCP servers in their projects.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods