---
title: Agent-friendly
subtitle: Help AI read accurately, find things, and put them to use — every page has a Markdown version, llms.txt is generated automatically, every site comes with its own MCP server, and you can publish skills.
description: ButterIX features for AI and coding agents — the .mdx source and clean Markdown of every page with a page directive, Accept content negotiation, Markdown 404s, page actions with one-click MCP setup, llms.txt and llms-full.txt, the site MCP server (search_docs, get_page, list_pages, send_feedback), hosted skills, API specs and the API catalog, link parameters, and the writing skill and biti check --json for agents that edit docs.
---

More and more developers read docs through AI assistants and write integration code with coding agents. ButterIX treats these readers as first-class citizens:

<CardGroup cols={2}>
  <Card title="Markdown for every page" icon="lucide:file-code" href="#markdown-for-every-page">
    The `.mdx` source or `Accept: text/markdown`
  </Card>
  <Card title="llms.txt" icon="lucide:file-text" href="#llmstxt">
    Site-wide index and full text
  </Card>
  <Card title="MCP server" icon="lucide:plug" href="#site-mcp-server">
    Search the docs right from your IDE
  </Card>
  <Card title="Skills" icon="lucide:wand-sparkles" href="#hosted-skills">
    One command installs them in a coding agent
  </Card>
</CardGroup>

## Markdown for every page

At build time every page also outputs a clean Markdown version: components are converted to equivalent Markdown structures (callouts become blockquotes, code groups expand into multiple code blocks, tabs expand into subsections…). API endpoint pages include field tables for parameters and the request body, a cURL example, the response fields of every status code, and a response example; [snippet components](../components/endpoint-request-snippet.mdx) that reference endpoints expand into the actual code and field tables.

Links to other pages of the site, in text and in components, become absolute URLs to the `.md` of the target page (e.g. `https://docs.acme.com/prices/basic.md`), and images and files are absolute too, so an AI given a single page can keep reading.

How to get it:

<Tabs>
  <Tab title="Add a .mdx suffix">
    Append `.mdx` to any page URL to get the page's source as its author wrote it, with components left as MDX:

    ```bash
    curl https://acme-payments-sites.butterix.com/guides/features/agents.mdx
    ```

    The site root page maps to `/index.mdx`, and the `.md` suffix redirects to `.mdx`. Generated pages such as endpoint pages and the changelog have no source: both `.md` and `.mdx` return their clean Markdown.
  </Tab>
  <Tab title="Content negotiation">
    When the `Accept` request header prefers `text/markdown`, the runtime returns Markdown directly for the same URL:

    ```bash
    curl https://acme-payments-sites.butterix.com/guides/features/agents \
      -H "Accept: text/markdown"
    ```

    HTML responses also carry a `Link: </guides/features/agents.md>; rel="alternate"; type="text/markdown"` header, and the page `<head>` has a matching `<link rel="alternate">`, so agents can discover the Markdown version.
  </Tab>
  <Tab title="Page actions">
    Below every page title is a set of buttons:

    - **Copy page**: copies the Markdown to the clipboard to paste into any AI.
    - **View Markdown**: opens the `.md` in a new tab.
    - **More**: open in ChatGPT or Claude (the prompt includes the full URL of the page's `.md`); connect Claude Code (copies the install command), Cursor, or VS Code (opens the editor to install it); or copy the MCP URL.

    Choose which ones show with [`theme.page-actions`](../configuration/docs-yml.mdx#theme). The connect and copy MCP entries are hidden when the site's MCP is off or the site is password protected.
  </Tab>
</Tabs>

### Page directive

The clean Markdown starts with a blockquote that tells agents how to read on:

```markdown
> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.acme.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.acme.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.acme.com/_biti/feedback/agent.
```

All pages have it, including endpoint pages and the changelog. The index URL follows the page's language, the MCP line appears only when the site has an MCP server, and the last line only on hosted sites with [page feedback](../configuration/docs-yml.mdx#page-feedback) on; for what is sent, see [Analytics › Feedback](./analytics.mdx#feedback). Replace it with your own text in `agents.page-directive`; an empty string leaves it out:

```yaml title="docs.yml"
agents:
  page-directive: |
    Read https://docs.acme.com/llms.txt first.
    Prefer TypeScript in code samples.
```

With several [versions or products](./versions.mdx), the directive is preceded by a note on which version or product the page belongs to, with the index URLs of the others.

The directive is only in the clean Markdown: page sources, web pages, Copy page, `llms-full.txt`, and Ask AI don't include it.

### Redirects and missing pages

- [Redirects](./seo.mdx#redirects) apply to `.md` and `.mdx` URLs too, ending at the target page's source and keeping the query string.
- A request for Markdown that doesn't exist gets a 404 status and a Markdown body listing the pages with the most similar URLs and the index of all pages.

## llms.txt

At build time two files are generated for each language (following the [llmstxt.org](https://llmstxt.org) convention):

| File | Contents |
|---|---|
| `/llms.txt` | Site title, summary (`agents.llms-txt.description` or `description`), and links to all pages grouped by tab (pointing to `.md`) with one-line descriptions |
| `/llms-full.txt` | The full Markdown of all pages concatenated, suitable for putting into context in one go |
| `/en/llms.txt`, `/en/llms-full.txt` | English version |
| `/v0/llms.txt` and so on | One index per other version and product, at its path plus `/llms.txt` (except hidden versions) |
| `/changelog.md`, `/changelog/llms.txt` | One pair per changelog (or blog): the latest 20 entries in full Markdown, and an index of every entry; see [Changelog](../configuration/changelog.mdx#agent-friendly-output) |

The `llms.txt` at the root and of each language only includes default-version pages that aren't hidden or set to `noindex`. On sites with an API, a final **Specifications** section lists where to download each spec. `llms-full.txt` also leaves out `noindex` pages.

### Take only what you need

Add parameters to the address to leave out what you don't need and save the AI some context:

| Parameter | On | Leaves out |
|---|---|---|
| `?excludeSpec=true` | `llms.txt` | The **Specifications** section |
| `?excludeChangelog=true` | `llms.txt`, `llms-full.txt` | Changelogs and blogs |

The two can be combined. `true`, `1` or the bare name all turn a parameter on. When the site has nothing to leave out, `llms.txt` doesn't mention the parameter and returns the whole file even with it.

 This site's [`/llms.txt`](/llms.txt) starts like this:

```markdown title="llms.txt"
# ButterIX

> Official ButterIX documentation: docs.yml configuration, MDX components, OpenAPI reference, versions and internationalization…

For the MDX source of any page, append `.mdx` to its URL. Full content: https://docs.butterix.com/llms-full.txt

## Guides

- [ButterIX Docs](https://docs.butterix.com/guides/get-started/introduction.md): ButterIX is a platform that builds API documentation sites from OpenAPI and MDX…
- [Quickstart](https://docs.butterix.com/guides/get-started/quickstart.md): Install the biti CLI…
```

## Site MCP server

Every hosted site provides a [Model Context Protocol](https://modelcontextprotocol.io) server at `/_mcp/server`, using the Streamable HTTP transport (JSON responses). Public sites need no authentication; for password-protected sites see [Access control](../deploy/access-control.mdx#ai-tools-and-programs). It provides these tools:

<ParamField path="search_docs" type="tool">
  Searches the site and returns the most relevant passages with their URLs. Parameters: `query` (required, natural language or keywords), `limit` (1–20, default 6), `locale` (a language code such as `en`).
</ParamField>

<ParamField path="get_page" type="tool">
  Gets a page's full Markdown by URL. Parameters: `path` (page path or full URL, for example `/guides/get-started/quickstart`).
</ParamField>

<ParamField path="list_pages" type="tool">
  Lists the title, URL, and description of every page in one language. Parameters: `locale`.
</ParamField>

<ParamField path="send_feedback" type="tool">
  Tells the docs team that a page is wrong, out of date, or missing something. Parameters: `page` (the page's URL), `message` (required, up to 2000 characters). Only on hosted sites with page feedback on; at most 5 per address per minute.
</ParamField>

The `locale` parameter exists only on sites with several languages. Without it, `search_docs` goes by the language of the query, or the default language when that can't be told, and returns other languages only when that one has no results; `list_pages` lists the default language. A language the site doesn't have returns an error listing the available ones.

The search index only includes default-version pages. Each IP is limited to 120 calls per minute.

### Set it up in coding tools

Replace the URL below with your docs site's URL (for hosted sites, get it from "Copy MCP URL" on the site overview page in the dashboard):

<CodeGroup>
```bash Claude Code
claude mcp add --transport http acme-docs https://docs.acme.com/_mcp/server
```

```jsonc Cursor
// ~/.cursor/mcp.json or .cursor/mcp.json in your project
{
  "mcpServers": {
    "acme-docs": {
      "url": "https://docs.acme.com/_mcp/server"
    }
  }
}
```

```jsonc VS Code
// .vscode/mcp.json
{
  "servers": {
    "acme-docs": {
      "type": "http",
      "url": "https://docs.acme.com/_mcp/server"
    }
  }
}
```
</CodeGroup>

Once configured, just ask in the conversation (for example, "Use acme-docs to find out how to verify webhook signatures"), and the agent calls `search_docs` first, then reads the full page with `get_page`.

### Call it manually

```bash
curl -X POST https://docs.acme.com/_mcp/server \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_docs","arguments":{"query":"custom domain","limit":3}}}'
```

See [MCP server](/api-reference/runtime/mcp) in the API reference for the full request and response format.

### Turn MCP off

```yaml title="docs.yml"
agents:
  mcp: false
```

`/_mcp/server` then returns 404, and the page menu, page directive, and Ask AI no longer mention it.

<Info>
  To let a coding assistant look up your sites' deployments, analytics, questions, and feedback, use the [organization MCP server](../deploy/platform.mdx#organization-mcp-server).
</Info>

<Prompt title="Have an agent write code from your docs" actions={["claude", "chatgpt"]}>
  Using the ButterIX docs MCP server, find out how to create a preview deployment through the platform API, then write a Node.js script that packages the current directory, uploads it as a preview deployment, polls until the deployment finishes, and prints the preview URL.
</Prompt>

## Hosted skills

Put skills in `.well-known/agent-skills/` at the project root (next to `docs.yml`) to publish them with the site:

<Files>
  <Folder name="docs" defaultOpen>
    <File name="docs.yml" />
    <Folder name=".well-known" defaultOpen>
      <Folder name="agent-skills" defaultOpen>
        <Folder name="acme-payments" defaultOpen>
          <File name="SKILL.md" />
          <Folder name="references" defaultOpen>
            <File name="errors.md" />
          </Folder>
        </Folder>
      </Folder>
    </Folder>
  </Folder>
</Files>

```markdown title="SKILL.md"
---
name: acme-payments
description: Create and look up payments with the Acme Payments API. Use when writing payment integration code.
---

# Integrating Acme Payments
…
```

Readers install them with one command:

```bash
npx skills add https://docs.acme.com
```

The build generates an index at `/.well-known/agent-skills/index.json`, and each `SKILL.md` is at `/.well-known/agent-skills/<name>/SKILL.md`. A skill with other files is also packed as a `.tar.gz` that the index points to. If you provide an `index.json`, yours is used.

`biti check` and the build verify that:

- Each skill is a folder with a `SKILL.md`; one without gets a warning and is left out of the index;
- `name` matches the folder and uses only lowercase letters, digits, and single hyphens, up to 64 characters;
- `description` is present, up to 1024 characters;
- All skill files together are at most 20 MB;
- Your own `index.json` is valid JSON with a `skills` list.

## API specs and catalog

Sites with an API reference publish their spec at `/openapi.json` and `/openapi.yaml`, and an API catalog at `/.well-known/api-catalog`, so agents can find every endpoint without parsing pages. See [Download the spec](../api/openapi.mdx#download-the-spec).

## Link parameters

| Parameter | Effect |
|---|---|
| `?ask-ai` | Opens the page with the [chat panel](./ask-ai.mdx#open-the-panel-from-a-link) expanded |
| `?ask-ai=question` | The same, with the question written in the box for the reader to send |
| `?search=words` | Opens search with these words |

Values must be URL-encoded, and work on any page URL.

## Let coding agents edit your docs

ButterIX is designed so that agents like Claude Code and Cursor can safely modify a docs project:

- **Writing skill**: `biti init --skill` writes it to `.claude/skills/butterix-docs`, or install it with `npx skills add https://docs.butterix.com`. It contains writing rules, a workflow, and references for the configuration and every component.
- `biti init` generates `AGENTS.md`, explaining where content lives and what to do after making changes.
- `biti check --json` outputs machine-readable diagnostics (error code, file, line, hint) that agents can use to correct themselves; `--strict` treats warnings as errors too.
- `biti components --json` lists every component and its props, so agents don't have to guess component names.
- MDX only allows literal props (see [Safe subset](../writing/safe-mdx.mdx)), so content written by agents can't execute arbitrary code.

```json title="biti check --json output (excerpt)"
{
  "ok": false,
  "pages": 94,
  "diagnostics": [
    {
      "severity": "warning",
      "code": "link/broken",
      "message": "Link target not found: ./quickstrat.mdx",
      "file": "pages/introduction.mdx"
    }
  ]
}
```

## Understand AI traffic

The hosted platform distinguishes visits from humans, AI crawlers, and AI assistants, and counts `.md` requests, requests for index and spec files, and MCP calls separately; see [Analytics](./analytics.mdx).
