Connect 21st.dev to Cursor
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
- Cursor 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_21STin 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.
Step 1: Add 21st.dev to Cursor
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}" } } } }Good to know- Cursor reads
API_KEY_21STwhen it starts. Set the variable, then open Cursor from that terminal so it can see it.
- Cursor reads
Step 2: Check it's connected
Open Cursor Settings, find the MCP section and check the server is enabled with its tools listed.
Step 3: Try a first request
Ask Cursor something that only works with 21st.dev connected:
Say to Cursor Search 21st.dev for a pricing section that fits this page and show me how to adapt it.
If it doesn't work
- Project servers live in
.cursor/mcp.json; servers for every project live in~/.cursor/mcp.json. - After editing the file by hand, toggle the server off and on in settings, or restart Cursor.
- The Output panel (MCP Logs) shows why a server failed to start.





