/~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.
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.
Connecting an AI assistant
Configure your AI tool
Add the MCP server URL to your AI assistant’s settings. Each tool has a slightly different setup process, so you should check out the docs for your tool of choice to see how to configure an MCP server for it.
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. The MCP server uses HTTP transport only. Tools that require stdio or SSE transport are not supported.Enable or disable easy MCP linking
In the Page actions section of your Customization settings, you can enable the Connect with MCP server option. This enables visitors to your docs site to quickly copy a link to your site’s MCP server right from the Page actions menu.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.