Add UI blocks from your coding agent with the shadcn MCP server
Connect Claude Code, Cursor or VS Code to the TechWithEmma UI registry and install blocks with a prompt.
1 min read
Copying components by hand gets old fast. With the shadcn MCP server, your coding agent can search the TechWithEmma UI registry and install blocks for you, straight from a prompt like "add the minimal pricing section from @twe".
This takes about two minutes to set up.
1. Set up shadcn/ui
If your project doesn't use shadcn/ui yet, start there:
npx shadcn@latest init2. Add the registry
Open components.json and add the @twe registry:
{
"registries": {
"@twe": "https://techwithemma.com/r/{name}.json"
}
}Now the shadcn CLI, and anything built on it, knows where to find our blocks.
3. Connect your agent
Run the command for the agent you use. It writes the MCP config for you.
# Claude Code
npx shadcn@latest mcp init --client claude
# Cursor
npx shadcn@latest mcp init --client cursor
# VS Code
npx shadcn@latest mcp init --client vscodeRestart the agent so it picks up the new server.
4. Ask for what you need
The MCP server reads the registries in your components.json, so @twe blocks show up next to the official
shadcn ones. Try prompts like these:
- "Show me the blocks in the @twe registry"
- "Add the minimal login and register screens from @twe"
- "Build a landing page using only @twe blocks in the Minimal style"
The agent installs each block together with the shadcn components it depends on.
What about Pro blocks?
Free blocks install without an account. Pro blocks come with All-Access and need your private registry token,
which you create on the get started page. Keep the token in .env, never in git.
Next steps
- Browse every block in the UI library and preview it before you install.
- Read the MCP server docs for more prompts.
- Pick a style so every section on your page matches.