MCP Server

The Hex UI MCP server exposes the component registry as structured tool calls. Install once and let your AI agent pick the right primitive.

Why MCP?

Traditional docs are text — the agent reads hundreds of tokens to find a component. MCP gives the agent a structured catalog: search by behavior, read typed schemas, and install components as a tool call. The.schema.ts metadata is the contract.

Claude Code

Add this to the Claude Code settings for your project (or the global settings under ~/.claude/).

json
// .claude/settings.json
{
  "mcpServers": {
    "hex-ui": {
      "command": "npx",
      "args": ["@hex-core/mcp"]
    }
  }
}

Cursor

Cursor reads a .cursor/mcp.json at the project root.

json
// .cursor/mcp.json
{
  "mcpServers": {
    "hex-ui": {
      "command": "npx",
      "args": ["@hex-core/mcp"]
    }
  }
}

Available tools

  • search_components — fuzzy search over name, description, tags, and AI hints
  • get_component — full registry item (props, variants, AI hints, examples, source) for a slug
  • get_component_schema — schema only, no source — for agents reasoning about an already-installed component
  • list_themes — available theme presets
  • get_theme — full token set for a theme (css / json / tailwind)
  • scaffold_project — init + starter components in one call
  • customize_component — generate a themed variant
  • list_recipes — catalog of spec-driven blueprints (auth form, settings page, …)
  • get_recipe — ordered install steps, union of peer deps, post-install checklist
  • resolve_spec — deterministic brief → ranked component + recipe shortlist
  • verify_checklist— cross-check installed components against the registry’s internal-dependency graph

See Spec-driven development for how the last four compose.

Example prompts

  • “Find a hex-ui component for a confirmation dialog and add it.”
  • “Search hex-ui for a data table primitive and wire it to my users list.”
  • “What hex-ui components should I use for a settings page?”