gitbook
A Model Context Protocol (MCP) server that provides access to GitBook's API for AI assistants and LLM applications.
claude mcp add --transport stdio rickysullivan-gitbook-mcp npx gitbook-mcp --organization-id=your_organization_id_here \ --env GITBOOK_API_TOKEN="gb_api_your_token_here"
How to use
This GitBook MCP server exposes GitBook data through the MCP interface, allowing AI agents and assistants to discover organizations, browse spaces, inspect collections and content, and retrieve page content and file metadata. It includes 12 content-related tools organized by function (organization discovery, space management, content retrieval, file management, and collection management) along with 6 AI-powered prompts to streamline documentation workflows. Typical workflows include listing accessible organizations, exploring spaces within an org, fetching page content or space structures, searching content, and retrieving metadata for files and collections. Tools are designed to be read-only where appropriate and to operate in an open-world fashion, making it suitable for embedding in assistants that need up-to-date GitBook data. To use the server, configure it with your GitBook API token and optionally an organization or space ID, then invoke the available MCP tools to query or fetch content programmatically.
How to install
Prerequisites:
- Node.js (LTS version recommended) and npm installed on your machine
- GitBook API token (generate at https://app.gitbook.com/account/developer)
- Optional: Organization ID if you want to scope by organization
Installation steps:
- Ensure Node.js and npm are installed
- Check: node -v and npm -v
- Obtain your GitBook API token and organization ID
- API token: https://app.gitbook.com/account/developer
- Organization ID: obtainable via list_organizations tool after setup
- Run the MCP server using npx (no local install required):
- npx gitbook-mcp --organization-id=your_organization_id_here
- Supply the API token via environment variable (recommended):
- GITBOOK_API_TOKEN=gb_api_your_token_here npx gitbook-mcp --organization-id=your_organization_id_here
- (Optional) Persist config in your IDE or editor integration using the example configurations provided in the README, replacing placeholders with your actual values.
Additional notes
Notes and tips:
- The server expects GITBOOK_API_TOKEN in environment variables or in the MCP config under env.
- Organization and space IDs are optional but recommended for scoping results; you can discover them using list_organizations and list_spaces tools after setup.
- The .env file is only supported for local development when running the server directly, not when using npx gitbook-mcp in a production or embedded workflow.
- If you encounter rate limits or authentication issues, verify that your API token has the necessary scopes for the operations you intend to perform (e.g., read access to organizations, spaces, and content).
- The 12 content tools cover organization discovery, space management, content retrieval (pages and content structure), file management, and collection discovery; they are designed to be combined with prompts for documentation workflows.
- When configuring in IDEs or editors, ensure the command and args exactly reflect the placeholder organization ID and token you intend to use.
Related MCP Servers
frontmcp
TypeScript-first framework for the Model Context Protocol (MCP). You write clean, typed code; FrontMCP handles the protocol, transport, DI, session/auth, and execution flow.
shinzo-ts
TypeScript SDK for MCP server observability, built on OpenTelemetry. Gain insight into agent usage patterns, contextualize tool calls, and analyze server performance across platforms. Integrate with any OpenTelemetry ingest service including the Shinzo platform.
n8n-workflow-builder
MCP server that allow LLM in agent mode builds n8n workflows for you
openai -agent-dotnet
Sample to create an AI Agent using OpenAI models with any MCP server running on Azure Container Apps
mcp-bun
Bun Javascript Runtime MCP Server for AI Agents
CyberSecurity s
Model Context Protocol Server For Cyber Security