AniUI

MCP Server

Give your AI assistant direct access to AniUI components, theme tokens, and usage patterns.

The AniUI MCP (Model Context Protocol) server lets AI tools like Cursor, Claude Desktop, and Windsurf read real component source code on demand. Instead of guessing APIs, the AI pulls actual implementations and generates accurate code.

What your AI gets access to:

  • • 150 component source files — real code, not summaries
  • • Theme tokens — CSS variables and Tailwind mappings
  • • Usage info — imports, variants, and props for each component
  • • Component pattern — how to build new AniUI-style components

One-command setup#

The fastest path — the AniUI CLI auto-detects installed MCP clients and writes the config for you. No JSON hand-editing, no finding OS-specific paths.

npx @aniui/cli mcp install

Picks any combination of Cursor, Claude Desktop, Claude Code, and Windsurf interactively, or pass flags for scripted use: --cursor --claude-desktop --claude-code --windsurf --all --dry-run --yes. Idempotent: preserves other mcpServers entries, asks before overwriting a differing aniui entry.

Manual setup — Cursor#

Create a .cursor/mcp.json file in your project root:

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

Restart Cursor. The MCP tools will be available automatically in Cursor Chat.

Setup for Claude Desktop#

Open your Claude Desktop config file:

  • • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the AniUI server:

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

Restart Claude Desktop. You'll see a hammer icon — click it to verify the AniUI tools are listed.

Setup for Other Clients#

For Windsurf or any other MCP-compatible client, add the same config to their MCP settings:

"command": "npx",
"args": ["-y", "@aniui/mcp"]

Available Tools#

ToolDescription
list_componentsList all 150 components with names, descriptions, and tiers
search_componentsNatural-language search ranked by name/description relevance
get_componentGet the full source code of any component
get_component_usageGet import path, variants, props, and dependencies
list_blocksList all pre-built full-screen compositions (login, chat, pricing, …)
get_blockGet the full source of a block
get_theme_tokensGet all theme CSS variables and Tailwind class mappings
get_theme_presetPrimary color HSLs for a built-in preset (default, blue, green, orange, rose)
list_sdk_supportLibrary-level matrix: supported Expo SDKs, engines, architectures, and engine-to-arch requirements
check_arch_compatibilityPass/warn/fail verdict for a component against a project context ({expoSdk, engine, arch})

Available Resources#

ResourceURIReturns
Registryaniui://registryFull component registry as JSON
Themeaniui://themeglobal.css with all theme variables
Patternaniui://patternComponent authoring template and rules

Example#

When you ask your AI "Build me a settings page using AniUI", here's what happens behind the scenes:

  1. AI calls list_components to find relevant components (switch, card, separator)
  2. AI calls get_component for each — gets real source code
  3. AI calls get_theme_tokens — gets theme variables
  4. AI generates a screen using the actual component APIs — correct imports, props, and variants

No hallucinated props. No wrong imports. Just working code.