Skip to main content

Set Up CLAD in Claude Code

Connect Claude Code to Lens Studio through the MCP server and install the CLAD plugin, so Claude Code can build and test Lenses in your project.

  • Snapchat: fully supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
  • SnapchatFully supported
  • SPECSFully supported
  • Camera Kit WebNot supported — CLAD's skills cover Snapchat and SPECS Lenses
  • Camera Kit MobileNot supported — CLAD's skills cover Snapchat and SPECS Lenses

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Not supported — CLAD's skills cover Snapchat and SPECS Lenses.

  • Camera Kit Mobile — Not supported — CLAD's skills cover Snapchat and SPECS Lenses.

Claude Code connects to the project you have open in Lens Studio through the Lens Studio MCP server, and the CLAD plugin gives it the agents and skills to build, test, and publish Lenses. Follow these steps in order: Lens Studio has to be running before Claude Code starts, so Claude Code finds its server.

Before you start

Install Claude Code

Install the Claude Code command-line tool. The Claude Code documentation has the current instructions; these are the install commands.

On macOS, in Terminal:

curl -fsSL https://claude.ai/install.sh | bash

This downloads the install script (-L follows redirects) and runs it in your shell.

On Windows, in PowerShell:

irm https://claude.ai/install.ps1 | iex

This downloads the install script with irm (Invoke-RestMethod) and runs it with iex (Invoke-Expression).

Use Claude Code in a terminal for these steps, not the Claude desktop app (Claude for Mac). You can use the desktop app once the setup is done.

Use this: Claude Code running in a terminal, with its empty prompt
Not this: the Claude desktop app's welcome screen, crossed out, because it is not Claude Code

Start Claude Code in the project folder

  1. Open a terminal in the project folder: in Lens Studio, select File > Show Project in Terminal, or see Open the project folder in a terminal. The folder holds the .mcp.json file that tells Claude Code where this Lens Studio window's server is. Each Lens Studio window has its own server, so you can open several projects, each in its own window, and run Claude Code in each project folder.

  2. Start Claude Code:

    claude
  3. If Claude Code asks whether you trust the folder, select Yes, I trust this folder.

    Claude Code asking whether to trust the project folder, with Yes, I trust this folder selected
  4. When Claude Code finds the lens-studio server in .mcp.json, it asks whether to use it. Select Use this and all future MCP servers in this project.

    Claude Code reporting a new MCP server, lens-studio, with Use this and all future MCP servers in this project highlighted

Install the CLAD plugin in Claude Code

Type these commands at the Claude Code prompt, not at the terminal's own prompt. The Claude Code prompt is a bare >; a prompt that starts with a folder path, like Documents/NewProject >, is the terminal, before Claude Code has started.

A terminal prompt that starts with a folder path, crossed out: commands typed here don't reach Claude Code
  1. Add the ls-extensions plugin marketplace:

    /plugin marketplace add https://github.com/lens-studio-devs/ls-extensions.git
  2. Install the CLAD plugin from it:

    /plugin install ls-clad@ls-extensions
  3. Load the plugin into the current session:

    /reload-plugins
  4. Open /plugin and check that ls-clad is on the Installed tab.

To add the marketplace from the plugin menu instead: type /plugin, select install, open the Marketplaces tab, select + Add Marketplace, and enter https://github.com/lens-studio-devs/ls-extensions.git.

The ls-extensions repository has the latest installation steps, and Discover plugins in the Claude Code documentation covers the plugin menu.

Check that Claude Code is connected to Lens Studio

Run /mcp at the Claude Code prompt. lens-studio listed as connected means Claude Code can use the Lens Studio tools. If it's missing or failed, see Troubleshoot Lens Studio MCP.

Let Claude Code work without asking at every step

A Lens build calls hundreds of tools. To avoid approving each one, press Shift+Tab until the footer shows auto mode on, then keep working. Use auto mode in a project you can restore, such as one under version control.

Claude Code with auto mode on, shown in the footer

Build a Lens with Claude Code and CLAD

Describe the Lens you want at the Claude Code prompt.

When building for SPECS, start the prompt with "Make … for SPECS" so CLAD uses its SPECS Experience Builder:

Make a periodic table Lens for SPECS that shows the atomic structure of each element

Claude Code builds the Lens in the open Lens Studio window, so you can watch the scene and Preview change. A full Lens can take 30 minutes or more.

Manage the Lens Studio server in Claude Code

TaskCommand
List servers and their statusclaude mcp list (terminal) or /mcp (Claude Code)
Reconnect after Lens Studio restarts or a chat tool is added/mcp, then select lens-studio and reconnect
Add the server by hand, for a folder without .mcp.jsonclaude mcp add --transport http lens-studio http://localhost:<port>/mcp --header "Authorization: Bearer <your-token>"
Remove a server you added by handclaude mcp remove lens-studio

Get the port and token from Copy MCP Config; see Connect Your Agent to Lens Studio.