VayuUI

MCP Support

Connect the Vayu UI MCP server to your AI coding tools for intelligent component discovery, props lookup, scaffolding, and design token access.

The Vayu UI MCP server exposes 17 tools that let AI assistants understand your component library — search components, get props and variants, scaffold code, access design tokens, and more. It runs via stdio, so it works with any MCP-compatible tool.

Quick Setup

The fastest way is using the CLI. All configurations are written at the project level (workspace root):

# Interactive — prompts which tools to configure
npx vayu-ui-cli@latest install-mcp

# Configure specific tools
npx vayu-ui-cli@latest install-mcp --tool claude
npx vayu-ui-cli@latest install-mcp --tool claude,cursor,opencode

This writes the correct config to each tool's settings file in your project root. Restart your AI tool after running it.

FlagDescription
--toolComma-separated: claude, cursor, opencode
--dry-runPreview changes without writing
--forceOverwrite existing entries

Note: The CLI auto-configures Claude Code, Cursor, and OpenCode. For Codex, Antigravity, and Windsurf, use the manual setup below.

Manual Setup

If you prefer to add the config manually, add the JSON (or TOML) below to the correct file for your tool.

File: .mcp.json (project root)

{
  "mcpServers": {
    "vayu-ui": {
      "command": "npx",
      "args": ["-y", "vayu-ui-mcp"]
    }
  }
}

File: .cursor/mcp.json (project root)

{
  "mcpServers": {
    "vayu-ui": {
      "command": "npx",
      "args": ["-y", "vayu-ui-mcp"]
    }
  }
}

File: opencode.json (project root)

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "vayu-ui": {
      "type": "local",
      "command": ["npx", "-y", "vayu-ui-mcp"]
    }
  }
}

OpenCode uses mcp (not mcpServers) as the top-level key, requires "type": "local", and expects command as an array with arguments merged in.

File: .codex/config.toml (project root)

[mcp_servers.vayu-ui]
command = "npx"
args = ["-y", "vayu-ui-mcp"]

Codex project-level config requires the project to be marked as trusted. If you encounter issues, you can also add the server globally via codex mcp add vayu-ui -- npx -y vayu-ui-mcp.

File: .antigravity/mcp_config.json (project root)

{
  "mcpServers": {
    "vayu-ui": {
      "command": "npx",
      "args": ["-y", "vayu-ui-mcp"]
    }
  }
}

Alternatively, you can install via the MCP Store UI inside Antigravity: open the Agent Panel → More Options (⋯) → MCP Servers → search for custom config.

File: ~/.codeium/windsurf/mcp_config.json (global) or via the MCP Marketplace UI

{
  "mcpServers": {
    "vayu-ui": {
      "command": "npx",
      "args": ["-y", "vayu-ui-mcp"]
    }
  }
}

Windsurf also supports one-click install via the Cascade MCP Marketplace. Go to Settings > Cascade > MCP Servers > Open MCP Marketplace to browse and add servers.

If the file already exists, merge the vayu-ui entry into the existing mcpServers, mcp, or mcp_servers object — don't overwrite other entries.

Project-Level Setup

All MCP configurations managed by this CLI are project-scoped. This means:

  • Config files are created in your project root, not your home directory.
  • The MCP server is only active when the AI tool is working inside this project.
  • Other projects are unaffected.

If you need the same MCP server in multiple projects, run install-mcp in each project directory.

Available Tools

Once connected, the following 17 tools are available to your AI assistant:

ToolDescription
list_componentsList all components and hooks with optional filters
find_componentFuzzy search by natural language query
get_component_summaryLightweight identity card (name, category, tags)
get_component_propsAll props with types, defaults, and descriptions
get_component_variantsAvailable visual variants and sizes
get_component_statesInteractive states (loading, disabled, hover, etc.)
get_component_eventsEvent handlers with TypeScript signatures
get_component_a11yARIA roles, keyboard navigation, focus management
get_component_dependenciesNPM deps, registry deps, install command
get_component_peer_componentsFrequently co-used components
get_component_compositionCompound component structure and sub-components
get_component_exampleReady-to-paste TSX code examples
get_component_do_notAnti-patterns and common mistakes
get_hook_detailsFull hook API (signature, params, return values)
scaffold_component_usageGenerate working code with imports and state
get_install_guideCLI commands and import paths for installation
get_design_tokensCSS design tokens with Tailwind classes

Usage Guide

  1. Discoverlist_components or find_component to find the right component
  2. Learnget_component_props and get_component_a11y to understand the API
  3. Scaffoldscaffold_component_usage to generate copy-paste ready code
  4. Validateget_component_do_not to avoid anti-patterns

Example: Finding and Using a Component

{
  "name": "find_component",
  "arguments": { "query": "modal dialog with overlay" }
}
{
  "name": "get_component_props",
  "arguments": { "name": "Modal" }
}
{
  "name": "scaffold_component_usage",
  "arguments": { "name": "Modal", "withState": true }
}
{
  "name": "get_component_do_not",
  "arguments": { "name": "Modal", "category": "a11y" }
}

Common Tool Parameters

ParameterTypeRequiredDescription
namestringYesComponent/hook name (case-insensitive)
slugstringNoCLI slug identifier
variantstringNoExample variant key
categoryenumNoFilter: inputs, overlay, state, etc.
typeenumNoFilter: component or hook
withStatebooleanNoWrap scaffold in useState

Design Tokens via MCP

Use get_design_tokens to access the full design system:

{
  "name": "get_design_tokens",
  "arguments": { "name": "Button" }
}

Token Categories

CategoryWhat's Included
ColorsSemantic tokens: brand, surface, elevated, success, warning, destructive, info, muted (each with content variant)
Radiusrounded-control, rounded-surface, rounded-overlay
Shadowsshadow-control, shadow-surface, shadow-elevated
Structuralborder, field, focus tokens

Pass overridableOnly: true to get only tokens that are safe to override without breaking component behavior.

Component Categories

CategoryDescriptionExamples
inputsForm controls and data entryButton, TextInput, Checkbox, Select
feedbackStatus and feedbackAlert, Spinner, Toast
overlayModal and overlay UIModal, Tooltip, Popover
layoutStructural componentsCard, Container, Grid
data-displayContent presentationAvatar, Badge, Separator
navigationNavigation componentsNavbar, Sidebar, Tabs
animationAnimated componentsAnimatedContainer, FadeIn
stateState management hooksuseLocalStorage, useDebounce
sensorBrowser sensor hooksuseMediaQuery, useResizeObserver
domDOM interaction hooksuseClickOutside, useFocusTrap

Best Practices

  • Use find_component before assuming — the AI should search for the right component rather than guessing
  • Check anti-patterns — always run get_component_do_not before generating code
  • Include accessibility — reference get_component_a11y for ARIA and keyboard requirements
  • Use the scaffold toolscaffold_component_usage generates complete code with imports and state
  • Cache component lists — call list_components once per session, not per request

On this page