Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions fern/products/docs/pages/ai/mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,26 @@ page-actions:

This is especially useful on [authenticated sites](/learn/docs/authentication/overview) because unauthenticated agents can discover the MCP endpoint but can't read its content. Disabling the server returns 404 from the endpoint, hides the connection buttons, and stops agents from discovering it through `llms.txt` or agent prompts.

## Frequently asked questions

<AccordionGroup>
<Accordion title="Is the MCP server a separate SKU or add-on?">
No. The MCP server is included automatically on every Fern docs site that has Ask Fern enabled. There is no separate plan or add-on required.
</Accordion>
<Accordion title="Can the MCP server be scoped by user or role?">
Yes, indirectly. The MCP server enforces the same access control as a browser request. On authenticated sites, the caller must pass a valid JWT in the `FERN_TOKEN` header; the server only returns content the token's roles allow. There is no per-user MCP credential — each caller supplies their own token. See the [Authenticated sites](#authenticated-sites) section above for how to obtain and pass a token.
</Accordion>
<Accordion title="How many AI credits does the MCP server use?">
Each message sent through the MCP server runs Ask Fern under the hood and consumes 2 AI credits, the same as a direct Ask Fern query. Automated tests can be excluded from analytics (and still consume credits) using the `x-fern-skip-save-query` header described in the [Exclude test and eval traffic from analytics](#exclude-test-and-eval-traffic-from-analytics) section.
</Accordion>
<Accordion title="Can the llms.txt file be updated or forcibly regenerated?">
`llms.txt` is generated automatically from your published documentation every time you publish. There is no manual regeneration command — republishing your docs with `fern docs publish` updates it. If the file looks stale, check that your latest publish completed successfully.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] <FernStyles.Current> reported by reviewdog 🐶
Avoid time-relative terms like 'latest' that become outdated

</Accordion>
<Accordion title="Does the MCP server work on self-hosted containers?">
Yes. Self-hosted containers serve `/_mcp/server` without Ask Fern or AI credits. Instead of the RAG pipeline, the self-hosted server exposes `searchDocs` (keyword search) and `fetchPage` (returns a page's Markdown). See the [Self-hosted containers](#self-hosted-containers) section for details.
</Accordion>
</AccordionGroup>

## Other ways agents can access your docs

Agents can also fetch documentation directly over HTTP. Fern serves clean Markdown via [per-page URLs and `llms.txt`](/learn/docs/ai-features/markdown) — including on authenticated sites.
Expand Down
Loading