# For agents

> Three steps: connect, ask, check. Your agent gets the docs, the code and a reviewer.

## 1. Connect

Add the read-only MCP server (Streamable HTTP) at `https://ui.dtheo.dev/mcp`.

### Claude Code

```bash
claude mcp add --transport http dtheo https://ui.dtheo.dev/mcp
```

### Cursor

`.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "dtheo": {
      "url": "https://ui.dtheo.dev/mcp"
    }
  }
}
```

### VS Code

```bash
code --add-mcp '{"name":"dtheo","type":"http","url":"https://ui.dtheo.dev/mcp"}'
```

`.vscode/mcp.json`:

```json
{
  "servers": {
    "dtheo": {
      "type": "http",
      "url": "https://ui.dtheo.dev/mcp"
    }
  }
}
```

### Codex

`~/.codex/config.toml`:

```toml
[mcp_servers.dtheo]
url = "https://ui.dtheo.dev/mcp"
```

### Other

`mcp.json`:

```json
{
  "mcpServers": {
    "dtheo": {
      "url": "https://ui.dtheo.dev/mcp"
    }
  }
}
```

## 2. Ask

```md
Build the run review screen with the dtheo/ui design system.
Look components up with the dtheo MCP server before writing code,
add them with `npx dtheo add`, use only token classes for color,
and run `npx dtheo check` until it reports 0 errors.
```

## 3. Check

```bash
npx dtheo check src
```

It exits with 1 on errors and prints the fix for each finding. Add it to CI.

## What it can call

| Tool | What it returns |
| --- | --- |
| `list_components` | Every component, one line each |
| `get_component` | The contract: install, props, do and don’t, keyboard |
| `get_component_source` | The source files, ready to write |
| `search_docs` | Ranked matches across components, foundations and patterns |
| `get_tokens` | Color roles and geometry for a preset and mode |
| `get_guidelines` | Color, type, geometry, motion or writing rules |
| `check_ui_code` | Design-check findings for a snippet, with fixes |

The same tools are offered to in-page agents through WebMCP when the browser supports it.

## No MCP? Use these

- `https://ui.dtheo.dev/llms.txt`: a described index of every page.
- `https://ui.dtheo.dev/llms-full.txt`: every page in one file.
- Any docs URL + `.md`: the Markdown copy of that page (e.g. `/docs/components/button.md`).
- `https://ui.dtheo.dev/r/registry.json`: every installable item in the shadcn registry format.

Run `npx dtheo rules` to see every rule the check enforces.
