Command Palette

Search for a command to run...

MCP Server Connection

Connect to the shadcn MCP server and access the Optics registry.

The Model Context Protocol (MCP) allows AI agents to interact with the shadcn CLI to browse, search, and install components from the Optics registry. Follow the steps below to connect your agent.

1Configure your registry

Add the Optics registry to your components.json file:

components.json
{  "..."  "registries": {    "@optics": "https://optics.agusmayol.com.ar/r/{name}.json"  }}

Replace the URL with your actual Optics registry endpoint if different.

2Connect with your agent

Add the shadcn MCP server configuration based on your development environment:

.cursor/mcp.json
{  "mcpServers": {    "shadcn": {      "command": "npx",      "args": ["shadcn@latest", "mcp"]    }  }}

Restart Cursor and enable the shadcn MCP server in Cursor Settings.

3Using the MCP Server

Once connected, you can use natural language commands to interact with the Optics registry:

• "Show me all available components in the Optics registry"

• "Add the button, dialog, and card components from @optics"

• "Search for form components in the Optics registry"

• "Install @optics/button to my project"