MCP servers for published docs
Every published GitBook site automatically includes a Model Context Protocol (MCP) server.
This allows AI assistants to access your documentation content directly, making it easy for tools like Claude Desktop, Cursor, and VS Code extensions to answer questions using your docs.
The MCP server is available at your site's URL with /~gitbook/mcp
appended. For example, GitBook's docs are located at https://gitbook.com/docs
, so the MCP server is at https://gitbook.com/docs/~gitbook/mcp
.
Connecting an AI assistant
Requirements
Your GitBook site must be published for the MCP server to work. The server only provides access to published content, never drafts or unpublished changes.
Your AI tool needs to support the Model Context Protocol and be able to make HTTP requests to your site. Most modern AI assistants that support MCP will work with GitBook's servers.
The MCP server respects your site's visibility settings. If your site is public, the MCP server is publicly accessible. If your site requires authentication, the MCP server will too.
Page actions
In the Page actions section of your Customization settings, you can enable the Connect with MCP server button. This enables visitors to your docs site to copy a link to your site's MCP server with the click of a button.
Privacy and access
The MCP server only provides read-only access to your published documentation. It doesn't expose any user data, analytics, or internal GitBook information.
Only the latest published version of your content is available through the MCP server. Draft content and unpublished changes remain private until you publish them.
Common issues
If your AI assistant can't connect to your MCP server, first check that your GitBook site is published and accessible. The URL should respond when you visit it in a browser.
Make sure you're using the correct URL format with /~gitbook/mcp
at the end. The URL should match exactly what you see when you visit your published site.
Some AI tools require specific transport methods or have particular MCP configuration requirements. Check your AI tool's documentation for MCP setup instructions.
Last updated
Was this helpful?