Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

For LLMs & Agents

logic2b ui is designed to be consumed by AI agents. Here is the machine-readable surface.

Everything on this site is available in machine-friendly formats. If you are an LLM or building an agent, use these endpoints instead of scraping HTML.

Endpoints

Endpoint Content
/llms.txt Index of all documentation with absolute URLs
/llms-full.txt The entire documentation in one Markdown file
/docs/<page>.md Any docs page as plain Markdown (append .md)
/r/index.json Registry index: every component with its description
/r/<name>.json Full component payload: metadata + source code
/mcp Remote MCP endpoint (streamable HTTP): registry tools for agents

Installing components programmatically

The registry uses an open registry-item JSON schema. Each item includes dependencies (npm), registryDependencies (other registry items) and files[].content (the full TypeScript source):

curl https://ui.logic2b.com/r/button.json

To install into a user project, either run the logic2b CLI:

npx logic2b@latest add button

or write files[].content to src/components/ui/<name>.tsx yourself, install the listed dependencies, and recurse into registryDependencies.

Copy Prompt

Every install surface on this site (component docs, blocks, charts and the /create theme studio) has a Copy Prompt action next to the CLI command. It copies a self-contained brief for a coding agent: the CLI happy path, a manual fallback against the raw registry JSON, the exact theme CSS when a preset is involved, the path-mapping table, and a verification checklist. Paste it into Claude Code, Cursor or Copilot and the agent has everything it needs — no scraping, no guessing.

MCP server

Prefer a live connection? The registry speaks the Model Context Protocol two ways — both expose the same tools. Reading the registry: list_components, search_components, get_component (full source of every file) and get_demo (real usage examples, imports rewritten to project paths — also served raw at /r/demos/index.json). Acting on a project, no shell required: install_plan (the exact files to write and npm deps to add for any set of items, registry dependencies resolved), get_theme, decode_preset and apply_preset (rebuilds theme.css for any /create preset, or patches the stylesheet you pass in). contrast_audit verifies a theme’s WCAG 2.2 and APCA contrast per token pair before you ship it. With a shell, add_command returns the validated CLI invocation instead.

Remote (zero install, no shell needed) — connect any streamable-HTTP MCP client to:

https://ui.logic2b.com/mcp

With Claude Code:

claude mcp add --transport http logic2b https://ui.logic2b.com/mcp

Or in any client that takes a JSON config:

{
  "mcpServers": {
    "logic2b": { "type": "http", "url": "https://ui.logic2b.com/mcp" }
  }
}

Local (stdio)npx -y @logic2b/mcp runs the same tools as a local process. See the repo for details.

Conventions an agent can rely on

  • Every component uses the cn() helper from @/lib/utils.
  • Colors are always theme tokens (bg-primary), never raw palette classes.
  • Variants are defined with class-variance-authority and exported (e.g. buttonVariants).
  • Every root element has a data-slot attribute for reliable selection.