Agent-friendly
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.
More and more developers read docs through AI assistants and write integration code with coding agents. ButterIX treats these readers as first-class citizens:
The .mdx source or Accept: text/markdown
Site-wide index and full text
Search the docs right from your IDE
One command installs them in a coding agent
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 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:
Append .mdx to any page URL to get the page's source as its author wrote it, with components left as MDX:
curl https://acme-payments-sites.butterix.com/guides/features/agents.mdxThe 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.
When the Accept request header prefers text/markdown, the runtime returns Markdown directly for the same URL:
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.
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
.mdin 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. The connect and copy MCP entries are hidden when the site's MCP is off or the site is password protected.
Page directive
The clean Markdown starts with a blockquote that tells agents how to read on:
> 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 on; for what is sent, see Analytics › Feedback. Replace it with your own text in agents.page-directive; an empty string leaves it out:
agents:
page-directive: |
Read https://docs.acme.com/llms.txt first.
Prefer TypeScript in code samples.With several versions or products, 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 apply to
.mdand.mdxURLs 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 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 |
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 starts like this:
# 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 server at /_mcp/server, using the Streamable HTTP transport (JSON responses). Public sites need no authentication; for password-protected sites see Access control. It provides these tools:
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).
Gets a page's full Markdown by URL. Parameters: path (page path or full URL, for example /guides/get-started/quickstart).
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.
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):
claude mcp add --transport http acme-docs https://docs.acme.com/_mcp/server// ~/.cursor/mcp.json or .cursor/mcp.json in your project
{
"mcpServers": {
"acme-docs": {
"url": "https://docs.acme.com/_mcp/server"
}
}
}// .vscode/mcp.json
{
"servers": {
"acme-docs": {
"type": "http",
"url": "https://docs.acme.com/_mcp/server"
}
}
}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
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 in the API reference for the full request and response format.
Turn MCP off
agents:
mcp: false/_mcp/server then returns 404, and the page menu, page directive, and Ask AI no longer mention it.
To let a coding assistant look up your sites' deployments, analytics, questions, and feedback, use the organization MCP server.
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.Hosted skills
Put skills in .well-known/agent-skills/ at the project root (next to docs.yml) to publish them with the site:
docs
.well-known
agent-skills
acme-payments
references
---
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:
npx skills add https://docs.acme.comThe 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; namematches the folder and uses only lowercase letters, digits, and single hyphens, up to 64 characters;descriptionis present, up to 1024 characters;- All skill files together are at most 20 MB;
- Your own
index.jsonis valid JSON with askillslist.
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.
Link parameters
| Parameter | Effect |
|---|---|
?ask-ai | Opens the page with the chat panel 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 --skillwrites it to.claude/skills/butterix-docs, or install it withnpx skills add https://docs.butterix.com. It contains writing rules, a workflow, and references for the configuration and every component. biti initgeneratesAGENTS.md, explaining where content lives and what to do after making changes.biti check --jsonoutputs machine-readable diagnostics (error code, file, line, hint) that agents can use to correct themselves;--stricttreats warnings as errors too.biti components --jsonlists every component and its props, so agents don't have to guess component names.- MDX only allows literal props (see Safe subset), so content written by agents can't execute arbitrary code.
{
"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.