From 4818752fd0132d5962004ab768d1af916ab9fce3 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 18:32:04 +0000 Subject: [PATCH 1/3] Add MCP server docs page with cross-references --- fern/docs.yml | 6 +- fern/products/docs/docs.yml | 3 + fern/products/docs/pages/ai/mcp-server.mdx | 56 +++++++++++++++++++ fern/products/docs/pages/ai/overview.mdx | 5 +- .../docs/pages/changelog/2026-04-24.mdx | 2 +- .../pages/navigation/site-level-settings.mdx | 4 +- 6 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 fern/products/docs/pages/ai/mcp-server.mdx diff --git a/fern/docs.yml b/fern/docs.yml index f78256880..351eba538 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -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 diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index 79e3397a3..dee3891ee 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -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: diff --git a/fern/products/docs/pages/ai/mcp-server.mdx b/fern/products/docs/pages/ai/mcp-server.mdx new file mode 100644 index 000000000..8951a1b6c --- /dev/null +++ b/fern/products/docs/pages/ai/mcp-server.mdx @@ -0,0 +1,56 @@ +--- +title: MCP server +description: Connect AI clients like Claude Code and Cursor to your documentation site's MCP server for instant answers. +--- + +[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. + +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. + +Your MCP server is available at `your-documentation-site.com/_mcp/server`. + +## Connect from your docs site + +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. + + + + +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. + + + + +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. + + + + + +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. + + + + +To hide or customize these buttons, see [Page actions configuration](/learn/docs/configuration/site-level-settings#page-actions-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' +``` diff --git a/fern/products/docs/pages/ai/overview.mdx b/fern/products/docs/pages/ai/overview.mdx index 1737c3856..872d122ad 100644 --- a/fern/products/docs/pages/ai/overview.mdx +++ b/fern/products/docs/pages/ai/overview.mdx @@ -39,9 +39,10 @@ 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. - + + diff --git a/fern/products/docs/pages/changelog/2026-04-24.mdx b/fern/products/docs/pages/changelog/2026-04-24.mdx index 83480dbb3..e6fa859ba 100644 --- a/fern/products/docs/pages/changelog/2026-04-24.mdx +++ b/fern/products/docs/pages/changelog/2026-04-24.mdx @@ -4,7 +4,7 @@ tags: ["ai-features"] ## "Connect to Claude Code" page action -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. The action is enabled by default and can be toggled off with `page-actions.options.claude-code: false` in `docs.yml`. diff --git a/fern/products/docs/pages/navigation/site-level-settings.mdx b/fern/products/docs/pages/navigation/site-level-settings.mdx index 5c6a1207f..ac7d6a06f 100644 --- a/fern/products/docs/pages/navigation/site-level-settings.mdx +++ b/fern/products/docs/pages/navigation/site-level-settings.mdx @@ -820,11 +820,11 @@ page-actions: - 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. - 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. From 7b5ce8f6a11bd93ce86c0a5e1e6cc406378ce57a Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Apr 2026 14:59:45 -0400 Subject: [PATCH 2/3] refine text --- fern/products/docs/pages/ai/mcp-server.mdx | 34 ++++------------------ fern/products/docs/pages/ai/overview.mdx | 8 ++--- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/fern/products/docs/pages/ai/mcp-server.mdx b/fern/products/docs/pages/ai/mcp-server.mdx index 8951a1b6c..2aa90315d 100644 --- a/fern/products/docs/pages/ai/mcp-server.mdx +++ b/fern/products/docs/pages/ai/mcp-server.mdx @@ -7,40 +7,16 @@ description: Connect AI clients like Claude Code and Cursor to your documentatio 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. -Your MCP server is available at `your-documentation-site.com/_mcp/server`. +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 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. +[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. -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. - - - - -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. - - - - - -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. - - - - -To hide or customize these buttons, see [Page actions configuration](/learn/docs/configuration/site-level-settings#page-actions-configuration). +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 diff --git a/fern/products/docs/pages/ai/overview.mdx b/fern/products/docs/pages/ai/overview.mdx index 872d122ad..0e4514008 100644 --- a/fern/products/docs/pages/ai/overview.mdx +++ b/fern/products/docs/pages/ai/overview.mdx @@ -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. - + + @@ -41,8 +42,7 @@ AI helps keep your documentation current. Fern Writer is a Slack-based technical 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. - - + From ae88c2dcafd58b7f6ffef4293dba1c598d371a23 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Apr 2026 15:03:32 -0400 Subject: [PATCH 3/3] refine intro --- fern/products/docs/pages/ai/mcp-server.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fern/products/docs/pages/ai/mcp-server.mdx b/fern/products/docs/pages/ai/mcp-server.mdx index 2aa90315d..eaffde54a 100644 --- a/fern/products/docs/pages/ai/mcp-server.mdx +++ b/fern/products/docs/pages/ai/mcp-server.mdx @@ -3,9 +3,7 @@ title: MCP server description: Connect AI clients like Claude Code and Cursor to your documentation site's MCP server for instant answers. --- -[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. - -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. +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).