Skip to content

21st.dev

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 serverUI librariesWorks through the Grid

Hosted server

A hosted MCP server; you connect with an access token.
https://21st.dev/api/mcp

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.

Read the 21st.dev Grid Notes (setup, gotchas and reduced motion)

Set it up in your agent

Pick your agent and copy the setup. ExonUI remembers your choice on other pages.
  1. Add it from the terminal

    Run this in your project folder. It saves the server for you, in this project only.

    Terminal
    claude mcp add --transport http 21st-dev https://21st.dev/api/mcp --header 'x-api-key: ${API_KEY_21ST}'
  2. Or share it with your team

    Add this to .mcp.json at the project root and commit it. Teammates approve it the first time Claude Code starts.

    .mcp.json
    {
      "mcpServers": {
        "21st-dev": {
          "type": "http",
          "url": "https://21st.dev/api/mcp",
          "headers": {
            "x-api-key": "${API_KEY_21ST}"
          }
        }
      }
    }
Good to know
  • Set API_KEY_21ST in your environment before you start Claude Code. It reads the value each time it connects, so the token stays out of the config.

Check it works

Terminal
claude mcp list

Start a session and run /mcp to see the server, its status and its tools.