# AI-native documentation Source: https://www.mintlify.com/docs/ai-native Discover how AI-native features enhance reading, writing, and discovering your documentation with the assistant, agent, and Model Context Protocol (MCP) server. When you host your documentation on Mintlify, built-in AI features help your users find answers and your team maintain content more efficiently. Your content provides the context for these AI-native features to improve the experiences of reading, writing, and discovering your documentation. ## What makes your documentation AI-native ### Reading In addition to reading individual pages, users can chat with the [assistant](/docs/assistant) in your documentation for immediate answers to their questions and links to relevant content. The assistant helps guide users through your product with accurate information from your documentation. Embed the assistant into custom apps with the [API](/docs/api/assistant/create-assistant-message-v2) to extend where users can access your documentation. ### Writing The [agent](/docs/agent) helps you write and maintain documentation. It creates pull requests with proposed changes based on your prompts, pull requests, and Slack threads. Add the agent to your Slack workspace so that anyone on your team can help maintain your documentation by chatting with the agent. Or embed the agent into custom apps via the [API](/docs/api/agent/v2/create-agent-job). Create [automations](/docs/automations/index) to run the agent on a schedule or on a push to a repository. Each automation defines a prompt for the agent and a trigger for when to run it. Configure popular tools like [Cursor](/docs/guides/cursor), [Claude Code](/docs/guides/claude-code), and [Devin Desktop](/docs/guides/devin-desktop) to reference the Mintlify schema, your style guide, and best practices. ### Discovering Mintlify automatically optimizes your site for AI tools and search engines to help users discover your documentation. All pages send their content as Markdown to AI agents instead of HTML, which helps these tools process your content faster and use fewer tokens. Every page is also available to view as Markdown by appending `.md` to the URL. Use the [visibility](/docs/components/visibility) component to tailor content for each audience. Mintlify hosts `llms.txt` and `skill.md` files for your documentation. These industry-standard files help large language models (LLMs) respond efficiently with relevant information to user queries and provide a list of capabilities for agents to use. As a result, users are more successful with your product. Teach your users how to install your `skill.md` file so they get better results when using your product with AI tools. Embed an installation prompt directly in your docs with the [`Prompt` component](/docs/components/prompt): ```mdx theme={null} npx skills add https://your-docs-domain.com ``` Your documentation site also hosts a Model Context Protocol (MCP) server. It lets users connect your documentation directly to their AI tools and get up-to-date information about your product where they want it. For implementation questions that span multiple products or require web search, use [Mintlify Index](/docs/search-index). It gives coding agents one MCP server and REST API for retrieving context from publisher-maintained documentation and the web. Full-text search and semantic understanding help users and AI tools find relevant information quickly. Search understands user intent rather than just matching keywords. If a user encounters a 404 error, your site suggests related pages to help them find what they're looking for. You do not need to configure this. ## Enable AI features Select any of the following cards for more information. Configure the assistant to search external sites or direct people to your support team if it can't answer their questions. Get documentation updates automatically on a schedule or when a push event occurs. Add a menu to pages that lets users query AI tools, connect to your MCP server, and copy pages as context with one click. # Contextual menu Source: https://www.mintlify.com/docs/ai/contextual-menu Add a contextual menu to your docs with one-click AI integrations for ChatGPT, Claude, Perplexity, Google AI Studio, Devin, Devin Desktop, and MCP tools. The contextual menu provides quick access to AI-optimized content and direct integrations with popular AI tools. When users click the contextual menu on any page, they can copy content as context for AI tools or open it in an AI conversation. Supported tools include ChatGPT, Claude, Perplexity, Google AI Studio, Grok, Devin, Devin Desktop, and any custom tool you configure. Pair the contextual menu with your hosted [`skill.md`](/docs/ai/skillmd) file and [MCP server](/docs/ai/model-context-protocol). This lets users install your product's full capabilities into their AI tools, not just the page they are reading. ## Menu options The contextual menu includes several pre-built options that you can enable by adding their identifier to your configuration. | Option | Identifier | Description | | :--------------------------- | :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | | **Copy page** | `copy` | Copies the current page as Markdown for pasting as context into AI tools | | **View as Markdown** | `view` | Opens the current page as Markdown | | **Ask assistant** | `assistant` | Opens the [assistant](/docs/assistant/index) with the current page as context | | **Download PDF** | `download-pdf` | Downloads the current page as a PDF. Available on [Enterprise plans](https://mintlify.com/pricing). | | **Open in ChatGPT** | `chatgpt` | Creates a ChatGPT conversation with the current page as context | | **Open in Claude** | `claude` | Creates a Claude conversation with the current page as context | | **Open in Perplexity** | `perplexity` | Creates a Perplexity conversation with the current page as context | | **Open in Grok** | `grok` | Creates a Grok conversation with the current page as context | | **Open in Google AI Studio** | `aistudio` | Creates a Google AI Studio conversation with the current page as context | | **Open in Devin** | `devin` | Creates a Devin session with the current page as context | | **Open in Devin Desktop** | `devin-desktop` | Opens Devin Desktop with the current page as context. Requires installing Devin Desktop. | | **Copy MCP server URL** | `mcp` | Copies your MCP server URL to the clipboard | | **Copy MCP install command** | `add-mcp` | Copies the `npx add-mcp` command to install the MCP server | | **Connect to Cursor** | `cursor` | Installs your hosted MCP server in Cursor | | **Connect to VS Code** | `vscode` | Installs your hosted MCP server in VS Code | | **Connect to Devin** | `devin-mcp` | Installs your hosted MCP server in Devin | | **Download API spec** | `download-spec` | Downloads your deployment's OpenAPI spec. If there are multiple specs, downloads them as a zip archive. Only appears on API reference pages. | | **Custom options** | Object | Add custom options to the contextual menu | The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items. ## Enable the contextual menu Add the `contextual` field to your `docs.json` file and specify which options you want to include. Options appear in the menu in the order you list them. ```json theme={null} { "contextual": { "options": [ "copy", "view", "assistant", "chatgpt", "claude", "perplexity", "grok", "aistudio", "devin", "devin-desktop", "mcp", "cursor", "vscode", "devin-mcp", "download-spec", "download-pdf" ] } } ``` ## Display location By default, the contextual menu appears in the page header. You can configure it to display in the table of contents sidebar instead using the `display` option. ```json theme={null} { "contextual": { "options": ["copy", "view", "chatgpt", "claude"], "display": "toc" } } ``` | Value | Description | | :------- | :--------------------------------------------------------- | | `header` | Displays options in the top-of-page context menu (default) | | `toc` | Displays options in the table of contents sidebar | ## Add custom options Create custom options in the contextual menu by adding an object to the `options` array. Each custom option requires these properties: The title of the option. The description of the option. Displayed beneath the title when the contextual menu expands. You must include one of `icon` or `src`. The icon to display from an icon library. Options: * [Font Awesome icon](https://fontawesome.com/icons) name, if you have the `icons.library` [property](/docs/organize/settings-appearance#param-icons) set to `fontawesome` in your `docs.json` * [Lucide icon](https://lucide.dev/icons) name, if you have the `icons.library` [property](/docs/organize/settings-appearance#param-icons) set to `lucide` in your `docs.json` * [Tabler icon](https://tabler.io/icons) name, if you have the `icons.library` [property](/docs/organize/settings-appearance#param-icons) set to `tabler` in your `docs.json` Path or URL to an image to use as the icon. Use `src` instead of `icon` when you want to use a custom image rather than an icon from a library. Options: * Path to an image file in your project (for example, `/images/my-icon.svg`) * URL to an externally hosted image (for example, `https://example.com/icon.png`) The [Font Awesome](https://fontawesome.com/icons) icon style. Only used with Font Awesome icons. Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. The href of the option. Use a string for simple links or an object for dynamic links with query parameters. The base URL for the option. An array of query parameter objects to append to the base URL. The query parameter key. The query parameter value. Mintlify replaces the following placeholders with the corresponding values: * Use `$page` to insert the current page content in Markdown. * Use `$path` to insert the current page path. * Use `$mcp` to insert the hosted MCP server URL. Example custom option: ```json {9-14} wrap theme={null} { "contextual": { "options": [ "copy", "view", "chatgpt", "claude", "perplexity", { "title": "Request a feature", "description": "Join the discussion on GitHub to request a new feature", "icon": "plus", "href": "https://github.com/orgs/mintlify/discussions/categories/feature-requests" } ] } } ``` ## Override on individual pages To override the global contextual menu on a specific page, add the `contextual` field to the page's frontmatter. Override the global contextual menu to surface page-specific actions like `download-pdf` on a terms of service page, or to hide the menu entirely on a landing page. The page-level `contextual` object replaces the global one for that page. Omit the field to inherit `docs.json`, or set `options: []` to disable the contextual menu on that page. ```mdx theme={null} --- title: "Terms of Service" contextual: options: - copy - download-pdf display: header --- ``` The same fields and validation rules apply as in `docs.json`, including [custom options](#add-custom-options) and the `display` setting. If a page override is invalid, Mintlify falls back to the global `contextual` configuration. ### Custom option examples ```json theme={null} { "title": "Request a feature", "description": "Join the discussion on GitHub", "icon": "plus", "href": "https://github.com/orgs/mintlify/discussions/categories/feature-requests" } ``` ```json theme={null} { "title": "Share on X", "description": "Share this page on X", "icon": "x", "href": { "base": "https://x.com/intent/tweet", "query": [ { "key": "text", "value": "Check out this documentation: $page" } ] } } ``` # Analyze assistant conversations Source: https://www.mintlify.com/docs/analytics/assistant Review assistant analytics in the Mintlify dashboard to explore conversation categories, topics, satisfaction, chat history, and content gaps. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). The **Assistant** view of the [analytics](https://app.mintlify.com/analytics) page displays assistant usage over time and chat history. * **Conversation categories** groups conversations into categories, which are high-level themes related to your product, and topics, which are specific tasks within a category. Select a category to see its topics, then select a topic to open a drawer with satisfaction metrics and every conversation in that topic. * **All conversations** lists every assistant conversation for the selected time range with a feedback badge on each row. Select a conversation to open the full transcript. Review assistant analytics to: * **Monitor assistant usage**: Observe changes in assistant usage to understand how users engage with your content. * **Identify frequent topics**: Drill into categories and topics to understand what users ask about most. Use these patterns to identify gaps and prioritize content updates. * **Find where users struggle**: Filter by negative feedback to find conversations users rated poorly and improve the underlying content. * **Review chat history**: Get detailed high-intent data about how users think about your product. See which terms they use, what they need help with, and which tasks they try to accomplish. The Assistant view of the analytics page. The Assistant view of the analytics page. # Export analytics to CSV Source: https://www.mintlify.com/docs/analytics/export Export traffic, referrals, assistant, search, and feedback analytics to CSV from your Mintlify dashboard and interpret each export field. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). Export analytics categories to CSV for deeper analysis, reporting, or archival. Exports use the time range selected on the [analytics](https://app.mintlify.com/analytics) page. 1. Select **Export to CSV**. 2. Select a category to export: traffic, referrals, assistant conversations, searches, or feedback. 3. Wait for Mintlify to email you a download link. The Export to CSV button on the analytics page. The Export to CSV button on the analytics page. ## Interpret traffic exports Traffic exports break down page views by visitor category so you can compare traffic from humans, agents, search crawlers, and other bots. | Column | Description | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | | `humanViews` | HTML page views from non-bot traffic. | | `aiViews` | Views from AI agents such as ChatGPT, Claude, and Cursor, plus Markdown page fetches from clients that are not recognized crawlers. | | `searchIndexViews` | Views from search and indexing crawlers, such as Googlebot, Bingbot, and OAI-SearchBot. | | `trainingViews` | Views from crawlers that collect content for AI model training, such as GPTBot, ClaudeBot, and CCBot. | | `otherAiViews` | Views from other AI-related bots that do not fit the preceding categories. | | `totalViews` | The sum of `humanViews` and `aiViews`. | Mintlify classifies each view using known user-agent patterns for search crawlers, training crawlers, and AI assistants. Categories are mutually exclusive, so each view counts toward exactly one column. `searchIndexViews`, `trainingViews`, and `otherAiViews` do not count toward `totalViews`. ## Interpret assistant exports Assistant exports include the queries, responses, sources, and a `resolutionStatus` column. The column indicates whether the assistant successfully answered each question with a value of `answered` or `unanswered`. Use it to identify documentation gaps surfaced by questions the assistant could not resolve. Sample analysis prompts for assistant exports: * List any queries that had no sources cited. * Find patterns in unsuccessful interactions. * Group unanswered queries by topic to prioritize content updates. # Analytics overview Source: https://www.mintlify.com/docs/analytics/index Explore the Mintlify analytics dashboard to measure documentation traffic, assistant conversations, search queries, engagement, and reader feedback. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). The [analytics](https://app.mintlify.com/analytics) page in your dashboard shows how visitors find and use your documentation. Use these signals to identify valuable pages, discover content gaps, and track changes over time. Analytics data typically appears within a few minutes of an interaction. Very recent events might not appear immediately. ## Select an analytics view Track visitors, page views, referrals, and human and agent traffic. Review assistant usage, conversation topics, satisfaction, and transcripts. Analyze search volume, frequent queries, and click-through rates. Understand content actions, navigation paths, and search and assistant funnels. View feedback over time, review specific ratings and written feedback, and track follow-up work. Export dashboard data to CSV for analysis, reporting, or archival. Send analytics events to Amazon S3 for downstream processing. ## Filter by time period Use the range selector in an analytics view to adjust the time period for the displayed data. Exports also use the selected time range. The range selector expanded to show options for viewing different time periods of data. The range selector expanded to show options for viewing different time periods of data. # Analyze documentation searches Source: https://www.mintlify.com/docs/analytics/search Review documentation search analytics to track query volume, spot searches returning no results, and improve result click-through rates. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). The **Search** view of the [analytics](https://app.mintlify.com/analytics) page displays search volume, queries with no results, and click-through rates. Review search analytics to: * **Monitor search trends**: Observe changes in search queries to understand how users find your content and which topics they want information about. * **Identify frequent queries**: Use frequent queries to understand which topics are most important to users. Identify gaps in coverage and prioritize content updates. * **Identify low click-through rates**: Click-through rates (CTR) show how many users click a search result after typing a query. A low CTR can indicate that the search results are not relevant to users' queries. For frequent search terms with a low CTR, improve the relevance of search results by adding keywords or updating your content. The Search view of the analytics page. The Search view of the analytics page. # Stream analytics events to Amazon S3 Source: https://www.mintlify.com/docs/analytics/streaming Configure Enterprise analytics streaming to send selected event categories from your Mintlify deployments to Amazon S3 in near real time. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). Analytics streaming is available only on [Enterprise plans](https://mintlify.com/pricing?ref=analytics-streaming). Stream analytics events to Amazon S3 in near real time to send events to your data warehouse or downstream analytics pipelines without waiting for CSV exports. Organization admins can add multiple destinations, select which event categories to send, and select which deployments to stream from. Analytics streaming uses an inclusion model: no events stream until you select at least one category and one deployment. The same category and deployment selections apply to every destination. ## Add a destination 1. Navigate to the [Streaming](https://app.mintlify.com/settings/organization/streaming) page of your dashboard. 2. In the **Analytics streaming** section, select **Configure**. 3. Select **Add destination**. 4. Enter an optional label, then provide the Amazon S3 bucket, AWS region, access key ID, and secret access key. Optionally, enter a prefix that Mintlify adds to the beginning of every object key. 5. Select **Add destination**. Create an AWS Identity and Access Management (IAM) user with an access key whose policy allows writing to the target bucket. Mintlify does not support role assumption or temporary credentials that require a session token. At minimum, grant `s3:PutObject` on the bucket and key prefix that you plan to use. For example: ```json theme={null} { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:PutObject"], "Resource": "arn:aws:s3:::your-bucket-name/analytics/*" } ] } ``` Use the access key ID and secret access key from that IAM user when adding the destination. The key prefix is optional. Mintlify adds it to the beginning of every object key. To stop streaming to a destination, open the streaming configuration and select the remove icon next to the destination. ## Select streamed categories 1. Navigate to the [Streaming](https://app.mintlify.com/settings/organization/streaming) page of your dashboard. 2. In the **Analytics streaming** section, select **Configure**. 3. Under **Streamed categories**, select the categories that you want to send. | Category | Examples | | ------------------ | ------------------------------------------------------------------------------- | | Page views | Page and Markdown view events. | | Navigation | Navigation item clicks, navigation call-to-action clicks, and version changes. | | Search | Search queries, result clicks, search closes, and search comparisons. | | Page components | Expandable, accordion, code block, and API playground interactions. | | Feedback | Thumbs up, thumbs down, and detailed feedback submissions. | | AI Assistant | Assistant conversations, sources, suggestions, feedback, and errors. | | Context menu & MCP | Context menu actions, MCP link copies, MCP server installs, and MCP tool calls. | The examples summarize each category. Use the streamed `eventType` value to identify the exact event. 4. Select **Save changes**. ## Select streamed deployments Select which of your organization's deployments send events. The dashboard lists each deployment by subdomain. If you create a deployment, return to the streaming configuration and select it. New deployments do not automatically start streaming events. 1. Navigate to the [Streaming](https://app.mintlify.com/settings/organization/streaming) page of your dashboard. 2. In the **Analytics streaming** section, select **Configure**. 3. Under **Streamed deployments**, select the deployments that you want to send events from. 4. Select **Save changes**. No events stream until you select at least one category and one deployment. ## Understand streamed data Mintlify writes newline-delimited JSON (`.jsonl`) objects to your bucket. Mintlify generates object names from UTC timestamps. If you configure a key prefix, Mintlify writes the objects under that prefix. Each line contains an event envelope with an `eventType` and `payload`. The `eventType` is the event name, such as `docs.content.view`. The `payload` contains the analytics event as a JSON object or a JSON-encoded string. If `payload` is a string, parse it as JSON before loading it into your warehouse. ```json theme={null} { "eventType": "docs.content.view", "payload": { "event_id": "4b91fdbc-4677-4e03-b51b-5f2da41c8654", "subdomain": "docs", "user_id": "", "anon_id": "anon_01JZ8W6QKEJ6ECG1T7QK2S5PZ2", "session_id": "session_01JZ8W8CS5JC8T18HXH8ES7Z5M", "created_at": "2026-07-22T23:21:41.063Z", "event": "docs.content.view", "path": "/quickstart", "referrer": "https://www.example.com/", "user_agent": "Mozilla/5.0", "ip": "203.0.113.10", "properties": {} } } ``` The event payload contains the following fields: | Field | Description | | ------------ | -------------------------------------------------------------------------------- | | `event_id` | UUID that identifies the event. Use it as a deduplication key when loading data. | | `subdomain` | Subdomain of the deployment that generated the event. | | `user_id` | ID of the authenticated user, when available. | | `anon_id` | Anonymous visitor ID, when available. | | `session_id` | Visitor or assistant session ID, when available. | | `created_at` | ISO 8601 timestamp for when the event occurred. | | `event` | Event name. This matches `eventType` in the envelope. | | `path` | Documentation path where the event occurred. | | `referrer` | Referring URL, when available. | | `user_agent` | Browser or client user-agent string. | | `ip` | Visitor IP address. | | `properties` | Event-specific data as a JSON object or JSON-encoded string. | Configuration changes can take up to one minute to apply. Streamed events can contain personal data, including IP addresses, user and session identifiers, assistant queries and responses, and feedback comments or contact information. Apply access controls, retention policies, and other data-handling requirements appropriate for your organization. # Analyze documentation traffic Source: https://www.mintlify.com/docs/analytics/traffic Review traffic analytics to track visitors, page views, referrals, popular pages, and traffic from both human readers and AI agents. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). The **Traffic** view of the [analytics](https://app.mintlify.com/analytics) page displays total visitors, page views, assistant conversations, searches, and user feedback messages. Review traffic analytics to: * **Monitor traffic trends**: Observe changes in human and agent traffic after updates or new content to understand the impact of your changes. * **Identify popular pages**: Use highly ranked pages to understand what content is most important to your users. Keep those pages up to date and comprehensive. * **Track referral sources**: Understand where your users come from so you can optimize content for the right audience. The Traffic view of the analytics page. The Traffic view of the analytics page. ## Interpret agent views Mintlify identifies agent visitors by IP address and user agent. The agent visitor count approximates distinct sources of AI traffic rather than individual agent sessions or conversations. Multiple requests from the same IP address count as one visitor. Use agent views to understand: * **AI agent distribution**: See which AI platforms access your docs to learn which tools your users prefer. * **Integration opportunities**: Identify which AI platforms to prioritize for optimization and testing. * **AI traffic patterns**: Monitor which agents are most active and how their usage changes over time. # Analyze user engagements Source: https://www.mintlify.com/docs/analytics/user-engagements Use engagement analytics to measure content actions, CTA click-through rates, user flows through your docs, and search and assistant funnels. Analytics require a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=analytics). The **User engagements** view of the [analytics](https://app.mintlify.com/analytics) page shows how visitors interact with your content and calls to action. It includes interaction trends by page, common paths through your documentation, and search and assistant funnels. All cards use the time range selected for this view. Use engagement analytics to: * **Identify high-intent pages**: Pages with a high CTA click-through rate often indicate visitors who are ready to take the next step, such as signing up for your product or talking to your sales team. * **Understand which content matters**: Review high-intent pages to learn what motivates users to engage more deeply. Keep these pages up to date and consider adding related content. ## Overview The overview displays: * **Total interactions**: CTA clicks and page-level actions combined. * **Average interactions per session**: Total interactions divided by sessions with CTA, action, or page-view activity. * **CTA click rate**: CTA clicks divided by human page views, capped at 100%. Each metric includes a delta badge comparing the selected period with the preceding period of the same length. ## Actions taken over time The actions taken over time chart tracks two separate series: * **CTA clicks**: Clicks on the [primary navbar button](/docs/organize/settings-structure#navbar). Configure a `navbar.primary` button in `docs.json` to populate this series. * **Actions**: Context-menu actions, code-block copies, API playground requests, and thumbs-up or thumbs-down feedback. The table ranks pages by combined clicks and actions. It includes page views, clicks, CTA rate, actions, and action rate. CTA rate is CTA clicks divided by human page views. Action rate is actions divided by human page views. ## User flow The user flow shows the paths visitors take after entering your documentation from a selected page. The entry-point selector lists up to ten pages with the most starting sessions. The chart follows sessions through the entry page and up to three subsequent page interactions. To interpret a user flow: 1. Select an entry point. 2. Hover over a node to view the number of sessions entering it (**In**), the number continuing to another page (**Out**), and the drop-off rate when applicable. Each interaction column shows up to six named pages ranked by arriving sessions. An **Other (N pages)** node at the bottom of the column groups the remaining pages. Grouping these pages preserves onward sessions so drop-off reflects visitors who do not continue. The final interaction column does not show drop-off because the chart does not display another page after it. Use user flows to identify common navigation paths, find pages where visitors stop, and compare navigation patterns across entry points or time ranges. You do not need to configure your site. When User flow is available for your deployment, data appears after your documentation receives visitor traffic. ## User funnel The user funnel counts sessions at each stage and displays how many reached the stage or dropped off before it. Use the selector to switch between **Search-to-answer**, the default view, and **Assistant conversation**. ### Search-to-answer | Stage | Description | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Opened search** | The session opened the search interface. This stage appears only for ranges beginning July 31, 2026 or later that contain search-open events. | | **Entered a query** | The session submitted a search query. | | **Clicked a result** | The session clicked a search result. | | **Landed on a page** | The session viewed the page opened from a search result. | | **Taken an action** | After landing, the session clicked a CTA or used a context-menu action, copied a code block, sent an API playground request, or submitted thumbs feedback. | Use the drop-off between stages to identify whether visitors struggle to search, choose a result, reach its page, or continue interacting after they land. ### Assistant conversation The assistant conversation funnel excludes sessions flagged as spam. | Stage | Description | | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | **Started a conversation** | The session contained assistant activity. | | **Got an answer** | The assistant completed at least one answer in the session. | | **Asked a follow-up** | The assistant completed at least two answers in the session. | | **Engaged with the answer** | The same session contained at least one completed answer and a source click, response copy, web-search-result click, or thumbs feedback. | The engaged stage counts these events regardless of whether the interaction occurs before or after the completed answer. It does not require a follow-up. # Mintlify CLI command reference Source: https://www.mintlify.com/docs/cli/commands Complete reference for Mintlify CLI commands and flags, including mint index, mint dev, mint validate, mint broken-links, and more. ## Global flags These flags are available on all commands. | Flag | Description | | ------------------- | -------------------------------------------------- | | `--telemetry`, `-t` | Enable or disable anonymous usage telemetry. | | `--help`, `-h` | Display help for the command. | | `--version`, `-v` | Display the CLI version. Alias for `mint version`. | ## `mint dev` Start a local preview of your documentation. ```bash theme={null} mint dev [flags] ``` | Flag | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `--port` | Port to run the local preview on. Defaults to `3000`. | | `--no-open` | Do not open the browser automatically. | | `--groups` | Comma-separated list of user groups to mock for preview. | | `--disable-openapi` | Skip OpenAPI file processing to improve performance. | | `--disable-prefetch` | Disable navigation prefetching in the local preview. Useful for very large sites where background prefetching slows down page loads. | | `--local-schema` | Allow locally hosted OpenAPI files served over HTTP. | *** ## `mint index` Install the hosted Mintlify Index MCP server for your coding agents to search across all content on Mintlify sites. The server provides a `context` tool for researching libraries, frameworks, SDKs, APIs, and CLI tools. The Index MCP server is separate from the [Mintlify Docs MCP server](/docs/ai/model-context-protocol), which searches your documentation site. ```bash theme={null} mint index [options] ``` ### Options | Option | Description | | ------------- | ---------------------------------------------------------------------------------------------- | | `--claude` | Set up Claude Code. | | `--cursor` | Set up Cursor. | | `--vscode` | Set up VS Code. | | `--codex` | Set up Codex. | | `--opencode` | Set up OpenCode. | | `--windsurf` | Set up Windsurf. | | `--zed` | Set up Zed. | | `--project` | Write project-level configuration instead of global configuration when the client supports it. | | `--yes`, `-y` | Skip the picker and set up all detected clients. | ### Select clients Run `mint index` without client options to detect installed clients and open an interactive picker. Select the clients to configure, then confirm the prompt. Pass one or more client options to configure specific clients without opening the picker: ```bash theme={null} mint index --claude --cursor ``` Use `--yes` to configure every detected client without prompts. If the CLI can't detect any clients, pass an explicit client option such as `--claude` or `--cursor`. Use `--project` with client options to write project configuration in the current directory: ```bash theme={null} mint index --project --cursor --vscode ``` ### Configuration and rules The command adds the `mintlify-index` server to each selected client and points it to `https://index.mintlify.com/mcp`. By default, it updates global configuration. With `--project`, it uses project configuration where the client supports it. The command also adds a usage rule for each selected client except Zed. The rule tells the client to use the Index MCP `context` tool for documentation research, including syntax, configuration, migrations, and setup. It tells the client to prefer the tool over web search because training data can be out of date. The rule excludes general programming concepts and business-logic debugging. Windsurf has a global MCP configuration only. With `--project`, the command still writes the MCP entry to the global Windsurf configuration and writes the usage rule in the current project. Rerunning the command updates an existing `mintlify-index` entry and its generated rule. The command preserves unrelated configuration. If an existing JSON or JSONC configuration is invalid, the command reports an error without changing that file. Supported clients and their standard configuration files include: | Client | Global configuration | Project configuration | | ----------- | ------------------------------------- | --------------------- | | Claude Code | `~/.claude.json` | `.mcp.json` | | Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | | VS Code | User `mcp.json` | `.vscode/mcp.json` | | Codex | `~/.codex/config.toml` | `.codex/config.toml` | | OpenCode | `~/.config/opencode/opencode.json` | `opencode.json` | | Windsurf | `~/.codeium/windsurf/mcp_config.json` | Global only | | Zed | User `settings.json` | `.zed/settings.json` | *** ## `mint signup` Create a new Mintlify account from the terminal. ```bash theme={null} mint signup [flags] ``` | Flag | Description | | ------------- | ------------------------------ | | `--firstName` | Your first name. | | `--lastName` | Your last name. | | `--company` | Your company name. | | `--email` | Email address for the account. | Run the command without flags to enter your details interactively. The CLI prompts for any value you do not pass as a flag. After you submit your details, Mintlify sends a verification link to your email. The command waits until you click the link, then creates your account, logs you in, and stores your credentials. When it finishes, open the [dashboard](https://app.mintlify.com) to connect your repository and start building. `mint signup` does not return until you click the verification link, which can take several minutes. In scripts or automations, run it as a background process instead of waiting on it synchronously. ### Examples ```bash theme={null} # Sign up interactively mint signup # Sign up with all details provided mint signup \ --firstName Jane \ --lastName Doe \ --company Acme \ --email jane@acme.com ``` *** ## `mint login` Authenticate with your Mintlify account. ```bash theme={null} mint login ``` Opens a browser window to complete authentication. If the browser does not open, the CLI displays a URL to open manually and a prompt to paste the authorization code. Credentials save in `~/.config/mintlify/config.json`. If you have more than one deployment, the CLI prompts you to select a default after you log in. You can change the default project later with `mint config set subdomain `. *** ## `mint logout` Remove stored credentials. ```bash theme={null} mint logout ``` *** ## `mint status` Display your current session details including CLI version, account email, organization, and configured subdomain. ```bash theme={null} mint status ``` *** ## `mint add-domain` Add a [custom domain](/docs/customize/custom-domain) to your deployment from the terminal. Requires authentication with `mint login`. ```bash theme={null} mint add-domain [--basePath ] ``` | Argument | Description | | -------- | --------------------------------------------------------------------------- | | `domain` | The custom domain to add, like `docs.example.com`. Must be a bare hostname. | | Flag | Description | | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--basePath` | Serve your documentation at a [subpath](/docs/customize/custom-domain#choose-where-to-host-your-documentation) on the domain, like `/docs`. Must start with `/` and follow the [base path requirements](/docs/customize/custom-domain#base-path-requirements). | The command uses your configured subdomain from `mint config`. If you do not have a configured subdomain, it uses the first subdomain on your account. After registering the domain, the CLI waits up to 10 seconds for DNS records to generate, then prints the `TXT` and `CNAME` records to add at your domain provider: ```text theme={null} TXT _acme-challenge → TXT _cf-custom-hostname → CNAME @ → cname.mintlify.builders ``` Add the `TXT` records first, then add the `CNAME` once the verification records validate. See [Custom domain](/docs/customize/custom-domain) for full DNS setup instructions, apex domain requirements, and TLS provisioning details. If the command fails with `Domain is already in use by another deployment in your organization` or `Domain is already claimed by another organization`, the domain is bound to another Mintlify deployment. See [Add domain fails with "Domain is already claimed by another organization"](/docs/help-center/domain-already-claimed-by-another-organization) to release it and re-add it. If some `TXT` records are still generating when the command exits, check the [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) page in your dashboard for the remaining values. When you pass `--basePath`, the CLI saves the base path after registering the domain. The new path takes effect on your next deploy, and your site continues serving from the current path until then. The `CNAME` sends all traffic on the domain to Mintlify, so only add it if the domain hosts nothing else. Otherwise, keep your existing DNS and set up a reverse proxy to Mintlify for the base path. See [Host docs at a subpath](/docs/deploy/docs-subpath) for provider-specific guides. ### Examples Add a custom domain at the root: ```bash theme={null} mint add-domain docs.example.com ``` Add a custom domain and serve your documentation at `/docs`: ```bash theme={null} mint add-domain example.com --basePath /docs ``` *** ## `mint automations` Create, list, and delete [automations](/docs/automations) from the terminal. Requires authentication with `mint login`. ```bash theme={null} mint automations [flags] ``` `mint workflow` and `mint workflows` continue to work as aliases for `mint automations`, so existing scripts keep running. New scripts should use `mint automations`. All subcommands accept these shared flags: | Flag | Description | | ------------- | -------------------------------------------------------------------------------------------------------------------------- | | `--subdomain` | Documentation subdomain. Defaults to the value set with `mint config set subdomain`, or the first project on your account. | | `--format` | Output format: `table` (default, pretty) or `json` (raw, machine-readable). | When `--format json` is set, errors print to stderr as `Error: ` and the command exits with a non-zero status, so you can pipe successful output into other tools. ### `mint automations create` Create a new automation. You can pass the automation definition inline with flags, or point at a JSON or YAML file with `--file`. ```bash theme={null} mint automations create [flags] ``` | Flag | Description | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `--name` | Automation name. Required unless `--file` is provided. | | `--prompt` | Instructions appended to the automation's base prompt on every run. | | `--type` | Automation type. One of `changelog`, `source-code-agent`, `translations`, `writing-style`, `typo-check`, `broken-link-detection`, `seo-metadata-audit`, `assistant-docs-updates`, or `contextual-feedback-docs-updates`. Omit for a custom automation. | | `--cron` | Cron expression for a scheduled trigger. Mutually exclusive with `--push-repo`. | | `--push-repo` | Repository (`owner/repo`) for a push trigger. Repeatable to listen to multiple repositories. Mutually exclusive with `--cron`. | | `--context-repo` | Additional context repository (`owner/repo`) the agent reads when the automation runs. Repeatable, up to 10 total. | | `--automerge` | Automatically merge pull requests opened by this automation. See [Configure automerge](/docs/guides/configure-automerge) for setup requirements. | | `--file` | Path to a JSON or YAML file containing the full automation body. Overrides the inline flags. | Provide exactly one trigger: pass `--cron` for a scheduled automation or one or more `--push-repo` flags for a push-triggered automation. #### Examples ```bash theme={null} # Scheduled translations automation mint automations create \ --name "Translate content" \ --type translations \ --cron "0 6 * * *" # Push-triggered automation with extra context mint automations create \ --name "Sync API reference" \ --type source-code-agent \ --push-repo my-org/api \ --context-repo my-org/shared-types \ --automerge # Create from a file mint automations create --file automation.yaml ``` An automation file uses the same shape as the inline flags. The `on` field holds the trigger: ```yaml theme={null} name: Translate content type: translations on: cron: "0 6 * * *" prompt: Prefer formal tone in French translations. automerge: false context: - repo: my-org/shared-content ``` ### `mint automations list` List automations for the current deployment. ```bash theme={null} mint automations list [flags] ``` The default table output shows each automation's ID, name, type, trigger, and status. Use `--format json` to get the full automation objects. ### `mint automations delete` Delete an automation by ID. Use `mint automations list` to get the ID. ```bash theme={null} mint automations delete [flags] ``` | Argument | Description | | -------- | ------------------------------- | | `id` | Automation schema ID to delete. | *** ## `mint config` Manage persistent default values for CLI commands. The configuration saves in `~/.config/mintlify/config.json`. ```bash theme={null} mint config [value] ``` | Subcommand | Description | | ------------------- | ------------------------------ | | `set ` | Set a configuration value. | | `get ` | Display a configuration value. | | `clear ` | Remove a configuration value. | ### Configuration keys | Key | Description | Used by | | ----------- | -------------------------------- | ------------------ | | `subdomain` | Default documentation subdomain. | `mint automations` | *** ## `mint broken-links` Check for broken internal links in your documentation. ```bash theme={null} mint broken-links [flags] ``` The command scans `.mdx` and `.md` files for links and excludes files matching [.mintignore](/docs/organize/mintignore) patterns. Links inside OpenAPI specification files (`.yaml`, `.yml`, `.json`) are not checked. Links that point to ignored files report as broken. | Flag | Description | | ------------------- | -------------------------------------------------------------------------------- | | `--files` | One or more file paths or globs to check. Defaults to the whole site. | | `--check-anchors` | Also validate anchor links (for example, `/page#section`) against heading slugs. | | `--check-external` | Also check external URLs for broken links. | | `--check-redirects` | Also check that redirect destinations in `docs.json` resolve to valid paths. | | `--check-snippets` | Also check links inside `` components. | Pass `--files` to limit the check to specific pages. This is useful for validating a single page you just edited or scoping checks to a directory in CI. When `--files` is set with `--check-external`, only external URLs on the selected pages are fetched. ```bash theme={null} # Check a specific page mint broken-links --files introduction.mdx # Check pages matching a glob mint broken-links --files "guides/**/*.mdx" # Pass multiple paths mint broken-links --files introduction.mdx "guides/**/*.mdx" ``` *** ## `mint a11y` Check for accessibility issues in your documentation. ```bash theme={null} mint a11y [flags] ``` Checks color contrast ratios and missing alt text on images and videos. | Flag | Description | | ----------------- | ----------------------------- | | `--skip-contrast` | Skip color contrast checks. | | `--skip-alt-text` | Skip missing alt text checks. | *** ## `mint validate` Validate your documentation build in strict mode. Exits with an error if there are any warnings or errors. Includes automatic validation of OpenAPI specifications referenced in your `docs.json`. ```bash theme={null} mint validate [flags] ``` | Flag | Description | | ------------------- | ----------------------------------------------------------------------------------------------------- | | `--groups` | Comma-separated list of user groups to mock for validation. | | `--disable-openapi` | Skip OpenAPI file processing and validation. | | `--local-schema` | Allow validation of locally hosted OpenAPI files served over HTTP. Only supports HTTPS in production. | Use `mint validate` instead of the deprecated standalone `mint openapi-check` command. *** ## `mint export` Export your documentation as a self-contained zip archive for offline viewing and distribution. ```bash theme={null} mint export [flags] ``` | Flag | Description | | ------------------- | -------------------------------------------------------------------- | | `--output` | Output filename. Defaults to `export.zip`. | | `--groups` | Comma-separated list of user groups to include restricted pages for. | | `--disable-openapi` | Skip OpenAPI processing. | See [Offline export](/docs/deploy/export) for details. *** ## `mint score` Run agent readiness checks against a public documentation site. Requires authentication with `mint login`. ```bash theme={null} mint score [url] [flags] ``` | Argument | Description | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `url` | Optional. URL of the docs site to check. If omitted, the command scores your configured subdomain (from `mint config` or the subdomain associated with your logged-in account). | | Flag | Description | | ---------- | ----------------------------------------------------------------------------- | | `--format` | Output format: `table` (default, colored), `plain` (pipeable TSV), or `json`. | The command displays an overall readiness score and a breakdown of individual checks with pass/fail indicators. ### Examples ```bash theme={null} # Score your default subdomain mint score # Score a specific site mint score docs.example.com ``` ### Checks The score evaluates the following areas: | Check | What it verifies | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `llmsTxtExists` | Agents can reach an [llms.txt](/docs/ai/llmstxt) file at the site root. | | `llmsTxtValid` | The `llms.txt` file follows the expected format with headings, blockquote summary, and Markdown links. | | `llmsTxtSize` | The `llms.txt` file is within the size threshold so agents can consume it without truncation. | | `llmsTxtLinksResolve` | Links inside `llms.txt` resolve to live pages. | | `llmsTxtLinksMarkdown` | Links inside `llms.txt` use Markdown syntax. | | `llmsTxtDirective` | The `llms.txt` file contains usage directives. | | `llmsTxtFullExists` | An [llms-full.txt](/docs/ai/llmstxt/#llms-full-txt) file is available for agents that need the complete content. Runs independently of `llmsTxtExists`. | | `llmsTxtFullSize` | The `llms-full.txt` file is within a reasonable size for agents to process. | | `llmsTxtFullValid` | The `llms-full.txt` file contains valid content with headings. | | `llmsTxtFullLinksResolve` | Links inside `llms-full.txt` resolve to live pages. | | `skillMd` | Agents can reach a [skill.md](https://www.mintlify.com/docs/ai/skillmd) file for agent tool use. | | `contentNegotiationMarkdown` | The site returns Markdown when agents request it through content negotiation. | | `contentNegotiationPlaintext` | The site returns plain text when agents request it through content negotiation. | | `mcpServerDiscoverable` | Agents can discover an [MCP server](/docs/ai/model-context-protocol) for tool-based agents. | | `mcpToolCount` | The MCP server exposes at least one tool. | | `openApiSpec` | There is an available OpenAPI or Swagger specification at a standard path. | | `robotsTxtAllowsAI` | The `robots.txt` file does not block AI crawlers. | | `sitemapExists` | There is a sitemap available for page discovery. | | `structuredData` | The homepage contains [JSON-LD](https://json-ld.org/) structured data (`