Skip to content

Commit 4818752

Browse files
Add MCP server docs page with cross-references
1 parent c0091b4 commit 4818752

6 files changed

Lines changed: 67 additions & 9 deletions

File tree

fern/docs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,13 +512,11 @@ redirects:
512512
- source: /learn/docs/ai/llms-txt
513513
destination: /learn/docs/ai-features/llms-txt
514514
- source: /learn/docs/ai/mcp-server
515-
destination: /learn/docs/ai-features/overview
515+
destination: /learn/docs/ai-features/mcp-server
516516
- source: /learn/docs/ai-features/writer
517517
destination: /learn/docs/ai-features/fern-writer
518-
- source: /learn/docs/ai-features/mcp-server
519-
destination: /learn/docs/ai-features/overview
520518
- source: /learn/docs/ai-features/mcp-server/overview
521-
destination: /learn/docs/ai-features/overview
519+
destination: /learn/docs/ai-features/mcp-server
522520
- source: /learn/docs/seo/llms-txt
523521
destination: /learn/docs/ai-features/llms-txt
524522
- source: /learn/docs/scribe-api/slack-scribe/get-scribe-slack-install-link

fern/products/docs/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ navigation:
192192
- page: Analytics and integration
193193
path: ./pages/ai/llms-txt/analytics-integration.mdx
194194
slug: llms-txt-analytics
195+
- page: MCP server
196+
path: ./pages/ai/mcp-server.mdx
197+
slug: mcp-server
195198
- section: Ask Fern
196199
slug: ask-fern
197200
contents:
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: MCP server
3+
description: Connect AI clients like Claude Code and Cursor to your documentation site's MCP server for instant answers.
4+
---
5+
6+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io) is an open standard by Anthropic that enables AI applications to connect with external data sources and tools.
7+
8+
Fern automatically generates and hosts a production-ready MCP server for every documentation site with [Ask Fern](/learn/docs/ai-features/ask-fern/overview) enabled. Developers using AI clients like Claude Code, Cursor, and Windsurf can get instant answers about your product directly within their development environment.
9+
10+
Your MCP server is available at `your-documentation-site.com/_mcp/server`.
11+
12+
## Connect from your docs site
13+
14+
Page action buttons on every page let users connect to the MCP server in one click. **Claude Code** and **Cursor** connections are enabled by default on sites with Ask Fern enabled.
15+
16+
<AccordionGroup>
17+
<Accordion title="Connect to Claude Code">
18+
19+
Under **Page actions** on any page on your site, click **Connect to Claude Code**. This copies a `claude mcp add` command to your clipboard. Paste it into your terminal to register the MCP server with Claude Code.
20+
21+
</Accordion>
22+
<Accordion title="Connect to Cursor">
23+
24+
Under **Page actions** on any page on your site, click **Connect to Cursor**. Cursor opens with the server URL automatically populated — click **Install** to connect.
25+
26+
<video
27+
src="cursor-mcp.mp4"
28+
autoPlay
29+
loop
30+
controls
31+
playsInline
32+
muted
33+
>
34+
</video>
35+
</Accordion>
36+
<Accordion title="Connect to other agents (Claude Desktop, Windsurf, etc.)">
37+
38+
Visit `your-documentation-site.com/_mcp/server` in a browser to see the server information, then add this URL to your AI client's MCP server configuration.
39+
40+
</Accordion>
41+
</AccordionGroup>
42+
43+
To hide or customize these buttons, see [Page actions configuration](/learn/docs/configuration/site-level-settings#page-actions-configuration).
44+
45+
## Direct API access for AI agents
46+
47+
AI agents can access your documentation directly via HTTP. Fern serves content as clean Markdown for token efficiency.
48+
49+
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.
50+
51+
```bash Access protected content
52+
curl https://docs.example.com/platform/overview \
53+
-H 'Accept: text/plain' \
54+
-H 'x-fern-host: docs.example.com' \
55+
-H 'FERN_TOKEN: your-jwt-here'
56+
```

fern/products/docs/pages/ai/overview.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ AI helps keep your documentation current. Fern Writer is a Slack-based technical
3939

4040
## Optimize for AI
4141

42-
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.
42+
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.
4343

44-
<CardGroup cols={2}>
44+
<CardGroup cols={3}>
45+
<Card title="MCP server" icon="plug" href="/learn/docs/ai-features/mcp-server" />
4546
<Card title="`llms.txt`" icon="file-text" href="/learn/docs/ai-features/llms-txt" />
4647
<Card title="Agent directives" icon="compass" href="/learn/docs/ai-features/agent-directives" />
4748
</CardGroup>

fern/products/docs/pages/changelog/2026-04-24.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tags: ["ai-features"]
44

55
## "Connect to Claude Code" page action
66

7-
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.
7+
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.
88

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

fern/products/docs/pages/navigation/site-level-settings.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,11 +820,11 @@ page-actions:
820820
</ParamField>
821821

822822
<ParamField path="page-actions.options.claude-code" type="boolean" required={false} default="true" toc={true}>
823-
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.
823+
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.
824824
</ParamField>
825825

826826
<ParamField path="page-actions.options.cursor" type="boolean" required={false} default="true" toc={true}>
827-
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.
827+
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.
828828
</ParamField>
829829

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

0 commit comments

Comments
 (0)