UIR

MCP Server

Let Claude Code and other AI assistants find UIR components and add them to your app.

The UIR CLI includes an MCP server. Connect it to your AI assistant and it can search the components, read their props and source, and copy them into your project, then use them the way the docs show.

It runs locally with npx. There's nothing to sign up for and no API key.

Claude Code

Run this in your project folder:

claude mcp add uir -- npx -y @codewithrabby/ui@latest mcp

On Windows, wrap it in cmd /c so npx can start:

claude mcp add uir -- cmd /c npx -y @codewithrabby/ui@latest mcp

Run that in PowerShell or Command Prompt. Git Bash rewrites /c into a path and the server won't start; if you use it, put MSYS_NO_PATHCONV=1 in front of the command.

Then start Claude Code and run /mcp to check that uir is connected.

Share it with your team

Add --scope project to save it in .mcp.json at the project root. Commit that file and everyone on the team gets the server. You can also write the file by hand:

.mcp.json
{
  "mcpServers": {
    "uir": {
      "command": "npx",
      "args": [
        "-y",
        "@codewithrabby/ui@latest",
        "mcp"
      ]
    }
  }
}

Other clients

Any MCP client that can start a local (stdio) server works. Cursor (.cursor/mcp.json), Windsurf and Claude Desktop use the same mcpServers shape as above. On Windows, use cmd as the command:

{
  "mcpServers": {
    "uir": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@codewithrabby/ui@latest",
        "mcp"
      ]
    }
  }
}

VS Code uses servers in .vscode/mcp.json:

.vscode/mcp.json
{
  "servers": {
    "uir": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@codewithrabby/ui@latest",
        "mcp"
      ]
    }
  }
}

Tools

ToolWhat it does
search_componentsFind components by what they do: “toast”, “swipe gesture”, “form validation”.
list_componentsEvery component with a short description and its dependencies.
get_componentProps, usage example, install command and the full source of one component.
add_componentsCopies components into your project and returns the command to install anything missing.
get_setup_instructionsChecks your project (Expo, base packages, GestureHandlerRootView, uir.json) and says what's missing.

add_components follows your uir.json. Without one, it puts files in src/components/uir (or components/uir). It writes component files only; your assistant runs the npx expo install command it gets back, so you see and approve it.

Example prompts

  • Add a toast to my app and show a success toast after saving the profile.
  • Build a sign-up screen with UIR's FormField: name, email, password and repeat password.
  • Which UIR components could I use for an onboarding flow?
  • Replace my bottom tabs with UIR's TabBarMenu and put Settings and Wallet in the avatar menu.