# MCP server

> Connect Claude Code, Cursor, VS Code and other AI assistants to HextaUI, so they search the docs, read each API and install components for you.

Docs: https://hextaui.com/docs/mcp
Markdown: https://hextaui.com/docs/mcp.md

The HextaUI MCP server gives assistants the same docs you read here: what each component is for, its props and data attributes, keyboard support, working examples and the command that installs it. Assistants stop guessing at shadcn/ui props and use what HextaUI actually ships.

It is a hosted, read-only server at `https://hextaui.com/mcp`. There is nothing to install and no API key. It reads the docs of the version on this site, so it is always current.

## Setup

Add the server to your assistant, then ask it to build something with HextaUI.

### Claude Code

```bash
claude mcp add --transport http hextaui https://hextaui.com/mcp
```

### Cursor

```json title=".cursor/mcp.json"
{
  "mcpServers": {
    "hextaui": {
      "url": "https://hextaui.com/mcp"
    }
  }
}
```

### VS Code

```json title=".vscode/mcp.json"
{
  "servers": {
    "hextaui": {
      "type": "http",
      "url": "https://hextaui.com/mcp"
    }
  }
}
```

### Codex

```toml title="~/.codex/config.toml"
[mcp_servers.hextaui]
url = "https://hextaui.com/mcp"
```

### Windsurf

```json title="~/.codeium/windsurf/mcp_config.json"
{
  "mcpServers": {
    "hextaui": {
      "serverUrl": "https://hextaui.com/mcp"
    }
  }
}
```

### Other clients

Any client that supports remote servers over Streamable HTTP can use the URL directly. For a client that only runs local servers, bridge it with `mcp-remote`.

```json
{
  "mcpServers": {
    "hextaui": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://hextaui.com/mcp"]
    }
  }
}
```

## Tools

Every tool is read-only. Installing is left to your assistant, which runs the shadcn CLI command in your project like you would.

- `search_docs` finds components, examples, props and data attributes from plain language, like “confirm before delete” or a prop name.
- `list_components` lists every component, hook and utility by category.
- `get_component` returns a page's full docs: install command, usage, examples, keyboard, accessibility and API reference.
- `get_component_api` returns only the API reference and keyboard support.
- `get_examples` returns the code of any example on a page.
- `get_component_source` returns the source files the CLI would install.
- `get_install_command` builds one shadcn command for several components, for npm, pnpm, yarn or bun.
- `get_setup` returns the [installation](https://hextaui.com/docs/installation) guide and the conventions generated code should follow.

The server also exposes each page as a `hextaui://docs/{slug}` resource, and a `build-ui` prompt that walks an assistant from picking components to installing them.

## Try it

- Build a settings page with HextaUI: profile form, notification switches and a danger zone.
- Which HextaUI component should I use for a list of files with checkboxes?
- Replace this modal with the HextaUI dialog and keep the form working.
- Add a chat view with HextaUI message bubbles that scrolls to new messages.

Prefer the shadcn MCP server? Register the [@hextaui namespace](https://hextaui.com/docs/installation#namespace) and it can browse and install HextaUI components and examples too.
