Skip to content

MCP

Let an AI assistant browse, search and install Lathe components. It uses the MCP server that ships with the shadcn CLI, so there is nothing extra to run.

Register the registry

The server reads the registries listed in components.json. Add Lathe there, in the project the assistant works in.

components.json
{
  "registries": {
    "@latheui": "https://latheui.dev/api/registry/{name}.json"
  }
}

npx latheui init writes this for you. With Lathe Pro, npx latheui init --key <key> adds your key to the same entry, and the assistant sees Pro items too.

Connect your assistant

Run the command for your client. It writes the MCP configuration for that client into the project. Restart the client afterwards.

pnpm dlx shadcn@latest mcp init --client claude

Other values for --client are cursor, vscode, codex and opencode.

Ask for components

The assistant can now see the whole registry. For example:

  • Show me the components in the lathe registry.
  • Find a lathe component for comparing two images.
  • Add the lathe line chart and use it on the dashboard page.

Without MCP

Assistants that only read the web can start from llms.txt. It lists every page with a one-line description, next to the registry file that holds the component's full source.