Configure MCP
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 |
codex | print-only TOML for ~/.codex/config.toml |
--write, the config is printed so you can paste it yourself. With --write it merges into your existing config file.
Install the skills
~/.claude/skills and ~/.cursor/skills:
21st-cli-use— how to drive the CLI21st-ai— generating and iterating UI21st-registry— publishing and installing21st-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.