Agent guide
For AI agents
beUI exposes a static, agent-friendly surface. Install the beUI skill, connect the MCP server below, call the WebMCP tools from a browser tab, or hit the raw endpoints directly. Coding agents (Claude, Codex, Cursor, Amp) can list components, fetch source with all deps, and drop files into the user's project.
The skill teaches coding agents to fetch the live registry first, pick the closest items[].name install slug, inspect it with shadcn, then install and compose from the generated source. Use it when you want agents to choose existing beUI components instead of inventing custom motion widgets.
npx skills add starc007/ui-components --skill beuiThe fastest path: connect the beUI MCP server and your agent can list, search and install components directly. Hosted at https://mcp.beui.dev/mcp.
# 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/mcpAny other client: add it manually to your MCP config.
{
"mcpServers": {
"beui": {
"type": "http",
"url": "https://mcp.beui.dev/mcp"
}
}
}Windsurf names the field serverUrl instead of url:
{
"mcpServers": {
"beui": {
"serverUrl": "https://mcp.beui.dev/mcp"
}
}
}Tools: get_setup, list_components, search_components, get_component_docs, get_component, get_install_command. For React Native apps, list_native_components and get_native_component return beUI Native components with every file to copy.
Agents working in a browser tab can call beUI's tools instead of reading the page. Where the browser supports 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.
Tools: search_components, get_component_docs, get_install_command and read_page, which returns 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.
- Open
/llms.txtllms.txtMarkdown index in llmstxt.org format.
- Open
/rRegistry indexJSON catalogue of every component.
/r/{slug}Component detailJSON with files, deps, source.
- Open
/registry.jsonshadcn catalogDirectory-compatible registry catalog.
/r/{slug}.jsonshadcn itemInstall item with inline file content and shadcn semantic color classes.
/r/{slug}/rawRaw sourcePlain text .tsx ready to drop in.
Four calls, then install. Components are self-contained and own their files.
// 1. Discover what exists
const idx = await fetch('https://beui.dev/r').then((r) => r.json());
// 2. Fetch a component
const entry = await fetch(`https://beui.dev/r/${slug}`).then((r) => r.json());
// 3. Write files into the user's project
for (const file of entry.files) {
await writeFile(file.path, file.content);
}
// 4. Install external deps
await runShell(['bun', 'add', ...entry.dependencies]);The shadcn item installs source files and package dependencies. Components use shadcn semantic color utilities directly, so they inherit the target app's theme without beUI-specific color variables.
# Official registry namespace (shadcn directory)
npx shadcn@latest add @beui/animated-toast-stack
# Direct URL, no namespace needed
npx shadcn@latest add https://beui.dev/r/animated-toast-stack.jsonInternal helpers (e.g. @/lib/utils) ship inline as type: util so the agent does not have to chase imports.
{
"slug": "swap",
"name": "Multi-chain Swap",
"description": "Cross-chain swap widget with chain + token selectors, animated flip and quote.",
"category": "blocks",
"page_url": "https://beui.dev/components/blocks/swap",
"detail_url": "https://beui.dev/r/swap",
"raw_url": "https://beui.dev/r/swap/raw",
"dependencies": ["motion", "lucide-react", "react"],
"internal": ["@/lib/utils"],
"files": [
{ "path": "components/motion/swap.tsx", "type": "component", "content": "..." },
{ "path": "components/previews/motion/swap.preview.tsx", "type": "preview", "content": "..." },
{ "path": "lib/utils.ts", "type": "util", "content": "..." }
]
}Want the model to compose these components into a live interface? Follow the OpenUI integration guide to register a custom component library, generate its system prompt, and render interactive OpenUI Lang as it streams.