MCP Server
Access HeroUI Pro and OSS documentation from a single AI assistant connection
The HeroUI Pro MCP server gives your AI agent access to both @heroui-pro/react (Pro) and @heroui/react (OSS) — component docs, CSS styles, theme variables, source code, and setup guides — all from a single connection. It can also import generated AI Chat UIs and saved Design Systems into your local project.
You do NOT need the separate @heroui/react-mcp (OSS MCP) installed. This Pro MCP covers both packages.
Setup
Add the Pro MCP to your editor:
Add to .cursor/mcp.json or Settings > Tools > MCP Servers:
{
"mcpServers": {
"heroui-pro": {
"url": "https://mcp.heroui.pro/mcp",
"headers": {
"x-heroui-personal-token": "HEROUI_PERSONAL_TOKEN"
}
}
}
}Make sure the heroui-pro connection is enabled in Settings > Tools & MCPs.
claude mcp add --transport http heroui-pro https://mcp.heroui.pro/mcp --header "x-heroui-personal-token: HEROUI_PERSONAL_TOKEN"Or add to .mcp.json:
{
"mcpServers": {
"heroui-pro": {
"type": "http",
"url": "https://mcp.heroui.pro/mcp",
"headers": {
"x-heroui-personal-token": "HEROUI_PERSONAL_TOKEN"
}
}
}
}Restart and run /mcp to verify.
Add to .vscode/mcp.json:
{
"servers": {
"heroui-pro": {
"url": "https://mcp.heroui.pro/mcp",
"headers": {
"x-heroui-personal-token": "HEROUI_PERSONAL_TOKEN"
}
}
}
}Open the file and click Start next to heroui-pro.
Add to .windsurf/mcp.json:
{
"mcpServers": {
"heroui-pro": {
"url": "https://mcp.heroui.pro/mcp",
"headers": {
"x-heroui-personal-token": "HEROUI_PERSONAL_TOKEN"
}
}
}
}Restart Windsurf to activate.
Add to settings.json (Cmd-,):
{
"context_servers": {
"heroui-pro": {
"url": "https://mcp.heroui.pro/mcp",
"headers": {
"x-heroui-personal-token": "HEROUI_PERSONAL_TOKEN"
}
}
}
}Restart and check the Agent Panel for a green indicator.
Add to your ~/.codex/config.toml (or a project-scoped .codex/config.toml):
[mcp_servers.heroui-pro]
url = "https://mcp.heroui.pro/mcp"
http_headers = { "x-heroui-personal-token" = "HEROUI_PERSONAL_TOKEN" }Restart Codex and run /mcp to verify.
Get your HEROUI_PERSONAL_TOKEN from the Pro dashboard.
Available Tools
| Tool | Description |
|---|---|
list_components | List all components from both @heroui-pro/react (Pro) and @heroui/react (OSS) |
get_component_docs | Full component documentation for any Pro or OSS component |
get_css | Component BEM CSS for both Pro and OSS components |
get_docs | Guides from both Pro and OSS documentation |
get_component_source_code | View OSS component source code (Pro source not exposed) |
get_theme_variables | Theme tokens and Pro theme variants (default, brutalism, glass, mouve) |
get_chat_export_manifest | Get file metadata and recommended paths for a HeroUI AI Chat generation |
get_chat_export_files | Fetch selected file contents from a chat export commit |
get_design_system_manifest | Get saved tokens, brand metadata, assets, and recommended outputs for a Design System |
get_design_system_export | Generate CSS, DESIGN.md, PRODUCT.md, or Native CSS from a saved Design System |
get_css
get_css()— list available Pro + OSS component namesget_css({ components: ["sheet", "sidebar"] })— Pro BEM CSSget_css({ components: ["button", "card"] })— OSS BEM CSS
get_theme_variables
get_theme_variables()— list available themesget_theme_variables({ theme: "default" })— Pro base tokens + OSS default tokensget_theme_variables({ theme: "brutalism" })— full Pro theme variant CSS
get_docs
Pro and OSS docs use distinct path prefixes so there's no ambiguity:
- Pro:
/pro/docs/react/getting-started/theming - OSS:
/docs/react/getting-started/theming
Import an AI Chat
Use these tools when you want to bring a generated UI from HeroUI AI Chat into a local project.
Workflow:
- Call
get_chat_export_manifest({ chatId })— returnscommitSha, file metadata,recommendedPaths,previewUrl, and agent instructions - Inspect the target project and decide which paths to fetch (start with
recommendedPaths) - Call
get_chat_export_files({ chatId, commitSha, paths })— fetch file contents in chunks of at most 25 paths - Adapt the returned files into the project — do not overwrite unrelated local files without asking
get_chat_export_manifest({ chatId: "YOUR_CHAT_ID" })get_chat_export_files({
chatId: "YOUR_CHAT_ID",
commitSha: "abc1234",
paths: ["package.json", "src/App.tsx", "src/main.tsx"]
})You can copy a ready-made MCP prompt from the chat export menu in the dashboard.
Import a Design System
Use these tools when you want to apply a saved Design System to a local project.
Workflow:
- Call
get_design_system_manifest({ designSystemId })— returns name, variables, overrides, brand metadata, asset URLs, custom fonts, available outputs, and recommended outputs - Inspect the target project
- Call
get_design_system_export({ designSystemId, outputs })for the outputs you need - Adapt the returned files into the project — do not overwrite unrelated local files without asking
| Output | File | Purpose |
|---|---|---|
css | globals.css | Web CSS — HeroUI variables, fonts, and component overrides |
design | DESIGN.md | Visual language and implementation guidance |
product | PRODUCT.md | Product context, audience, and brand voice |
native-css | global.css | Uniwind-ready variables for HeroUI Native |
Recommended outputs for most React projects: css, design, and product. Add native-css for HeroUI Native projects.
get_design_system_manifest({ designSystemId: "YOUR_DESIGN_SYSTEM_ID" })get_design_system_export({
designSystemId: "YOUR_DESIGN_SYSTEM_ID",
outputs: ["css", "design", "product"]
})You can copy a ready-made MCP prompt from the Design System code panel in the dashboard.
Start Prompting
Build a settings page with a Sidebar, CellSwitch toggles, CellSelect dropdowns, and a CellSlider for font sizeCreate a dashboard with KPI cards, TrendChips, and an AreaChart for weekly revenueShow me the BEM classes for the Sheet component — I want to customize the overlay and content stylesWhat props does the Command component accept? Show me an example with keyboard shortcutsUse the HeroUI Pro MCP to import the generated UI from chat YOUR_CHAT_ID. Start with get_chat_export_manifest, inspect this project, then fetch and adapt the recommended files. Do not overwrite unrelated local files without asking.Use the HeroUI Pro MCP to import design system YOUR_DESIGN_SYSTEM_ID. Start with get_design_system_manifest, inspect this project, then fetch and adapt the recommended outputs with get_design_system_export. Use its saved tokens, brand guidance, fonts, and assets as the source of truth. Do not overwrite unrelated local files without asking.