- Alert
- Autocomplete
- Badge
- CascaderNew component for nested multi-level selection
- Data Grid
- Date Selector
- Event Calendar
- File Upload
- FiltersRebuilt around a boolean query tree, with breaking API changes and a migration prompt
- Frame
- Gantt
- Icon Stack
- Icon Tile
- Kanban
- Number Field
- Phone Input
- Rating
- Scrollspy
- Sortable
- Stepper
- Timeline
- Tree
Codex connects to ReUI in one step: point its CLI at the hosted ReUI MCP server, sign in once, and start building UI from the ReUI registry by chat. The endpoint is https://mcp.reui.io over Streamable HTTP, the same one every agent uses - see MCP Server for the shared background.
Connect ReUI
Add the ReUI server
Add the server with the Codex CLI:
codex mcp add reui --url https://mcp.reui.ioConfirm the connection
Check that Codex registered the server:
codex mcp listYou should see reui listed. The entry lands in ~/.codex/config.toml; a trusted project can scope it instead by putting the same table in .codex/config.toml. In the Codex TUI, /mcp shows the same list live.
Sign in with ReUI
Authorize the connection with a browser sign-in:
codex mcp login reuiThis opens a "Sign in with ReUI" prompt in your browser. Approve it to connect. If you do not have a ReUI account yet, a free one is created for you right there in the flow, so there is nothing to set up in advance.
For headless or CI runs where no browser is available, create a personal token at Account → MCP (it looks like reui_pat_...) and have Codex read it from an environment variable. Add the server with the token flag:
codex mcp add reui --url https://mcp.reui.io \
--bearer-token-env-var REUI_LICENSE_KEYThat writes the entry below, so the secret never lands in the config file. The ReUI installer produces the same shape, spelling the URL out as https://mcp.reui.io/api/mcp and adding the bearer_token_env_var line only when REUI_LICENSE_KEY is set in your environment as it runs:
[mcp_servers.reui]
url = "https://mcp.reui.io"
bearer_token_env_var = "REUI_LICENSE_KEY"Then export the value in your shell profile: export REUI_LICENSE_KEY=<your token or license key>. Codex also accepts http_headers for static headers and env_http_headers for headers sourced from the environment, but bearer_token_env_var is the shortest correct route. Whichever you use, do not paste the ${REUI_LICENSE_KEY} form from components.json into http_headers - the shadcn CLI expands that one, a static header does not, and it would reach the server as literal text and fail with a 401. A bearer token configured this way is an alternative to codex mcp login, not an addition to it. It is sent on every request and takes precedence over any stored OAuth credential, so leave it out entirely on the sign-in path - otherwise logging in appears to succeed while every call keeps failing.
Install the ReUI skill
Run the one-line installer so Codex follows ReUI's build workflow:
curl -fsSL https://mcp.reui.io/install | node -This drops a ReUI skill file into your project. With it in place, Codex knows how to discover blocks, assemble components, and wire them together the ReUI way instead of guessing.
Build with ReUI
Describe the interface you want in plain language and Codex pulls the right ReUI components, examples, and blocks from the registry, then wires them into your project.
Use ReUI to scaffold an admin app - the app-shell with a collapsible sidebar and top bar, and a dashboard page with stat cards and a chart.Add a data-grid of orders with sorting, column filters, pagination, and row selection, wired to my /api/orders endpoint.Build a multi-step "create project" wizard with the ReUI stepper and form components, with validation on each step.Add a kanban board for support tickets with drag and drop, grouped by status, and a filters bar above it.Unlock premium items
Free items (the 20 components and every c-* example) install with no license. To let Codex install premium blocks, icons, and templates too, grab a Pro or Ultimate license - one license unlocks the whole premium registry and removes the daily MCP request limit. Then add your key to the project - two quick steps:
Add your license key
Copy your key from Account → Licenses into .env.local at the project root:
REUI_LICENSE_KEY=your-license-key-hereAdd the @reui registry to components.json
{
"registries": {
"@reui": {
"url": "https://reui.io/r/{style}/{name}.json",
"headers": {
"Authorization": "Bearer ${REUI_LICENSE_KEY}"
}
}
}
}The ${REUI_LICENSE_KEY} reference belongs here, where the shadcn CLI expands it from .env.local. Codex has no equivalent placeholder syntax in config.toml, so the MCP server entry names the variable instead, with bearer_token_env_var or env_http_headers as shown above.
That is it - Codex can now install any premium item the MCP returns, and free items keep working through the same config. See License Setup for the full guide, or compare plans on the Pricing page.
Troubleshooting
Most hiccups are a stale browser sign-in, and reconnecting fixes them. The one exception is a personal token, which cannot be re-authenticated - it has to be replaced.
- Tools missing, greyed out, or "not connected" - the server did not finish connecting. To fix it, run
codex mcp login reui, then restart Codex./mcpin the TUI shows which servers still need authorizing. - 401 and you signed in through the browser - your ReUI session expired. To fix it, run
codex mcp login reuito sign in again. - 401 and you use a personal token (headless or CI) - the token has expired or been revoked.
codex mcp loginwill not help, because it renews the stored OAuth credential, not the bearer token your job sends. Create a new token at Account → MCP and update the environment variable or CI secret. The 401 body names which of the two it was. - Requests hang or the session drops mid-build - long sessions can lose the connection. To fix it, run
codex mcp login reuiand retry your last prompt. - Sign-in appears to work but every call still 401s - check whether you have a
bearer_token_env_var,http_headers, orenv_http_headersline on thereuiserver inconfig.toml. A configured credential is sent on every request and overrides the OAuth credential the sign-in stores, so while it is there runningcodex mcp login reuicannot take effect. The two are alternatives, not layers: use the header only on the headless path, and remove it if you want the browser sign-in. - 429 "daily limit reached" - you hit the free limit of 100 tool calls per day. Sign in with your ReUI license for unlimited access, or wait for the next day.
- Every ReUI call fails and nothing asks you to sign in - the stored OAuth connection is dead (revoked, expired, or invalidated after a suspicious reuse), and the client is silently retrying a credential that can never work again. Account → MCP shows the connection as Disconnected when this is the case. Reconnect the same way as the 401 fix above; retrying without signing in again cannot recover it.