Skip to content

Connect 21st.dev to Zed

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

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

    Add it to your settings

    Run zed: open settings file from the command palette and add this inside the top-level object, next to your other settings.

    ~/.config/zed/settings.json
    {
      "context_servers": {
        "21st-dev": {
          "url": "https://21st.dev/api/mcp",
          "headers": {
            "x-api-key": "YOUR_API_KEY_21ST"
          }
        }
      }
    }
    Good to know
    • Zed keeps header values in your settings file, which stays on your machine. Replace YOUR_API_KEY_21ST with the token.
  2. Step 2: Check it's connected

    Open Settings → AI → MCP Servers. A green dot next to the server means it is running.

  3. Step 3: Try a first request

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

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

If it doesn't work

  • Zed reads MCP servers from the context_servers key, not mcpServers. Servers under any other key are ignored.
  • Run zed: open settings file from the command palette to edit your settings.
  • Zed asks before running each tool. Change this with agent.tool_permissions in your settings.