Skip to content

Summary

21st.dev's hosted MCP server: search React UI components, themes and templates, pull their code into your project, and generate UI with 21st AI when enabled.

Features

  • Search components, themes and templates and retrieve their code
  • Hosted UI generation with variants when 21st AI is enabled
  • Hosted streamable HTTP endpoint with an x-api-key header
  • 21st CLI configures Cursor, Claude Code, VS Code, Windsurf and Codex
  • Accepts legacy Magic MCP tool names

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the headers with your own values.
  3. Restart the agent — the "21st MCP" tools will be available.
{
  "mcpServers": {
    "21st-mcp": {
      "type": "http",
      "url": "https://21st.dev/api/mcp",
      "headers": {
        "x-api-key": "<your-21st-api-key>"
      }
    }
  }
}

Description

21st MCP is the hosted server of 21st.dev, a community marketplace of React and Tailwind UI components. It replaces the earlier Magic MCP (@21st-dev/magic): the old package still works, but only as a thin stdio proxy that forwards to the same server.

Tools
  • search across the catalogue of components, themes and templates, and get_component to retrieve the code for one.
  • get_inspiration and search_logo for references and brand logos.
  • generate and iterate_generation for hosted UI generation with variants. These appear only when the account has 21st AI access enabled; get_usage reports whether it is.
  • Bookmarks, team libraries and profile management. Legacy Magic tool names are still accepted and translated.
Setup

It is a plain streamable HTTP server at https://21st.dev/api/mcp, authenticated with an x-api-key header. Keys come from 21st.dev; keys issued by the old Magic console were reset and no longer work. The 21st CLI writes the client config for you (npx @21st-dev/cli@latest init --client cursor, also claude, vscode, windsurf and codex), and the repository doubles as a plugin marketplace for Claude Code, Codex and Grok Build.

Who it is for

Developers building React interfaces with Cursor, Claude Code or Codex who want the agent to start from published components rather than invent markup. Without AI access you can still search, fetch and adapt components with your own agent.

Related MCP Servers

See all 21st MCP alternatives

MCP: Icons8 MCP

by Icons8

New

Icons8's hosted MCP server: search 420,000+ icons in 130+ styles from your coding agent and drop them into code as free high-res PNGs, or as SVGs on a paid plan.

NVIDIA's official MCP server for the Elements design system — component APIs, design tokens, icons and validated project scaffolding for AI/ML and robotics UIs.

New

Community MCP server giving AI assistants the source, demos, blocks and metadata of shadcn/ui v4 components for React, Svelte, Vue and React Native.

Browse all MCP servers →