Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,11 @@ redirects:
- source: /learn/docs/ai/llms-txt
destination: /learn/docs/ai-features/llms-txt
- source: /learn/docs/ai/mcp-server
destination: /learn/docs/ai-features/overview
destination: /learn/docs/ai-features/mcp-server
- source: /learn/docs/ai-features/writer
destination: /learn/docs/ai-features/fern-writer
- source: /learn/docs/ai-features/mcp-server
destination: /learn/docs/ai-features/overview
- source: /learn/docs/ai-features/mcp-server/overview
destination: /learn/docs/ai-features/overview
destination: /learn/docs/ai-features/mcp-server
- source: /learn/docs/seo/llms-txt
destination: /learn/docs/ai-features/llms-txt
- source: /learn/docs/scribe-api/slack-scribe/get-scribe-slack-install-link
Expand Down
3 changes: 3 additions & 0 deletions fern/products/docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ navigation:
- page: Analytics and integration
path: ./pages/ai/llms-txt/analytics-integration.mdx
slug: llms-txt-analytics
- page: MCP server
path: ./pages/ai/mcp-server.mdx
slug: mcp-server
- section: Ask Fern
slug: ask-fern
contents:
Expand Down
30 changes: 30 additions & 0 deletions fern/products/docs/pages/ai/mcp-server.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: MCP server
description: Connect AI clients like Claude Code and Cursor to your documentation site's MCP server for instant answers.
---

Fern automatically generates and hosts a production-ready [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for every documentation site with [Ask Fern](/learn/docs/ai-features/ask-fern/overview) enabled. The server connects AI clients like Claude Code, Cursor, and Windsurf to your documentation as an external data source, so developers can get instant answers about your product directly within their development environment.

Your MCP server is available at `your-documentation-site.com/_mcp/server`. For example, the MCP server for this site is at [https://buildwithfern.com/learn/_mcp/server](https://buildwithfern.com/learn/_mcp/server).

## Connect from your docs site

[Page action](/learn/docs/configuration/site-level-settings#page-actions-configuration) buttons let users connect to your MCP server in one click:

- **Connect to Claude Code** copies a `claude mcp add` command to the clipboard to register the server.
- **Connect to Cursor** opens Cursor with the server URL pre-filled for one-click install.

Both buttons are enabled by default on sites with Ask Fern. For other clients (Claude Desktop, Windsurf, etc.), users can add `your-documentation-site.com/_mcp/server` to their MCP configuration.

## Direct API access for AI agents

AI agents can access your documentation directly via HTTP. Fern serves content as clean Markdown for token efficiency.

For authenticated sites, agents obtain a JWT via [`/api/fern-docs/get-jwt`](/learn/docs/fern-api-reference/get-jwt) with a Fern API key to access protected documentation content and search functionality.

```bash Access protected content
curl https://docs.example.com/platform/overview \
-H 'Accept: text/plain' \
-H 'x-fern-host: docs.example.com' \
-H 'FERN_TOKEN: your-jwt-here'
```
7 changes: 4 additions & 3 deletions fern/products/docs/pages/ai/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ Your documentation site comes with automatic optimizations for AI tools, plus fe

## Find answers

Users can chat with Ask Fern to get instant answers from your documentation. It's available as an embedded chat widget, via the [API](/learn/docs/ai-features/ask-fern/api-reference/overview) for custom integrations, and as a [Slack app](/learn/docs/ai-features/ask-fern/slack-app) for your community workspace. Ask Fern understands context and provides citations so users can verify information and explore further.
Help users get instant, cited answers from your documentation wherever they're working. Ask Fern is available as an embedded chat widget, an [API](/learn/docs/ai-features/ask-fern/api-reference/overview) for custom integrations, and a [Slack app](/learn/docs/ai-features/ask-fern/slack-app) for your community. For developers in AI clients like Claude Code, Cursor, and Windsurf, Fern also hosts an MCP server so they can query your docs directly from their development environment.

<CardGroup cols={2}>
<CardGroup cols={3}>
<Card title="Ask Fern overview" icon="sparkles" href="/learn/docs/ai-features/ask-fern/overview" />
<Card title="Ask Fern Slack app" icon="fa-brands fa-slack" href="/learn/docs/ai-features/ask-fern/slack-app" />
<Card title="MCP server" icon="plug" href="/learn/docs/ai-features/mcp-server" />
</CardGroup>


Expand All @@ -39,7 +40,7 @@ AI helps keep your documentation current. Fern Writer is a Slack-based technical

## Optimize for AI

Your site is automatically optimized for AI tools and search engines. Fern hosts `llms.txt` and `llms-full.txt` files so LLMs can index your documentation efficiently, and serves Markdown instead of HTML to AI agents. These features reduce token consumption and helping agents process your content faster.
Your site is automatically optimized for AI tools and search engines. Fern hosts `llms.txt` and `llms-full.txt` files so LLMs can index your documentation efficiently, and serves Markdown instead of HTML to AI agents. These features reduce token consumption and help agents process your content faster.

<CardGroup cols={2}>
<Card title="`llms.txt`" icon="file-text" href="/learn/docs/ai-features/llms-txt" />
Expand Down
2 changes: 1 addition & 1 deletion fern/products/docs/pages/changelog/2026-04-24.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tags: ["ai-features"]

## "Connect to Claude Code" page action
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] reported by reviewdog 🐶
[FernStyles.Headings] '"Connect to Claude Code" page action' should use sentence-style capitalization.


Fern Docs sites with [Ask Fern](/learn/docs/ai-features/ask-fern/overview) enabled now display a "Connect to Claude Code" button alongside existing page actions. Clicking the button copies a `claude mcp add` command. Readers can paste it into their terminal to register your site's MCP server with Claude Code.
Fern Docs sites with [Ask Fern](/learn/docs/ai-features/ask-fern/overview) enabled now display a "Connect to Claude Code" button alongside existing page actions. Clicking the button copies a `claude mcp add` command. Readers can paste it into their terminal to register your site's [MCP server](/learn/docs/ai-features/mcp-server) with Claude Code.
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] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated


The action is enabled by default and can be toggled off with `page-actions.options.claude-code: false` in `docs.yml`.

Expand Down
4 changes: 2 additions & 2 deletions fern/products/docs/pages/navigation/site-level-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -820,11 +820,11 @@ page-actions:
</ParamField>

<ParamField path="page-actions.options.claude-code" type="boolean" required={false} default="true" toc={true}>
Controls the "Connect to Claude Code" button, which copies a `claude mcp add` command to the clipboard so users can register the docs site's MCP server with Claude Code. Displays by default when [Ask Fern](/learn/docs/ai-features/ask-fern/overview) is enabled. Set to `false` to hide it.
Controls the "Connect to Claude Code" button, which copies a `claude mcp add` command to the clipboard so users can register the docs site's [MCP server](/learn/docs/ai-features/mcp-server) with Claude Code. Displays by default when [Ask Fern](/learn/docs/ai-features/ask-fern/overview) is enabled. Set to `false` to hide it.
</ParamField>

<ParamField path="page-actions.options.cursor" type="boolean" required={false} default="true" toc={true}>
Controls the "Connect to Cursor" button, which installs the docs site's MCP server in Cursor via a deeplink. Displays by default with [Ask Fern](/learn/docs/ai-features/ask-fern/overview) is enabled. Set to `false` to hide it.
Controls the "Connect to Cursor" button, which installs the docs site's [MCP server](/learn/docs/ai-features/mcp-server) in Cursor via a deeplink. Displays by default when [Ask Fern](/learn/docs/ai-features/ask-fern/overview) is enabled. Set to `false` to hide it.
</ParamField>

<ParamField path="page-actions.options.vscode" type="boolean" required={false} default="false" toc={true}>
Expand Down
Loading