Skip to content

AI & MCP

Give your AI coding tool access to Youj components, icons, themes and installation guidance: connect the MCP server, run it yourself, and read every tool it has.

Which one? Local (npx @youj/cli mcp) knows your project (package manager, install route) and your Youj version: use it with Claude Code and Cursor. Hosted is for zero-install; it can't see your project and answers from the latest release.

Connect your AI coding tool to the Youj MCP server, a Model Context Protocol server, to search components, read props and accessibility notes, find icon morphs, check theme contrast and get installation guidance. It's hosted at https://mcp.youj.dev: one line connects it, with nothing to install and no key. The same server is on npm as @youj/mcp, to run on your own machine (see Run it yourself).

The first half of this page is the overview: connecting, what the server can do and how to ask it. The second half is the reference: running it yourself, and every tool, resource and prompt.

Connect

Point your client at https://mcp.youj.dev. It speaks Streamable HTTP, needs no account or key, is read-only and keeps no session. It answers from the index of the latest Youj release.

Claude Code, Codex and Gemini CLI

Each has a command that adds the server for every project. Pick yours:

claude mcp add --transport http youj https://mcp.youj.dev

Or put it in the tool's config file. Codex reads ~/.codex/config.toml (or .codex/config.toml in a project), which is TOML:

[mcp_servers.youj]
url = "https://mcp.youj.dev"

Gemini CLI reads ~/.gemini/settings.json (or .gemini/settings.json in a project), where a Streamable HTTP server is httpUrl:

{
  "mcpServers": {
    "youj": { "httpUrl": "https://mcp.youj.dev" }
  }
}

Cursor

In .cursor/mcp.json (this project) or ~/.cursor/mcp.json (every project):

{
  "mcpServers": {
    "youj": { "url": "https://mcp.youj.dev" }
  }
}

VS Code

In .vscode/mcp.json:

{
  "servers": {
    "youj": { "type": "http", "url": "https://mcp.youj.dev" }
  }
}

Windsurf

In ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "youj": { "serverUrl": "https://mcp.youj.dev" }
  }
}

Zed

In ~/.config/zed/settings.json (every project) or .zed/settings.json (this one):

{
  "context_servers": {
    "youj": { "url": "https://mcp.youj.dev" }
  }
}

JetBrains AI Assistant

In Settings → Tools → AI Assistant → Model Context Protocol (MCP), choose Add and paste:

{
  "mcpServers": {
    "youj": { "url": "https://mcp.youj.dev" }
  }
}

Claude.ai and Claude Desktop

In Settings → Connectors, choose Add custom connector, name it Youj and enter https://mcp.youj.dev as its URL. It's then available in every chat, from the tools menu.

Other clients

Any client that takes a remote server's URL connects the same way: the URL is https://mcp.youj.dev, the transport Streamable HTTP. Opening the URL in a browser shows a short note on how to connect. A client that only runs local servers can run it yourself.

Restart the editor, or reload its MCP servers, after changing its config.

What it can do

ToolAsk it for
search"a loading spinner", "delete confirmation", "settings page": components, blocks, icons, hooks and docs, by meaning
get_componentWhat it's for and what to use instead, install, usage, props, motion tokens, reduced motion and accessibility
search_icons, get_iconIcons by meaning, static, morphing or swapping, with triggers and the accessible button pattern
suggest_icon_morph"play → pause", "menu → close", "copy → check": the state icon made for the pair, or an IconSwap with the transition that fits
list_components, list_loaders, list_miniaturesEvery component by category with its package and stability, every loading animation, every interactive miniature; get_component reads one
list_blocks, get_blockCards, sections and screens, with the components they use and their source
list_illustrationsThe ready-made isometric scenes by category, with their ids and tags; one scene in detail through get_component("illustration-<id>")
get_illustration_guideHow to compose a new isometric illustration: the builder's parts, presets, shades and grid, rules that read at small sizes, and worked examples
draw_illustration"an empty inbox", drawn as a scene: checked (every problem comes back with its fix), then the component, where to put it, the install command and a link that opens it in the illustration builder
get_tokensColor, type, radius, control size, motion and character (stroke, shadow, title and label voice, icon weight) tokens for any preset
create_themeA theme from a brand color, with defineTheme, checked so muted text and field borders keep their contrast
motion_guidance"toast enters", "list reorders", "button success": the piece that already does it, with its tokens and reduced motion
get_project_infoLocal server only: read the framework, package manager, install route, Youj/React/Tailwind versions and setup warnings; optional cwd (defaults to the server's working directory)
get_add_commandExact install command and imports for component, block or illustration scene names, using the project's route and package manager, including optional peers
setupSetup steps for your framework, and doctor's checks on a pasted package.json or stylesheet

The project tools are read-only and keep reads inside cwd, including symlink targets. Hoisted packages outside it are not inspected; declared ranges are labeled separately from installed versions. Registry configuration takes precedence when both routes are present. Package commands omit dependencies already declared or installed; blocks still need their source copied with get_block.

It also serves every docs page as a resource (youj://docs/<slug>), and two prompts: build-screen and brand-theme.

Ask it like this

Build a settings page with Youj: profile, notifications and billing tabs.
Make the mute button morph between speaker and muted.
Theme the app for our brand color, #ff5a1f.
Which Youj piece should animate new rows into this table?

Morphing icons are where it earns its keep. Asked for "play → pause", it finds that PlayIcon is choreographed for exactly that pair and hands back the accessible button:

import { PlayIcon, useIconState } from '@youj/icons'

const play = useIconState({ labels: ['Play', 'Pause'] })

<button {...play.buttonProps}>
  <PlayIcon {...play.iconProps} />
</button>

Docs for any model

Every page is also plain Markdown, for tools without MCP:

Run it yourself

The hosted server can't see your project. Run the server on your machine when you want your tool to inspect the app you're working in, or to work offline:

  • Your project. Only the local server has get_project_info, and its get_add_command writes the command for your package manager and install route (the hosted one shows npm and says to use your own).
  • Your version. The local server answers from an index bundled with the package, so it describes exactly the Youj version it ships with. Pin it to your app's version and the answers match what you have installed.
  • Offline. Once it's installed, it needs no network.

The quickest way is the CLI, run in your app:

npx @youj/cli mcp

It asks which editor, writes that editor's config file and pins the server to the Youj version your app has installed. --client picks the editor without asking, and --print prints the config instead of writing it. The CLI reference lists every option.

To add it by hand, put this in your editor's config:

npx @youj/cli mcp --client claude

Writes .mcp.json, merged with what's already there. Running it again changes nothing.

claude mcp add youj -- npx -y @youj/mcp@latest

Or Claude Code's own command, which adds it for every project.

.mcp.json
{
  "mcpServers": {
    "youj": {
      "command": "npx",
      "args": ["-y", "@youj/mcp@latest"]
    }
  }
}

The snippets use @latest. To match an app on a fixed version, pin the server to it, as the CLI does: @youj/mcp@<version>.

To run the server directly over stdio, for another MCP client or to inspect it:

npx -y @youj/mcp

It needs Node.js 22 or later. When the app in the server's working folder has a different Youj version from the server, the server says so in its instructions and names the matching server to run.

Tools

Every tool is read-only: none of them writes files or installs anything. They return Markdown sized for a model's context. A name the index doesn't know comes back as an error.

Find

search: searches by meaning across components, blocks, icons, illustration scenes, loaders (npx @youj/cli add loader-<id>), hooks and docs, and gives each result the tool to call next and the exact way in: the package import, or npx @youj/cli add for what's copied in.

InputTypeDefaultDescription
querystringrequiredWhat you need, in plain words: "loading spinner", "delete confirmation", "settings page".
kindscomponent, block, icon, illustration, miniature, loader, hook, docs (list)allOnly these kinds.
limit1 to 258How many results.

get_component: everything needed to use one component, motion piece, illustration scene (illustration-coffee) or the illustration kit: what it's for and what to use instead, install, usage, props, motion tokens, reduced motion and accessibility.

InputTypeDefaultDescription
namestringrequiredRegistry name (alert-dialog), title or export (AlertDialogContent).
partstringA sub-component export to show props for, such as DialogContent.
sectionsinstall, usage, props, motion, a11y, related (list)allOnly these sections.

list_components: every component (UI, core, motion, sound) by docs category, with its package, stability and a one-line summary. Optional kind (ui, core, motion or sound) and category (such as "forms").

list_loaders: every loading animation by category, with its id, component and technique. Optional category. Install one with npx @youj/cli add loader-<id>.

list_miniatures: every miniature (an interactive isometric object) by category, with its id and component. Optional category.

Icons

search_icons: Youj icons, brand marks and, optionally, Lucide icons by meaning, with synonyms, typos and prefixes. Returns names, a JSX snippet each and the import line.

InputTypeDefaultDescription
querystringrequired"notification", "delete", "loading".
typeall, static, morph, swapallstatic icons have one pose and animate on hover. morph icons morph between two meanings. swap lists IconSwap pairs.
categorya Youj icon categoryOnly this category.
sourceall, youj, lucideallWhich set.
limit1 to 3012How many results.

get_icon: one icon in detail: its choreography, its states (for a morphing icon), its triggers, the accessible button pattern, props, install and IconSwap partners. For a Lucide icon, how to animate it with YoujIcon.

InputTypeDescription
namestringbell-off, BellOffIcon or lucide:rocket.

suggest_icon_morph: the best way to animate between two meanings. Returns the state icon made for the pair when one exists, otherwise an IconSwap between the two best icons with the transition that fits, plus the accessible button code.

InputTypeDescription
pairstring"from → to", such as "play → pause".
from, tostringThe two meanings, instead of pair.

Blocks

Blocks are the copy-in levels card, section and screen (an app frame is built in Create). Results name the level.

list_blocks: every block, grouped by domain and tagged with its level, with a one-line summary. Optional group (such as "Auth") lists one group, and level (card, section or screen) lists one level.

get_block: one block: its description, the components it uses, its install command and its files as npx @youj/cli add writes them.

InputTypeDescription
slugstringThe block, such as app-auth-flow.
sourcebooleanReturns the source code instead of the summary.
filestringWhich file, from the summary's file list.
offsetnumberCharacter offset, to page through a long file. Source comes 12,000 characters at a time.

Illustrations

list_illustrations: the ready-made isometric scenes by category, with their ids and tags. Without category, every category and its scene ids. Read one scene with get_component("illustration-<id>").

get_illustration_guide: how to compose a new scene in the illustration builder's JSON format: the volume and grid, every part type, preset, shade, variant and base, rules that keep a scene readable at small sizes, and worked examples. Takes no input.

draw_illustration: checks a scene in that format. A valid scene comes back as a component for your project's install route, the file to write it to, the install command and a link that opens it in the builder. An invalid scene comes back with every problem and its fix.

InputTypeDescription
sceneobject or JSON string{ "name", "base", "parts": [...], "groups"?: [...] }, as the guide describes.
namestringThe component's name: "Empty inbox" becomes IllustrationEmptyInbox. Default: the scene's name.
cwdstringThe app's folder, to pick the install route.

Tokens, themes and motion

get_tokens: a preset's tokens: color (light and dark, with the class to use), type, radius, control size and control heights, motion (durations, easings, springs and staggers), and character (stroke, shadow, title and label voice, icon weight).

InputTypeDefaultDescription
presetgraphite, terminal, brutal, basalt, meadow, sandstone, cinnabar, umber, seaglass, heatherbasaltWhich preset.
groupscolor, type, radius, spacing, motion, character (list)allOnly these groups.
modelight, dark, bothbothWhich color mode.

create_theme: a theme from a brand color, built with defineTheme over a preset and checked with checkTheme: every text pair at least 4.5:1 and field borders at least 3:1 on every surface, in both modes. A theme that fails WCAG AA is refused unless allowLowContrast is set. Returns the code, how to apply it, the derived colors and any issues.

InputDescription
accentRequired. The brand color: hex, rgb(), hsl() or oklch().
nameThe theme's name.
baseThe preset to extend. Default basalt.
neutralThe neutral tint: hue (0 to 360), chroma (0 to 0.04), wash and lift (0 to 1; lift is how far raised surfaces stand above the page in dark mode). Default: toward the accent's hue.
success, warning, dangerStatus colors.
radiusnone, sm, md, lg or full.
controlSizeControl heights: compact, default or comfortable.
motionPersonalityThe motion personality: precise, calm or lively.
fontssans, mono and display font stacks. display is for titles and defaults to sans.
strokewidth (border width in px, 0.5 to 4), ink (0, a quiet hairline, to 1, lines in the text color) and icons (icon stroke multiplier, 0.5 to 2).
shadowsoft (blurred elevation), hard (solid offset shadows) or none.
actionsWhat fills primary buttons: accent (default) or ink, the text color.
headingsweight (100 to 900) and tracking.
labelsFor badges, column heads, field labels, tabs and keys: case (none or upper), font (sans or mono) and tracking.
allowLowContrastAccepts pairs that miss WCAG AA.
lookThe look to apply it with: classic (default) or bezel.

motion_guidance: names the primitive, preset or token that already does an interaction ("toast enters", "list reorders", "button success", "tabs indicator"), with a snippet, its tokens and its reduced-motion behavior. One input: interaction, in plain words.

Your project

These tools read the app on disk, so they're on the local server only (the hosted one has get_add_command without the project). Reads stay inside cwd, including symlink targets, so packages hoisted above it aren't inspected. cwd defaults to the server's working folder.

get_project_info: the framework, package manager, install route (the packages or the @youj registry), Youj, React and Tailwind versions, and setup warnings. Installed versions are labeled separately from the ranges in package.json. When an app has both routes, the registry wins. Optional input: cwd.

get_add_command: the exact install command and imports for components, blocks or illustration scenes, for the project's route and package manager, including optional peers and the entry to import from. It leaves out dependencies the app already has. Blocks and scenes get an npx @youj/cli add command, which copies them in. Each name is answered on its own: an unknown one comes back as "Skipped" with suggestions beside the commands for the others (an error only when none is known).

InputTypeDescription
itemslist of names1 to 50 names, matched exactly, ignoring case.
cwdstringThe app's folder.

setup: how to add Youj to an app: npx @youj/cli init and the manual steps for the framework and mode, in a component style when given. Paste package.json or the global stylesheet to check versions and stylesheet order, as youj doctor does.

InputDescription
frameworknext-app, next-pages, vite, react-router or astro.
modepackage or registry.
lookclassic (default) or bezel.
packageJsonThe app's package.json, as text.
cssThe global stylesheet, as text.

Resources

URIWhat
youj://docs/{slug}Every docs page as Markdown, such as youj://docs/components/button. The Introduction is youj://docs/index.
youj://componentsEvery component, one line each.
youj://tokensBasalt's tokens: color, type, radius, control size and motion.

Prompts

PromptArgumentsWhat it does
build-screenscreen, optional frameworkPlans and builds a screen: starts from a block that fits, reads each component before using it, picks icons and morphs, and keeps to the tokens.
brand-themeaccent, optional nameCreates a theme from a brand color, fixes what the contrast check reports, applies it app-wide and compares it with the closest preset.

The rules it follows

The server tells your tool to import each thing from the package that owns it, to copy source in only with npx @youj/cli add, to use semantic color classes and Youj sizes rather than raw colors, to take timing from useYouj() or var(--yj-duration-*) rather than hard-coded durations, and to give every animation a reduced-motion equivalent.