# MCP server

Give your AI assistant the Cozy UI docs. `@0xtrou/cozy-ui-mcp` is a Model Context Protocol server with every component’s docs, install commands, tokens and palettes. It runs locally over stdio and works offline.

## Claude Code

```bash
claude mcp add cozy-ui -- npx -y @0xtrou/cozy-ui-mcp
```

## Claude Desktop, Cursor, VS Code

mcp config:

```json
{
  "mcpServers": {
    "cozy-ui": { "command": "npx", "args": ["-y", "@0xtrou/cozy-ui-mcp"] }
  }
}
```

## mcpfs

[mcpfs](https://github.com/openai/mcpfs) mounts MCP servers as a read-only folder, so agents and scripts can use `ls`, `cat` and `grep` on the docs, and run tools as commands.

```bash
npm install -g @0xtrou/cozy-ui-mcp
mkdir -p /tmp/cozy
mcpfs-fusefs mount stdio:// /tmp/cozy -- cozy-ui-mcp

ls /tmp/cozy/resources/cozy-ui/components
cat /tmp/cozy/resources/cozy-ui/components/sheet.md
/tmp/cozy/tools/get_install_command --components '["button","sheet"]' --method npm
/tmp/cozy/search 'sticky header'

fusermount3 -u -- /tmp/cozy
```

## Resources

| URI | What |
|---|---|
| `cozy-ui://overview.md` | What Cozy UI is and every page of the docs |
| `cozy-ui://install.md` | npm and shadcn CLI install steps |
| `cozy-ui://palettes.md` | The five palettes and their colour roles |
| `cozy-ui://tokens.json` | All design tokens |
| `cozy-ui://components/<slug>.md` | One per component: description, install, usage, props, example and source |

## Tools

| Tool | Input | Returns |
|---|---|---|
| `list_components` | `–` | Every component with a one-line description |
| `get_component` | `name` | The full docs of one component |
| `search_docs` | `query, limit?` | Best matches with excerpts |
| `get_install_command` | `components[], method? (npm \| shadcn)` | The exact install command and import |

Prefer plain text? The same content is at [llms.txt](https://cozy-ui.solo.engineer/llms.txt) and [llms-full.txt](https://cozy-ui.solo.engineer/llms-full.txt).

Docs: https://cozy-ui.solo.engineer/docs/mcp/
