21st.dev Magic Ai Agent

Featured
Created by21st-dev21st-dev

It's similar to v0 but in your Cursor/WindSurf/Cline. 21st development Magic MCP server for interacting with your frontend like Magic.

Overview

What is Magic MCP?

Magic MCP is an innovative server developed by 21st-dev that enhances the functionality of frontend applications. It provides a seamless integration experience for developers working with various frontend frameworks like Cursor, WindSurf, and Cline. This tool allows developers to interact with their frontend projects in a way that feels magical, hence the name "Magic MCP".

Features of Magic MCP

  • Seamless Integration: Magic MCP integrates effortlessly with popular frontend frameworks, making it easy for developers to enhance their projects without extensive configuration.
  • User-Friendly Interface: The server is designed with a focus on usability, ensuring that developers can navigate and utilize its features with ease.
  • Real-Time Collaboration: Magic MCP supports real-time collaboration, allowing multiple developers to work on the same project simultaneously without conflicts.
  • Extensive Documentation: Comprehensive documentation is available to help developers get started quickly and make the most of the server's capabilities.
  • Active Community Support: With a growing community of users, developers can find support and share experiences, enhancing the overall development process.

How to Use Magic MCP

  1. Installation: Begin by installing Magic MCP on your local machine or server. Follow the installation instructions provided in the documentation.
  2. Configuration: Configure the server settings to match your project requirements. This includes setting up any necessary environment variables and dependencies.
  3. Integration: Integrate Magic MCP with your frontend framework by following the specific guidelines for your chosen technology.
  4. Development: Start developing your frontend application using the features provided by Magic MCP. Utilize real-time collaboration tools to work with your team effectively.
  5. Deployment: Once your application is ready, deploy it using the built-in deployment tools or your preferred deployment method.

Frequently Asked Questions

Q: What frameworks does Magic MCP support?

A: Magic MCP supports various frontend frameworks including Cursor, WindSurf, and Cline, allowing developers to choose the best fit for their projects.

Q: Is Magic MCP free to use?

A: Yes, Magic MCP is an open-source project, and it is free to use for both personal and commercial projects.

Q: How can I contribute to Magic MCP?

A: Contributions are welcome! You can contribute by reporting issues, suggesting features, or submitting pull requests on the project's GitHub repository.

Q: Where can I find the documentation for Magic MCP?

A: The documentation is available on the official website 21st.dev/magic, where you can find detailed guides and tutorials.

Q: Is there a community for Magic MCP users?

A: Yes, there is an active community of Magic MCP users where you can ask questions, share your experiences, and collaborate with other developers.

Details

21st.dev Magic AI Agent

MCP Banner

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:
  • 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

  1. 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
  2. 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
  3. 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

  1. Generate API Key

  2. 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:

Install with NPX in VS Code Install with NPX in VS Code Insiders

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 IDEs
  • ApiKeySection: API key management interface
  • WelcomeOnboarding: 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

āš ļø 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.

Server Config

{
  "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": {}
    }
  }
}

Project Info

Featured
Author
21st-dev
Created At
Jun 26, 2025
Star
2673
Language
TypeScript
Tags
-

21st.dev Magic Ai Ag... Alternative

For some alternatives to 21st.dev Magic Ai Ag... that you may need, we provide you with sites divided by category.

APIMatic Validator MCP Server for validating OpenAPI specifications through APIMatic's API with MCP

The MCP Code Executor is an MCP server that enables LLMs to run Python code in a designated Conda environment.

MCP Terminal is a terminal control server based on MCP (Model Context Protocol), specifically designed for integration with large language models (LLM) and AI assistants. It provides a standardized interface that allows AI to execute terminal commands and obtain output results.

A powerful Model Context Protocol (MCP) server that offers a comprehensive solution for public web access.

Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.

A complete Elasticsearch MCP server

This read-only MCP Server allows you to connect to Email data from Claude Desktop through CData JDBC Drivers. Free (beta) read/write servers are available at https://www.cdata.com/solutions/mcp

View More >>