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.
Hosted server
https://21st.dev/api/mcpGet 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
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}'Or share it with your team
Add this to
.mcp.jsonat 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}" } } } }
- Set
API_KEY_21STin 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
claude mcp listStart a session and run /mcp to see the server, its status and its tools.
Or add it to the project
Add this to
.cursor/mcp.json, or to~/.cursor/mcp.jsonto use it in every project..cursor/mcp.json { "mcpServers": { "21st-dev": { "url": "https://21st.dev/api/mcp", "headers": { "x-api-key": "${env:API_KEY_21ST}" } } } }
- Cursor reads
API_KEY_21STwhen it starts. Set the variable, then open Cursor from that terminal so it can see it.
Check it works
Open Cursor Settings, find the MCP section and check the server is enabled with its tools listed.
Add it to the workspace
Add this to
.vscode/mcp.json. It holds no token, so you can commit it to share it with your team..vscode/mcp.json { "inputs": [ { "type": "promptString", "id": "21st-dev-token", "description": "Token for 21st-dev", "password": true } ], "servers": { "21st-dev": { "type": "http", "url": "https://21st.dev/api/mcp", "headers": { "x-api-key": "${input:21st-dev-token}" } } } }
- VS Code asks for the token the first time the server starts and stores it for you, so the file holds no secret.
Check it works
Run MCP: List Servers from the Command Palette, then open Copilot Chat in Agent mode and check the tools picker.
Add it to the config file
Add this to
~/.codex/config.toml.~/.codex/config.toml [mcp_servers.21st-dev] url = "https://21st.dev/api/mcp" env_http_headers = { "x-api-key" = "API_KEY_21ST" }
- Codex reads
API_KEY_21STfrom your environment each time it connects, so the token stays out of the file.
Check it works
codex mcp listIn a Codex session, run /mcp to see connected servers and their tools.
Add it from the terminal
Run this in your project folder. It saves the server to the project's
opencode.json.Terminal opencode mcp add 21st-dev --url https://21st.dev/api/mcp --header 'x-api-key={env:API_KEY_21ST}'Or edit the config file
Add this to
opencode.jsonat the project root.opencode.json { "$schema": "https://opencode.ai/config.json", "mcp": { "21st-dev": { "type": "remote", "url": "https://21st.dev/api/mcp", "enabled": true, "oauth": false, "headers": { "x-api-key": "{env:API_KEY_21ST}" } } } }
- OpenCode's background service reads
API_KEY_21STwhen it starts, not from the terminal you're in. Set the variable, then runopencode service restart.
Check it works
opencode mcp listStart OpenCode in the project; the server's tools are available to the agent straight away.
Add it to the config file
Add this to
.agents/mcp_config.jsonin your project, or to~/.gemini/config/mcp_config.jsonto use it everywhere (app, editor andagyCLI)..agents/mcp_config.json { "mcpServers": { "21st-dev": { "serverUrl": "https://21st.dev/api/mcp", "headers": { "x-api-key": "YOUR_API_KEY_21ST" } } } }
- Antigravity keeps header values in the file itself. Replace
YOUR_API_KEY_21STwith the token in your global config, not in a file you commit.
Check it works
In the editor, open the … menu at the top of the agent panel and choose MCP Servers. In the app, open Settings → Customizations → Installed MCP Servers. In the agy CLI, type /mcp.
Add it from the terminal
Run this in your project folder. It saves the server to the project's
.gemini/settings.json.Terminal gemini mcp add --transport http --header 'x-api-key: ${API_KEY_21ST}' 21st-dev https://21st.dev/api/mcpOr edit the config file
Add this to
.gemini/settings.jsonin your project, or to~/.gemini/settings.jsonto use it in every project..gemini/settings.json { "mcpServers": { "21st-dev": { "httpUrl": "https://21st.dev/api/mcp", "headers": { "x-api-key": "${API_KEY_21ST}" } } } }
- Gemini CLI reads
API_KEY_21STfrom your environment when it loads its settings, so the token stays out of the file.
Check it works
gemini mcp listIn a Gemini CLI session, run /mcp to see each server, its status and its tools.
Add it to the local config file
Add this to
.devin/mcp_config.local.json, which isn't committed, or to~/.config/devin/mcp_config.jsonto use it in every project..devin/mcp_config.local.json { "mcpServers": { "21st-dev": { "url": "https://21st.dev/api/mcp", "headers": { "x-api-key": "YOUR_API_KEY_21ST" } } } }
- Devin keeps header values in the file itself. Replace
YOUR_API_KEY_21STwith the token.
Check it works
devin mcp listIn Devin Desktop, open Customize from the Agents window, choose MCPs and check the server under This computer.
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" } } } }
- Zed keeps header values in your settings file, which stays on your machine. Replace
YOUR_API_KEY_21STwith the token.
Check it works
Open Settings → AI → MCP Servers. A green dot next to the server means it is running.
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
- Cline keeps header values in its settings file, which stays on your machine. Replace
YOUR_API_KEY_21STwith the token. The CLI command reads it fromAPI_KEY_21STin your terminal.
Check it works
cline config mcpIn VS Code or JetBrains, open the MCP Servers panel in Cline and check the server is listed with its tools.
For Claude Code sessions
Saves the server to your Claude Code user settings, so every Conductor workspace gets it.
Terminal claude mcp add --scope user --transport http 21st-dev https://21st.dev/api/mcp --header 'x-api-key: ${API_KEY_21ST}'Or share it with your team
Add this to
.mcp.jsonat the project root and commit it. Claude Code sessions in every workspace on that branch pick it up..mcp.json { "mcpServers": { "21st-dev": { "type": "http", "url": "https://21st.dev/api/mcp", "headers": { "x-api-key": "${API_KEY_21ST}" } } } }Or edit Codex's config file
Add this to
~/.codex/config.toml.~/.codex/config.toml [mcp_servers.21st-dev] url = "https://21st.dev/api/mcp" env_http_headers = { "x-api-key" = "API_KEY_21ST" }
- Start a new session in Conductor after adding a server, so the agent loads it.
- Set
API_KEY_21STin your environment before you start Claude Code. It reads the value each time it connects, so the token stays out of the config. - Codex reads
API_KEY_21STfrom your environment each time it connects, so the token stays out of the file.
Check it works
claude mcp listIn a Conductor session, click the plug icon in the composer or run /mcp-status to see each server's status.
More in UI libraries
- shadcn/uiCopy-in React components built on Radix and Tailwind. Its MCP server browses, searches and installs items from the default and any namespaced community registry.
- React BitsAnimated text effects, backgrounds and interactive components for React. Each one installs as source you own, in JavaScript or TypeScript and with CSS or Tailwind.
- Magic UIOver 150 free animated components and effects for landing pages, built with React, TypeScript, Tailwind CSS and Motion. A paid Pro tier adds templates.


