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 ashttps://docs.example.com/ or https://example.com/docs/, rather than an MCP endpoint or an individual page.
Choose documentation access
Connect private documentation
Generate a Docs MCP credential in Mintlify
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.
Generate a site-specific Docs MCP credential. This example uses a separate private demo project.
Connect the site in Second Flow

Connect the documentation site using its Docs MCP client ID and secret. Credential fields are empty in this screenshot.
Verify the connection
Verify the connection

The private documentation connection is active. Credentials are no longer displayed.
Choose pages for a repository

Open the Mintlify configuration from the repository’s Context Gateway tab.

Select exact pages and approve the repository audience before saving. This example selects the demo project's protected quickstart page.

An enabled repository uses its saved Mintlify pages for future understanding checks.
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.
