The slabui CLI is in development. Commands, options and the registry format
may change before version 1.0.
The registry has an MCP server. Editors and
agents can use it to search components, read their code, compare versions and
get the command to install them. It runs on your computer
(@slabui/mcp) or remotely, at
https://slabui.com/mcp.
Set up your editor
pnpm slabui mcp init
Without --client, the CLI shows a list of the clients below, with the ones
found in the project already checked. Check every editor or agent you use in
the project: each one gets its own config.
To skip the list (in CI or from an agent), pass the clients with --client,
comma-separated or repeated:
pnpm slabui mcp init --client claude,cursor
| Client | --client | Where |
|---|---|---|
| Claude Code | claude | .mcp.json |
| Cursor | cursor | .cursor/mcp.json |
| VS Code | vscode | .vscode/mcp.json |
| Zed | zed | .zed/settings.json (context_servers) |
| Codex | codex | Prints the snippet for ~/.codex/config.toml |
The CLI adds the SlabUI server, keeping the servers already in the file. In
Zed's settings.json, comments and other settings are kept too. Running it
again replaces the slabui entry.
Local or remote
The CLI asks how the editor should reach the server. Pass --transport to skip
the question (without a terminal, it uses local).
--transport | How it runs | Pro items |
|---|---|---|
local (default) | Your editor runs npx -y @slabui/mcp@latest | slabui login (or SLABUI_TOKEN), like the CLI |
http | Your editor connects to https://slabui.com/mcp | SLABUI_TOKEN in the environment of your editor |
pnpm slabui mcp init --client claude --transport http
Local
The editor starts the server on your computer, so it needs Node.js. It reads
the token saved by slabui login (or by Sign in in the
theme editor), so Pro items work with no
environment variable, and no token goes into the config file:
{
"mcpServers": {
"slabui": {
"command": "npx",
"args": ["-y", "@slabui/mcp@latest"]
}
}
}The first start downloads the package, which takes a few seconds; then npx
uses its cache. On Windows, if your editor can't start npx, use
"command": "cmd" and "args": ["/c", "npx", "-y", "@slabui/mcp@latest"].
Remote
The editor connects to https://slabui.com/mcp, with no Node.js needed. The
config file only has a reference to SLABUI_TOKEN, never the token itself:
{
"mcpServers": {
"slabui": {
"type": "http",
"url": "https://slabui.com/mcp",
"headers": { "Authorization": "Bearer ${SLABUI_TOKEN:-}" }
}
}
}Editors read SLABUI_TOKEN from their own environment (your shell), not from
the project's .env files. Without it, the server only reads free items. Zed
doesn't expand variables, so the CLI leaves the token out and tells you how to
add it.
Use --url (with --transport http) to point to another server, such as one
running on localhost.
Instructions for the agent
mcp init then asks whether to add instructions for the agent: search the
registry before writing a component, install with slabui add instead of copying
code, and update with slabui diff and slabui update. Pass --instructions or
--no-instructions to skip the question (without a terminal, they are added).
With several clients, the question is asked once, and a file shared by two
clients (AGENTS.md) is written once.
| Client | File |
|---|---|
| Claude Code | CLAUDE.md |
| Cursor | .cursor/rules/slabui.mdc |
| VS Code | .github/copilot-instructions.md |
| Zed, Codex | AGENTS.md |
In existing files, the CLI only touches the block between
<!-- slabui:start --> and <!-- slabui:end -->, so running it again updates the
instructions and keeps the rest of the file.
Tools
| Tool | Description |
|---|---|
search_items | Search the registry, optionally by type |
get_item | Versions, dependencies and source code of an item |
diff_versions | Difference between two published versions |
get_install_command | The slabui add command to install items |
The server is read-only: installing and updating is done by the CLI in your project.