# MCP server

The PixilUI MCP server lets your coding agent search the library, read an item and install it without leaving the chat. It is live at `https://mcp.pixilui.com/mcp`, speaks streamable HTTP, and needs no account for free items.

## Two addresses

| Address | For | Login |
| --- | --- | --- |
| `https://mcp.pixilui.com/mcp` | Free items, and Pro with an access token | None |
| `https://mcp.pixilui.com/mcp/pro` | Pro and Team | The client opens the PixilUI login in your browser |

Use `/mcp/pro` if you have Pro or Team, `/mcp` otherwise. Both serve every free item.

## Claude Code

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

With Pro or Team, add the login address instead, then run `/mcp` in a session (or `claude mcp login pixilui`) to log in:

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

`claude -p` and Agent SDK runs cannot open a browser: log in once in an interactive session first, or use a token (below).

## Cursor

Add it to `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for every project:

```json
{
  "mcpServers": {
    "pixilui": { "url": "https://mcp.pixilui.com/mcp/pro" }
  }
}
```

Cursor starts the login when it connects; Settings, MCP shows the server waiting until you finish it in the browser. For free items only, use `https://mcp.pixilui.com/mcp`.

## VS Code

Copilot agent mode reads `.vscode/mcp.json`:

```json
{
  "servers": {
    "pixilui": { "type": "http", "url": "https://mcp.pixilui.com/mcp/pro" }
  }
}
```

Start the server; VS Code asks to allow the login and opens the browser.

## Codex

Add it to `~/.codex/config.toml`:

```toml
[mcp_servers.pixilui]
url = "https://mcp.pixilui.com/mcp"
bearer_token_env_var = "PIXILUI_TOKEN"
```

Or run `codex mcp add pixilui --url https://mcp.pixilui.com/mcp`. Without `PIXILUI_TOKEN` set, Codex gets every free item.

## Free and Pro

Without a login or token the server answers every question about every item, and returns source and install commands for free items. For a Pro item it returns the description, props and notes, says it needs a licence, and offers the free item closest to the job. The server tells agents never to rebuild a Pro item from its description.

Logged in with Pro or a Team seat, Pro items install like free ones. A login without a licence still gets every free item; Pro tools say what is missing.

## Logging in

The first time a client connects to `/mcp/pro`, your browser opens the PixilUI login (Google, GitHub or email), then a consent screen naming the client. Approve it and the client keeps the session. There is nothing to copy and no token in a config file.

## Tokens for CI

Headless agents and CI cannot open a browser. Create an access token on [your account](https://pixilui.com/account), keep it in a secret, and send it to `/mcp`:

```bash
claude mcp add --transport http pixilui https://mcp.pixilui.com/mcp --header "Authorization: Bearer $PIXILUI_TOKEN"
```

In Cursor add `"headers": { "Authorization": "Bearer ${env:PIXILUI_TOKEN}" }` next to the `url`. A revoked token, or one whose licence has ended, falls back to free items.

The shadcn CLI cannot use the browser login either: `npx shadcn add` for a Pro item reads `PIXILUI_TOKEN` from `.env.local`. The [CLI](/docs/cli) writes it for you with `npx pixilui@latest login`.

## Tools

| Tool | Does |
| --- | --- |
| `search_items` | Finds items by what the UI has to do ("ask before the agent sends an email") |
| `list_items` | Every item, by category and tier |
| `get_item` | When to use it and when not, props, keyboard, accessibility, motion and notes for AI |
| `get_install_command` | One shadcn command for every item you need, with the `components.json` entry |
| `get_source` | The files with their paths, for projects that cannot run the CLI, or the single-file version |
| `get_skill` | The PixilUI agent skill |

## Try a prompt

Once connected, ask your agent:

```text
Find a PixilUI component that asks before the agent sends an email, read it, and install it.
```

```text
Add a PixilUI run timeline to the agent page and wire it to our run events. Read the item first.
```

## What it records

Each time the server hands an item to your agent (an install command, source, or a Pro item with source), it records the item name, its tier (free or Pro), that it came through MCP, and the time. When you are logged in or send a token, the record also holds your account id and token id, so installs count against your licence. When a client connects with the browser login, we also count that connection against your account id, with whether you hold Pro. Nothing else: no prompts, no searches, no project names, no file paths, no IP address. Requests are limited to 120 a minute; the limit reads your IP address and does not store it. Cloudflare, which hosts the server, keeps standard request logs. The [privacy policy](https://pixilui.com/privacy) says the same.
