# API references, search and AI

Every published docs site comes with search, Markdown copies of its pages and an MCP server, so people and AI assistants can find and read your documentation. You can add API references from OpenAPI documents, and see how the site is read in analytics. This page covers all of these.

## API references

An API reference turns an OpenAPI document into reference pages on the site: an overview with servers and authentication, and one page per operation with its parameters, request and response schemas, and an example `curl` request.

### Add one

:::steps
### Upload the document
Open **API reference** in the site's menu. Under **Upload OpenAPI**, enter a **Name** (for example "Payments API"), an optional **Address** (derived from the name when empty), choose the file and **Upload**. EvoHub accepts OpenAPI 3.0 and 3.1 as `.json`, `.yaml` or `.yml`, up to 2 MB.

### Check the result
The document is validated when you upload it. Problems that stop it are listed; smaller issues are shown as warnings. References to other files or URLs (remote `$ref`s) are not fetched — they show as placeholders with a warning, so keep the document self-contained.

### Publish
A new reference starts as a draft. **Publish** puts it on the site at `/<address>`. Readers see it once the site itself is published.
:::

To update a reference, use **Replace file**. Readers keep seeing the published version until you choose **Publish changes**. On a site that requires review, references go live through a change request like pages. A reference's address cannot be the same as a page's address on the same site.

In a GitHub repository, put OpenAPI files in the `_openapi/` folder. See [Docs as code with GitHub](https://docs-dev.evohub.io/github-sync.md#links-images-snippets-and-api-references).

## What readers get

### Search

Every site has full-text search over its published pages and API operations. Readers open it with the search box, by pressing `/`, or with `Ctrl+K` (`⌘K` on a Mac). Pages limited to an audience appear only for readers who may see them.

### Reading experience

Readers get the navigation, an "On this page" outline, previous and next links, a light/dark switch (unless the theme fixes one), copy buttons on code, and, where you have them, version and language switchers. The site's own labels are shown in the reader's language when the site has several. See [Docs overview](https://docs-dev.evohub.io/docs-overview.md#theme).

### Use with AI

Every page has a **Use with AI** menu with:

- **Copy page** — the page as Markdown, for pasting into an AI tool.
- **View as Markdown** — the page as plain Markdown.
- **Open in Claude** and **Open in ChatGPT** — start a conversation about the page.
- **Connect to Cursor / VS Code / Claude** — the site's MCP server address, with one-click setup for Cursor and VS Code.

## For AI tools

These addresses are on the site's own domain (shown in **Settings**, **AI & LLMs** once the domain is active):

| Address | What it is |
| --- | --- |
| `/llms.txt` | An index of every page, following [llmstxt.org](https://llmstxt.org). |
| `/llms-full.txt` | The whole site in one Markdown file. |
| `/<page>.md` | Any page as Markdown. Requesting a page with `Accept: text/markdown` works too. |
| `/mcp` | An MCP server (Streamable HTTP). |

Pages marked **Hide from search engines** are left out of `llms.txt` and the sitemap.

### MCP server

The MCP server lets an assistant search and read the docs as tools:

| Tool | What it does |
| --- | --- |
| `search_docs` | Full-text search over pages and API operations. |
| `get_page` | One page, API reference overview or operation, as Markdown. |
| `list_pages` | Every page in reading order, grouped by section, and the API references. |
| `list_api_operations` | The operations of the API references, with their ids. |
| `get_api_operation` | One operation as Markdown, with a `curl` example. |

To connect it, for example in Claude Code:

```bash
claude mcp add --transport http acme-docs https://docs.example.com/mcp
```

**Settings**, **AI & LLMs** shows the exact command and configuration for Claude Code, Claude Desktop, Cursor and VS Code. On a private site, AI tools need a read token. See [Private docs](https://docs-dev.evohub.io/private-docs.md#read-tokens-for-ai-tools).

### AI crawlers

**Allow AI crawlers** (in **Settings**, **AI & LLMs**) decides what the site's `robots.txt` says to AI crawlers such as GPTBot, ClaudeBot, PerplexityBot, Google-Extended and CCBot. It is on by default. Turning it off asks them to stay away; search engines are not affected.

## Analytics

Turn analytics on in **Settings**, **Analytics** with **Count visits, searches and AI readers**, then open **Analytics** in the site's menu. You can filter by date range, version and language, and export each report as CSV.

| Tab | What it shows |
| --- | --- |
| **Overview** | Page views and visitors per day, top pages, referrers, countries, devices, versions and languages. |
| **Search** | What readers search for, searches with no results, and which results they click. |
| **AI readers** | Requests from AI assistants and crawlers by kind (Markdown pages, `llms.txt`, MCP and so on), by agent, and the pages they read. |
| **Feedback** | Answers to "Was this page helpful?" per page, and the comments. |

How readers are counted:

- No cookies, and no IP address or browser details are stored. A reader is told apart for one day by a hash that changes every day, so visitors are counted per day.
- Readers who send Do Not Track or Global Privacy Control, and bots, are not counted. Nothing is counted on previews.
- Searches that look like an email address, a long number or a key are never stored.
- Choose how long to keep visit and search figures: 30, 90 or 180 days, 1 year or 2 years. Older figures are deleted automatically.

You can also add a **GA4 measurement ID** or a **Segment write key**. They load only when filled in, never on previews, and never for readers who send Global Privacy Control. Those tools set cookies, so asking readers for consent is up to you.

### Page feedback

With **Show "Was this page helpful?" on every page** on, readers answer **Yes** or **No** at the bottom of each page and can leave a comment. In **Analytics**, **Feedback**, mark comments **Resolve** (or **Reopen**), delete them, or export them. Feedback is kept for two years or until you delete it.

## Related

- [Docs overview](https://docs-dev.evohub.io/docs-overview.md)
- [Private docs](https://docs-dev.evohub.io/private-docs.md)
- [Docs as code with GitHub](https://docs-dev.evohub.io/github-sync.md)
