From 3dd847e82fac3d6e5bc73cac7c0721189cc79c63 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 14:03:51 +0000 Subject: [PATCH] Document MCP server tools, retrieval, and credit usage --- fern/products/docs/pages/ai/mcp-server.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fern/products/docs/pages/ai/mcp-server.mdx b/fern/products/docs/pages/ai/mcp-server.mdx index f9e516711a..24ae4a94bc 100644 --- a/fern/products/docs/pages/ai/mcp-server.mdx +++ b/fern/products/docs/pages/ai/mcp-server.mdx @@ -9,6 +9,14 @@ This is the server your readers connect to, and it serves your content. To point 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). +## How the MCP server works + +The server exposes one tool, `searchDocs`. A client calls it with a natural-language query and gets back the passages of your documentation that answer it, each with the URL of the page it came from. The client's own model turns those passages into an answer. The tool returns passages rather than whole pages, so a client that needs a complete page fetches its [Markdown over HTTP](/learn/docs/ai-features/markdown). + +`searchDocs` queries the same index [Ask Fern](/learn/docs/ai-features/ask-fern/overview) uses, so retrieval is semantic: a query matches content by meaning instead of by keyword, and anything you add as an [additional content source](/learn/docs/ai-features/ask-fern/content-sources) is searchable alongside your pages. On [authenticated sites](#authenticated-sites), results are limited to the content the caller's `FERN_TOKEN` grants access to. + +Because the server runs on the Ask Fern backend, every `searchDocs` call counts as an Ask Fern message against your plan's monthly [AI credit](/learn/docs/ai-features/overview#ai-credits) allowance. One reader question can produce several calls, as AI clients often search more than once to gather context. + ## Connect to your MCP server For Claude Code and Cursor, [page action](/learn/docs/configuration/site-level-settings#page-actions-configuration) buttons let users connect in one click: