Price Per TokenPrice Per Token

Magic MCP Server

by 21st-dev

0

About

21st.dev Magic is an AI-powered UI component generator that brings v0-like capabilities directly into your IDE. It creates modern, beautiful React components from natural language descriptions and integrates seamlessly with Cursor, Windsurf, VSCode, and Cline. Key features: - Natural language to UI component generation using AI - Access to 21st.dev's component library with pre-built, customizable modern designs - Multi-IDE support including Cursor, Windsurf, VSCode, and Cline - SVGL integration for professional brand assets and logos - Full TypeScript support for type-safe component development - Real-time preview of generated components - Component enhancement with advanced features and animations

README

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

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

    [](https://insiders.vscode.dev/redirect/mcp/install?name=%4021st-dev%2Fmagic&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%4021st-dev%2Fmagic%40latest%22%5D%2C%22env%22%3A%7B%22API_KEY%22%3A%22%24%7Binput%3AapiKey%7D%22%7D%7D&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%2C%22description%22%3A%2221st.dev+Magic+API+Key%22%2C%22password%22%3Atrue%7D%5D) [](https://insiders.vscode.dev/redirect/mcp/install?name=%4021st-dev%2Fmagic&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%4021st-dev%2Fmagic%40latest%22%5D%2C%22env%22%3A%7B%22API_KEY%22%3A%22%24%7Binput%3AapiKey%7D%22%7D%7D&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%2C%22description%22%3A%2221st.dev+Magic+API+Key%22%2C%22password%22%3Atrue%7D%5D&quality=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:

    ```json { "inputs": [ { "type": "promptString", "id": "apiKey", "description": "21st.dev Magic API Key", "password": true } ], "servers": { "@21st-dev/magic": { "command": "npx",

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81