---
title: "Agent Guide"
description: "Install the beUI agent skill, connect the MCP server, or consume the agent-friendly registry endpoints directly."
documentation: "https://beui.dev/docs/ai-agents"
markdown: "https://beui.dev/docs/ai-agents.md"
---

# Agent Guide

> Install the beUI agent skill, connect the MCP server, or consume the agent-friendly registry endpoints directly.

## Agent skill

Install the skill when you want coding agents to choose existing beUI components before inventing custom motion widgets.

```bash
npx skills add starc007/ui-components --skill beui
```

## MCP server

Connect the hosted beUI MCP server at `https://mcp.beui.dev/mcp`.

```bash
# Claude Code
claude mcp add --transport http beui https://mcp.beui.dev/mcp

# Codex
codex mcp add beui --url https://mcp.beui.dev/mcp

# Amp
amp mcp add beui https://mcp.beui.dev/mcp

# Gemini CLI
gemini mcp add --transport http beui https://mcp.beui.dev/mcp
```

One click: [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=beui&config=eyJ1cmwiOiJodHRwczovL21jcC5iZXVpLmRldi9tY3AifQ%3D%3D) or [Add to VS Code](vscode:mcp/install?%7B%22name%22%3A%22beui%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.beui.dev%2Fmcp%22%7D).

Manual configuration:

```json
{
  "mcpServers": {
    "beui": {
      "type": "http",
      "url": "https://mcp.beui.dev/mcp"
    }
  }
}
```

Windsurf names the field `serverUrl` instead of `url`, in `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "beui": {
      "serverUrl": "https://mcp.beui.dev/mcp"
    }
  }
}
```

Available tools: `get_setup` (one-time project setup and theme tokens), `list_components`, `search_components`, `get_component_docs` (props, types and usage as Markdown), `get_component` (source files), and `get_install_command` (checks the slug). For React Native apps, `list_native_components` and `get_native_component` return beUI Native components with every file to copy.

## WebMCP

Agents working in a browser tab can call beUI's tools instead of reading the page. Where the browser supports [WebMCP](https://webmachinelearning.github.io/webmcp/), a W3C Community Group draft that Chrome and Edge are testing, every page on beui.dev registers 4 read-only tools on `document.modelContext`. Other browsers load nothing extra.

| Tool | Returns |
| --- | --- |
| `search_components` | Components matching a query, with install slugs and doc links |
| `get_component_docs` | One component's docs as Markdown, by page or install slug |
| `get_install_command` | The shadcn command for npm, pnpm, yarn or bun |
| `read_page` | The open page as Markdown |

Each returns JSON with `ok` and either `data` or an `error` with a code and a hint.

For agents that only fetch: every page links its Markdown version, and the home page's Link header points to `/llms.txt`, the API catalog at `/.well-known/api-catalog` and the agent skill index at `/.well-known/agent-skills/index.json`.

## Endpoints

| Endpoint | Purpose |
| --- | --- |
| `/llms.txt` | Markdown discovery index |
| `/r` | JSON catalogue of every component |
| `/r/{slug}` | Component detail with files, dependencies, and source |
| `/registry.json` | shadcn directory-compatible catalogue |
| `/r/{slug}.json` | shadcn install item with inline file content |
| `/r/{slug}/raw` | Copy-ready plain-text source |
| `/components/{category}/{slug}.md` | Component documentation as Markdown |
| `/native/r` | JSON catalogue of beUI Native (React Native) components |
| `/native/r/{slug}` | Native component detail with install commands and every file |

## Agent flow

1. Fetch `https://beui.dev/r` to discover components.
2. Select the closest item by its published name and description.
3. Fetch `https://beui.dev/r/{slug}` for source, files, and dependencies.
4. Write every returned file to its declared path.
5. Install the external dependencies from the response.

## shadcn flow

```bash
# Official registry namespace
npx shadcn@latest add @beui/animated-toast-stack

# Direct registry URL
npx shadcn@latest add https://beui.dev/r/animated-toast-stack.json
```

## Entry shape

Registry entries include the component slug, name, description, category, documentation URLs, package dependencies, internal helpers, and every source file required by the install.

## Generative UI

To let a model compose beUI components into a live interface, follow the [OpenUI integration guide](https://beui.dev/docs/openui.md).
