Skip to content

Connect 21st.dev to Cline

Community marketplace of React components, templates, shadcn themes and shaders, with a hosted MCP server for agents. Browsing is free; copying more than a few components a day needs a membership.

MCP serverOfficialChecked 2026-11-16

Before you start

  • Cline installed (see its MCP documentation (opens in a new tab)).
  • 21st.dev is available on macOS, Windows, Linux and the web.
  • Get an API key at 21st.dev/mcp and set it as API_KEY_21ST in your environment. Keys from the old Magic console no longer work. AI generation tools only appear when your account has AI access. Each component page also shows its own shadcn CLI command.
  1. Step 1: Add 21st.dev to Cline

    Add it in your editor

    In Cline, open the MCP Servers panel, choose Configure, click Configure MCP Servers and add this to the file that opens.

    cline_mcp_settings.json
    {
      "mcpServers": {
        "21st-dev": {
          "type": "streamableHttp",
          "url": "https://21st.dev/api/mcp",
          "headers": {
            "x-api-key": "YOUR_API_KEY_21ST"
          }
        }
      }
    }

    Or add it to the Cline CLI

    Saves the server to the Cline CLI's own settings. The editor extension keeps a separate list.

    Terminal
    cline mcp add 21st-dev https://21st.dev/api/mcp --transport http --header "x-api-key: $API_KEY_21ST" --yes
    Good to know
    • Cline keeps header values in its settings file, which stays on your machine. Replace YOUR_API_KEY_21ST with the token. The CLI command reads it from API_KEY_21ST in your terminal.
  2. Step 2: Check it's connected

    Terminal
    cline config mcp

    In VS Code or JetBrains, open the MCP Servers panel in Cline and check the server is listed with its tools.

  3. Step 3: Try a first request

    Ask Cline something that only works with 21st.dev connected:

    Say to Cline
    Search 21st.dev for a pricing section that fits this page and show me how to adapt it.

If it doesn't work

  • In the editor, open the MCP Servers panel, choose Configure and click Configure MCP Servers to edit cline_mcp_settings.json.
  • The Cline CLI keeps its own list in ~/.cline/data/settings/cline_mcp_settings.json, separate from the editor's.
  • Remote servers need "type": "streamableHttp". Without it, Cline falls back to the older SSE transport.