.md pages
With GitBook, all of the pages of your docs site are automatically available as markdown files. If you add the.md extension to any page, you will see the content of that page rendered in markdown which you can pass to an LLM for more efficient processing than an HTML file.
Check out the .md file for this page
llms.txt
llms.txt is a proposed standard for making web content available in text-based formats that are easier for LLMs to process. You can access thellms.txt page by appending /llms.txt to the root URL of your docs site.
The llms.txt file serves as an index for your documentation site, providing a comprehensive list of all available markdown-formatted pages. With this file, you make it easier for LLMs to efficiently discover and process your documentation content.
Check out the /llms.txt for the GitBook docs
llms-full.txt
Where thellms.txt file contains an index of all the page URLs and titles of of your documentation site, the llms-full.txt contains the full content of your documentation site in one file that can be passed to LLMs as context.
Check out the /llms-full.txt file for the GitBook docs
MCP server
GitBook automatically exposes a Model Context Protocol (MCP) server for every published space. MCP gives AI tools a structured way to discover and retrieve your docs as resources — no scraping required. Your MCP server can be reached by appending/~gitbook/mcp to the URL of the root of your docs site. For instance, the GitBook docs MCP server is located at https://gitbook.com/docs/~gitbook/mcp.
Visiting this URL in your browser will result in an error. Instead, you can share this with tools that can make HTTP requests, like LLMs or IDEs.
Tips for optimizing your docs for LLMs
Now that your GitBook site automatically generates.md pages, llms.txt, and llms-full.txt files, these best practices will help LLMs effectively understand and work with your content.
By using these optimizations, you may also improve your documentation’s performance in AI-powered search engines and generative engine optimization (GEO).
The best part? These guidelines will generally make your docs easier for people to read as well.