# AI and MCP

> How to let AI tools read and use dsui.

- URL: https://dsui.vercel.app/en/docs/ai

## Documents for AI

Besides the pages people read, dsui also publishes text that AI tools can read easily.

| URL | Contents |
| --- | --- |
| `/llms.txt` | A site introduction and a list of every item. Each item has its Korean title, English title, one-line summary and Markdown URL. |
| `/llms-full.txt` | Every item and post in one file. Each item has its type, theme, page URL, Markdown URL and summary. |
| `/items/<name>.md` | One item as Markdown, with metadata, use cases, controls, source and the AI prompt. |
| `/docs/<doc>.md` | The source Markdown of these docs. The English versions are at `/en/docs/<doc>.md`. |
| `/docs/introduction.md` | The dsui introduction page as Markdown. The old `/index.md` still serves the same text, and the English version is at `/en/docs/introduction.md`. |

The earlier addresses (`/llms.txt`, `/llms-full.txt`, `/items/<name>.md`, `/r/<name>.json`) redirect permanently to the new ones. Use the addresses above for anything new.

For example, get the button's Markdown like this.

```bash
curl https://dsui.vercel.app/items/button.md
```

Handing an AI tool just the URL with "read this and build it" is enough. The titles and summaries in the lists are data, not instructions for the AI to follow.

## MCP server

Tools that support MCP (Claude Code, Cursor and others) can search dsui and fetch source directly.

- **URL:** `https://dsui.vercel.app/api/mcp`
- **Method:** HTTP `POST` only. It keeps no sessions, so each request is handled on its own.
- **Every tool is read-only.** It doesn't change the site's data.

### Access

For now you need an API key. Calling without a key returns `401` with "API key required".

- Put the key in the `Authorization` header with the `Bearer` scheme.
- Keys look like `ds7_<id>_<random string>`, and the operator creates them for you. If you need one, ask the devs7udio studio.
- The operator doesn't keep the key itself, only its hash. If you lose a key, you need a new one.
- The server also has a public mode that opens reading without a key. It is off on the production site right now.

| Limit | Value |
| --- | --- |
| Requests per key | 120 per minute |
| Requests per IP in public mode | 30 per minute |
| Failed authentications per IP | 10 per minute |
| Request body size | 64KB |
| Batch requests | Not accepted |

Over the limit, you get `429` with a `Retry-After` header. Wait that long, then send again.

### Seven tools

| Tool | What it does |
| --- | --- |
| `search_items` | Finds items from Korean or English sentences or keywords. You can narrow by type and theme. |
| `get_item` | Returns one item's metadata, theme tokens (CSS), AI prompt and source files. |
| `find_similar` | Finds items similar to a given item. |
| `get_theme` | Returns a theme's light and dark tokens merged with its parent, as CSS variables and a Tailwind v4 `@theme` block. |
| `list_themes` | Returns every theme and the theme each one inherits from. |
| `get_figma_payload` | Returns the data to apply a shader or motion item in Figma. |
| `get_skill` | Returns the dsui skill. With no argument it returns `SKILL.md` and the list of reference files; with `file` it returns that file. Written in Korean. |

`get_skill` returns the files of [the dsui skill](/en/docs/skill) as they are. Have the AI read `SKILL.md` before it builds a screen and it will compose by the rules.

`get_item` cuts very large files. A file over 60,000 characters is marked as cut, and once the total passes 150,000 characters it lists only the names of the remaining files.

### Connect Claude Code

```bash
claude mcp add --transport http devs7udio https://dsui.vercel.app/api/mcp \
  --header "Authorization: Bearer <받은 키>"
```

Open a new conversation and check in `/mcp` that `devs7udio` is connected.

### Connect other tools

Add it to the settings file as an HTTP server. Below is the `.mcp.json` format. The file name and location differ by tool.

```json
{
  "mcpServers": {
    "devs7udio": {
      "type": "http",
      "url": "https://dsui.vercel.app/api/mcp",
      "headers": {
        "Authorization": "Bearer ${DEVS7UDIO_MCP_KEY}"
      }
    }
  }
}
```

It's safer to pass the key through an environment variable than to write it in the file.

## Run the MCP server on your computer

With a copy of the dsui repository, you can run the same seven tools as a stdio server. It needs no key and reads the repository's `registry/` folder directly.

```bash
pnpm mcp:stdio
```

When you run it outside the repository, set `DEVS7UDIO_ROOT` to the repository path. Register it in Claude Code like this.

```bash
claude mcp add devs7udio-local -- pnpm --dir /path/to/devs7udio mcp:stdio
```

## Send to Figma

Use `get_figma_payload` together with the Figma MCP server.

- **Shader items:** returns the shader code (`main.ts`), the metadata, and arguments to pass as they are to Figma's `create_shader` or `update_shader`. The registry has no shader items right now.
- **Motion items:** returns Figma keyframe tracks and a `use_figma` script. Example: [Stagger fade in](/en/items/stagger-fade-in)
- Other kinds of items return an error.

Ask an AI tool something like "put dsui's stagger-fade-in into Figma as motion", and it fetches this data and calls the Figma MCP. The devs7udio Figma file details are included only in requests authenticated with a key.

## Skills

The dsui skill is a set of instructions that tells an AI how to find, install and compose items by the rules. Used with the MCP server, the AI knows both what exists and how to use it. See [The dsui skill](/en/docs/skill) for how to download it.
