For the complete documentation index, see llms.txt. This page is also available as Markdown.

GitBook MCP

Connect AI coding assistants to GitBook so they can create sites, open change requests, and edit content through GitBook’s API

GitBook exposes an MCP server that lets AI tools act on content in your organization.

Tools like Claude Code, Codex, Cursor, and other MCP clients can use it to create and configure sites, open change requests, draft content, edit pages, and restructure docs.

To connect your AI coding assistant to GitBook’s MCP, you need the server URL, an authentication method, and a supported MCP client. The sections below walk you through each.

Need a read-only MCP server for a published docs site? GitBook creates one for you automatically — see MCP servers for published docs to find out more.

GitBook’s MCP Endpoint

Point your MCP client at:

https://mcp.gitbook.com/mcp

Opening this URL in a browser returns an error. Use it in an MCP client that can make HTTP requests.

Authenticate GitBook’s MCP

GitBook MCP supports two authentication methods: OAuth and personal access tokens.

Point your client at the MCP server URL. The client discovers the authorization server, registers itself, and opens the browser sign-in flow automatically.

If you use OAuth, don't add a bearer token manually. The client gets one during sign-in.

Connect your client

Add GitBook MCP in your client of choice:

Register the server in your terminal:

Then start Claude Code with claude and run /mcp to finish the browser sign-in.

If you prefer a personal access token, pass it as an authorization header:

Common workflows

With the server connected, use your AI tool to:

  • Create and configure a new docs site.

  • Open a change request and draft content.

  • Move, rename, or restructure pages across a site.

The difference between the GitBook MCP and published docs MCP

GitBook has two MCP patterns:

  • MCP servers for published docs give AI tools read-only access to published content.

  • GitBook MCP gives AI tools access to your content and workflows through the GitBook API.

Use published docs MCP when you want documentation readers and end-users to find information from your published docs.

Use GitBook MCP when you want your team’s agents to edit and manage your documentation through automated workflows.

FAQ

Which transport does GitBook MCP support when I connect an MCP client?

GitBook MCP supports streamable HTTP.

GitBook MCP doesn't support stdio or SSE.

If your client asks for extra fields, you can usually leave them empty.

Do I need to add a bearer token when I connect a client to GitBook MCP?

You only need to add a bearer token if you authenticate with a personal access token.

If you use OAuth, don't add a bearer token manually. Your client gets it during the sign-in flow.

Why does nothing happen after I add the GitBook MCP server to my client?

Yes. That's expected in some MCP clients.

Adding a server often only saves the configuration. Some clients start authentication only when they first connect, list tools, or open the MCP panel.

Why doesn't anything happen after I click Authenticate for GitBook MCP?

Some clients open the browser sign-in flow after a short delay.

That delay can be longer on a slow or unstable network.

If no browser tab opens after about a minute, check your network, pop-up settings, and default browser.

What happens during the GitBook MCP authentication flow?

When authentication works, the flow usually looks like this:

  1. The client connects to the MCP server.

  2. Your browser opens the sign-in flow.

  3. You sign in and approve access.

  4. The client shows the server as connected, or the MCP tools become available.

How can I tell if my client authenticated successfully with GitBook MCP?

The exact signal depends on your client, but the result is usually clear.

Most clients remove the auth prompt, show the server as connected, or let the assistant list and call MCP tools.

If the Authenticate button stays visible and no tools appear, the flow likely didn't finish.

What should I check if GitBook MCP authentication still seems stuck?

Try these checks:

  • Confirm the server URL points to the MCP endpoint.

  • Confirm the client uses HTTP transport.

  • Retry on a stable network.

  • Remove and re-add the server if the client cached a failed state.

Last updated

Was this helpful?