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.
Install our official plugins:
GitBook’s MCP Endpoint
Point your MCP client at:
https://mcp.gitbook.com/mcpConnect your client
Add GitBook MCP in your client of choice:
Install the official GitBook plugin for Claude:
Or add the server from your terminal:
claude mcp add --transport http gitbook https://mcp.gitbook.com/mcpThen 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:
claude mcp add --transport http gitbook https://mcp.gitbook.com/mcp \
--header "Authorization: Bearer <YOUR_TOKEN>"Install the official GitBook plugin for ChatGPT:
Or add the server from your terminal:
codex mcp add gitbook --url https://mcp.gitbook.com/mcpThen sign in through the browser.
To use a personal access token instead, add this to ~/.codex/config.toml:
[mcp_servers.gitbook]
url = "https://mcp.gitbook.com/mcp"
bearer_token_env_var = "GITBOOK_MCP_TOKEN"
enabled = trueAdd the server to .vscode/mcp.json in your workspace:
Then start it from the MCP view and sign in.
Any MCP-compatible client can connect over streamable HTTP.
Point it at:
GitBook supports streamable HTTP only. stdio and SSE aren't supported.
If you use OAuth, you usually don't need any extra auth fields.
If you use a personal access token instead, send it as a bearer token:
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.
To skip the browser flow, send your token as a bearer token:
You can create a personal access token in your developer settings.
Use this for scripted setups, or when your client already manages secrets locally.
Using GitBook’s MCP
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
Last updated
Was this helpful?