---
title: Search and AI
description: The search dialog, Markdown copies of every page, and llms.txt.
url: https://hexelstudio.com/docs/reference/search-and-ai
---

## Search

Open search from the search field in the sidebar, or with Ctrl+K (Cmd+K on a Mac) or the / key.

The index is built with the site and served as a static file, `/docs/search.json`. It holds each page's title, description, headings and up to 8,000 characters of text. The browser downloads it the first time search opens; there is no search service to run.

Results rank title matches first, then headings, the description and body text. Every word you type must appear on the page. A heading that matches gets its own result that jumps straight to that section.

Before you type, the dialog suggests the pages listed in `search.suggestions` in `docs.config.ts`.

<Info>
  The index suits a few hundred pages. Past that, swap `lib/search-types.ts` for a hosted index such as Algolia or Orama Cloud; the dialog only needs a list of results.
</Info>

## Markdown copies

Add `.md` to any page URL to get its source:

```bash
curl https://hexelstudio.com/docs/get-started/quickstart.md
```

The file has the page's frontmatter plus its URL, and links inside it are absolute, so it can be pasted anywhere.

## Copy page

The **Copy page** button copies that Markdown. Its menu can also open the Markdown, or open ChatGPT, Claude or Perplexity with a prompt that points at it. Choose the assistants with `pageActions.openIn` in `docs.config.ts`.

## MCP server

The site runs a [Model Context Protocol](https://modelcontextprotocol.io) server at `https://hexelstudio.com/docs/mcp`, so editors and agents can search and read the docs directly. It is stateless, needs no sign-in, and serves only public pages.

| Tool | What it does |
| --- | --- |
| `search_hexel_studio` | Searches guides and the API reference; returns titles, URLs and excerpts |
| `get_page_hexel_studio` | Returns one page as Markdown, from a URL, a `/docs/...` path or a slug |
| `list_pages_hexel_studio` | Lists every page with its description |

The **Copy page** menu copies the server URL, or installs it in Cursor or VS Code with one click. To add it by hand, use this configuration:

```json mcp.json
{
  "mcpServers": {
    "hexel-studio-docs": { "url": "https://hexelstudio.com/docs/mcp" }
  }
}
```

Set the server's name and the editors offered under `pageActions.mcp` in `docs.config.ts`.

## llms.txt

| URL | Contents |
| --- | --- |
| `/docs/llms.txt` | Every page, grouped by tab, with its description and a link to its Markdown ([llmstxt.org](https://llmstxt.org) format) |
| `/docs/llms-full.txt` | The Markdown of every page in one file |
| `/docs/sitemap.xml` | Every page, for search engines |

All three are generated at build time from the same navigation, so they never list a page the site does not publish.
