Claude Code Setup
Use this guide to connect Claude Code to Lens Studio, install the CLAD Lens Studio plugin, and start building a SPECS Lens.
Before You Start
Before you start, make sure:
- A Lens Studio project prepared for SPECS is open in the Lens Studio editor — Setup Lens Studio.
- A terminal is open in the Lens Studio project folder — Open Project in CLI.
Note: The order of these setup steps matter. Lens Studio must be opened first so that it can create an MCP for the terminal to auto-connect to.
Install Claude Code
Please review to Claude Code’s documentation on how to install Claude Code to CLI: https://claude.com/product/claude-code
Select your platform:
curl -fsSL https://claude.ai/install.sh | bash
curl -fsSL downloads the install script from the URL (-L follows redirects). Piping to bash runs that script in your shell.
irm https://claude.ai/install.ps1 | iex
iex is shorthand for Invoke-Expression. This downloads the install script with irm (Invoke-RestMethod) and runs it.
Start Claude Code
Note: Use Claude Code in the CLI for this guide, not Claude for Mac. You may use Claude for Mac after you complete the steps in this guide.
Claude Code Claude for Mac
Note: It’s important to call Claude in your Lens Studio’s project folder. The project folder contains an
mcp.jsonwhich tells Claude that Lens Studio provides an MCP server for it to connect to. This MCP server is per Lens Studio window. It is possible for you to open multiple Lens Studio Windows and open Claude in each project folder and have them operate on each individually.
From your Lens Studio project folder, start Claude Code in CLI:
claude
Claude may request you to trust this folder. If you see the following message, select “Yes, I trust this folder”.
Claude may identify the MCP automatically. If you see the following message, select “Use this and all future MCP servers in this project”.
Install the plugin marketplace
The following commands are for Claude Code, not terminal. To verify you are typing into Claude Code, ensure that the line you are typing does not come after a path, like “Documents/NewProject >”.
| Claude Code | Terminal |
|---|---|
For the most up-to-date installation steps, please refer to the ls-extensions repository readme, which can be accessed here: https://github.com/lens-studio-devs/ls-extensions.
Please note that these commands are for the Claude Code CLI, not the “Claude Desktop for Mac” application.
In Claude Code, add the ls-extensions plugin marketplace:
/plugin marketplace add https://github.com/lens-studio-devs/ls-extensions.git
Alternatively, add the marketplace through the Claude Code UI
- Enter
/pluginsand navigate down to the “install” option.
- Navigate to the Marketplaces tab then select the “+ Add Marketplace” option.
-
Enter in the Marketplace url for Lens Studio Agent Extensions:
https://github.com/lens-studio-devs/ls-extensions.git
Install the CLAD plugin
After the marketplace is added, install the CLAD plugin from it.
In Claude Code:
/plugin install ls-clad@ls-extensions
After the plugin installs, reload plugins so Claude Code picks it up:
/reload-plugins
For additional instructions on Claude Code plugins please view their documentation.
Verify Plugin Installation
To confirm installation, open the plugin menu:
/plugin
Navigate to the Installed tab and verify that the Lens Studio CLAD plugin appears.
Verify MCP Connection
In Claude Code, you check whether the Lens Studio MCP server is connected by using the “/mcp” command.
/mcp
A successful connection will look like this:
Tips for troubleshooting MCP connection: Troubleshoot Lens Studio MCP.
Enable Auto Mode
To avoid approving many individual permissions:
- Press Shift + Tab until you see the auto mode option.
- Press Enter to confirm auto mode.
Start Building
Ask Claude Code to build a SPECS Lens. Example prompt:
Can you please build me a periodic table SPECS Lens showing the atomic structure of various elements?
Await Completion
Let Claude Code work. A full Lens build can take 30+ minutes.