> ## Documentation Index
> Fetch the complete documentation index at: https://docs.secondflow.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Mintlify

> Connect public or private Mintlify documentation and choose the pages used by each repository.

Connect Mintlify to give understanding checks relevant architecture, product, and operating guidance from your published documentation. Set up one shared team connection, then choose the exact pages each repository can use.

## Before you begin

You need to be the Second Flow team owner to change the connection or its repository pages. For private documentation, you also need permission to generate a Docs MCP credential in the Mintlify project.

Have your site's canonical HTTPS URL ready. Open the site in your browser and use its final address, including any base path. Enter the site URL, such as `https://docs.example.com/` or `https://example.com/docs/`, rather than an MCP endpoint or an individual page.

## Choose documentation access

| Documentation | Select in Second Flow | What you need |
| - | - | - |
| Public pages | **Public documentation** | Your documentation URL |
| Protected pages | **Docs MCP client credentials** | Your documentation URL, client ID, and client secret |

Public documentation does not need a Mintlify credential. For protected pages, complete the credential step below.

## Connect private documentation

<Steps>
  <Step title="Generate a Docs MCP credential in Mintlify">
    Open your Mintlify project and go to **Settings → General**. Find **Docs MCP** and select **Generate**.

    Give the credential a label, such as `Second Flow`. Add only the **Groups** whose pages are approved for your repository audience, pressing Enter after each group. Select **Generate credentials** and copy the client ID and client secret to a secure place. Mintlify shows the secret once.

    <Frame caption="Generate a site-specific Docs MCP credential. This example uses a separate private demo project.">
      <img src="https://mintcdn.com/secondflow/4eYvp-HNitiOo6NP/images/mintlify/docs-mcp-credential-form.png?fit=max&auto=format&n=4eYvp-HNitiOo6NP&q=85&s=417bbf77afccdc5fc2f2b2bb00e63ea5" alt="Mintlify Generate credentials dialog with a purpose label and the secondflow-demo group." width="420" height="450" data-path="images/mintlify/docs-mcp-credential-form.png" />
    </Frame>

    The **Docs MCP** section appears only when the site uses authentication. Credentials without groups can read public pages and authenticated pages without group restrictions. See [Mintlify's client credential instructions](https://www.mintlify.com/docs/ai/model-context-protocol#client-credentials) for its permission rules.

    <Note>
      Use a **Docs MCP** credential from this project. Mintlify's **MCP → Credentials** section manages Admin MCP access, and **API keys** manages REST API access. Those credentials do not belong in this connection.
    </Note>
  </Step>

  <Step title="Connect the site in Second Flow">
    In the [Second Flow console](https://console.secondflow.app/context), open **Context Gateway** and select **Configure source** on the **Mintlify** card.

    Enter the canonical **Documentation URL**. Under **Documentation access**, select **Docs MCP client credentials**. Enter the **Docs MCP client ID** and **Docs MCP client secret**, then select **Connect Mintlify**.

    <Frame caption="Connect the documentation site using its Docs MCP client ID and secret. Credential fields are empty in this screenshot.">
      <img src="https://mintcdn.com/secondflow/4eYvp-HNitiOo6NP/images/mintlify/connect-private-docs.png?fit=max&auto=format&n=4eYvp-HNitiOo6NP&q=85&s=65edde0ea2afc3443f993f5ffa74b54a" alt="Second Flow Mintlify connection form with a documentation URL, Docs MCP client credentials selected, and empty client ID and secret fields." width="660" height="870" data-path="images/mintlify/connect-private-docs.png" />
    </Frame>

    After connecting, verify that the site shows **Authenticated documentation · Active**. Choose pages for each repository before using them in understanding checks.

    <Accordion title="Verify the connection">
      <Frame caption="The private documentation connection is active. Credentials are no longer displayed.">
        <img src="https://mintcdn.com/secondflow/4eYvp-HNitiOo6NP/images/mintlify/authenticated-connection.png?fit=max&auto=format&n=4eYvp-HNitiOo6NP&q=85&s=92af4232e0ab8cde3e4d7fc32a1ad9ea" alt="Connected private Mintlify documentation showing Authenticated documentation and Active status." width="660" height="740" data-path="images/mintlify/authenticated-connection.png" />
      </Frame>
    </Accordion>
  </Step>

  <Step title="Choose pages for a repository">
    Open **Repositories**, choose the repository, and open its **Context Gateway** tab. Select **Configure** on the **Mintlify** card.

    <Frame caption="Open the Mintlify configuration from the repository’s Context Gateway tab.">
      <img src="https://mintcdn.com/secondflow/4eYvp-HNitiOo6NP/images/mintlify/repository-mintlify-card.png?fit=max&auto=format&n=4eYvp-HNitiOo6NP&q=85&s=cdd3c48fc3ec608347de60c1d4e8d93c" alt="Repository Mintlify card with a Configure button and an inactive switch before setup." width="370" height="260" data-path="images/mintlify/repository-mintlify-card.png" />
    </Frame>

    Select **Load pages**. Use **Filter pages** to find the guidance you need, then select one to five individual pages. Linked pages and child pages are not included automatically.

    Confirm **I authorize selected page content for people who can access this repository's understanding checks.**, then select **Save repository pages**. Review this audience carefully when selecting protected documentation.

    <Frame caption="Select exact pages and approve the repository audience before saving. This example selects the demo project's protected quickstart page.">
      <img src="https://mintcdn.com/secondflow/4eYvp-HNitiOo6NP/images/mintlify/select-private-pages.png?fit=max&auto=format&n=4eYvp-HNitiOo6NP&q=85&s=43a5abbab4e4f323c8bff86bf5d832ea" alt="Private Mintlify page selection with quickstart selected, audience approval checked, and Save repository pages available." width="660" height="780" data-path="images/mintlify/select-private-pages.png" />
    </Frame>

    After saving, return to the repository's **Context Gateway** card and verify that Mintlify shows **Enabled**. If its switch is off, enable it. Reopen **Configure** to confirm that your selected pages and audience approval are preserved.

    <Frame caption="An enabled repository uses its saved Mintlify pages for future understanding checks.">
      <img src="https://mintcdn.com/secondflow/4eYvp-HNitiOo6NP/images/mintlify/repository-mintlify-enabled.png?fit=max&auto=format&n=4eYvp-HNitiOo6NP&q=85&s=7fa41777c8037f8e7ea43b5c73c4b9d8" alt="Repository Mintlify card with its switch on and Enabled status." width="370" height="260" data-path="images/mintlify/repository-mintlify-enabled.png" />
    </Frame>
  </Step>
</Steps>

## Connect public documentation

Open **Context Gateway → Mintlify**, enter the canonical **Documentation URL**, leave **Documentation access** set to **Public documentation**, and select **Connect Mintlify**.

Then use the same repository setup above to load pages, choose one to five pages, approve the audience, and save. Public connections use Mintlify's published documentation index and Markdown pages.

## How selected pages are used

Second Flow reads the selected published pages on demand when generating a new understanding check. Published documentation may differ from the repository revision. Changing the documentation or page selection does not rewrite existing questions or completed results.

Choose small, maintained pages. Private pages must fit the complete-page limit of 24 KiB. Public pages allow up to 128 KiB each, with a combined retrieval limit of 256 KiB. Other context limits can also affect retrieval.

## Replace credentials or stop using a site

To rotate credentials, generate a replacement in Mintlify. In the shared Second Flow connection, select **Replace connection credentials** and save the new client ID and secret. Review and save every repository's pages and approve its audience again. Re-enable any repository scope that was disabled.

Disconnecting the shared connection stops future reads and keeps saved repository page selections for reconnect. Deleting it removes the live connection and repository page selections. To revoke the credential at Mintlify, delete it in that project's **Docs MCP** section after updating integrations that use it.

## Troubleshooting

* **Docs MCP is missing in Mintlify:** Check that you opened the correct project and that it already uses authentication. Public sites can use **Public documentation** in Second Flow.
* **Access is rejected:** Check the canonical site URL, credential type, and group access. Reconnect with a valid Docs MCP credential.
* **A page is missing:** Confirm that it is published and available to the credential. Use **Reload pages** after a documentation update.
* **A private page exceeds the limit:** Split it into smaller pages, publish them, and update the repository selection.
* **Mintlify stays disabled for a repository:** Save its page selection and audience approval, then enable its switch. After replacing credentials, repeat the audience approval for each repository.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.