Menu

21st.dev Magic AI Agent

Local
by: Community
|
category: code
|
2025.06.05 updated

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.

Step 1: 生成 Stdio 配置
sign in
You must sign in before generating the URL

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

  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

    • Visit 21st.dev Magic Console
    • Generate a new 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

Related MCP Servers

langflow-doc-qa-server
Local

by: Community

A Model Context Protocol server for document Q&A powered by Langflow. It demonstrates core MCP concepts by providing a simple interface to query documents through a Langflow backend.

utility|2025.06.06 updated

openai-websearch-mcp
Local

by: Community

This is a Python-based MCP server that provides OpenAI `web_search` build-in tool.

utility |2025.06.06 updated

google-custom-search
Local

by: Community

Provides Google Search results via the Google Custom Search API

utility |2025.06.06 updated

contentful-mcp
Local

by: Community

Read, update, delete, publish content in your [Contentful](https://contentful.com/) space(s) from this MCP Server.

utility |2025.06.06 updated