Skip to main content

Configure MCP

21st init --client cursor           # print the MCP config
21st init --client cursor --write   # write it into your editor config
init sets up the 21st MCP server so your editor and AI agent can search, generate, and pull code directly. Supported clients:
Client--write target
cursor.cursor/mcp.json
vscode.cursor/mcp.json (VS Code MCP config)
windsurf.cursor/mcp.json
claude.mcp.json
codexprint-only TOML for ~/.codex/config.toml
Without --write, the config is printed so you can paste it yourself. With --write it merges into your existing config file.

Install the skills

21st install-skill
Installs the global 21st.dev skills into ~/.claude/skills and ~/.cursor/skills:
  • 21st-cli-use — how to drive the CLI
  • 21st-ai — generating and iterating UI
  • 21st-registry — publishing and installing
  • 21st-design-sync — keeping a design system in sync
The CLI and MCP share one endpoint and one login, so once you’ve run 21st login, both surfaces are authenticated with the same account.