GitBookSAFE
A Model Context Protocol (MCP) server that provides access to GitBook's API for AI assistants and LLM applications.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A Model Context Protocol (MCP) server that provides access to GitBook's API for AI assistants and LLM applications.
Overview
The GitBook MCP server enables programmatic access to GitBook Organizations, Spaces, Collections, and Content through a standardized MCP interface. It provides 12 tools for content operations and 6 AI-powered prompts for documentation workflows.
Quick Setup
Prerequisites
- GitBook API token (obtain from https://app.gitbook.com/account/developer)
- Your GitBook Organization ID (optional but recommended)
IDE and AI Assistant Integration
VS Code (with GitHub Copilot)
Add to your VS Code MCP settings:
{
"servers": {
"gitbook-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"gitbook-mcp",
"--organization-id=your_organization_id_here"
],
"env": {
"GITBOOK_API_TOKEN": "gb_api_your_token_here"
}
}
}
}Claude Desktop
Add to your Claude Desktop configuration (%APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"gitbook-mcp": {
"command": "npx",
"args": ["gitbook-mcp", "--organization-id=your_organization_id"],
"env": {
"GITBOOK_API_TOKEN": "gb_api_your_token_here"
}
}
}
}See https://modelcontextprotocol.io/quickstart/user for details.
GitHub Copilot plugin for JetBrains IDEs (IntelliJ IDEA, WebStorm, etc.):
Add to your GitHub Copilot MCP settings for JetBrains IDEs (the path may vary by product and OS, e.g., ~/.config/github-copilot/intellij/mcp.json for IntelliJ on Linux/macOS, or the equivalent directory for your JetBrains IDE and platform):
{
"servers": {
"gitbook-mcp": {
"command": "b43ef81439e7OBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add gitbook-mcp --env GITBOOK_API_TOKEN=${GITBOOK_API_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"gitbook-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GITBOOK_API_TOKEN": "${GITBOOK_API_TOKEN}"
}
}
}
}Exposed tools (12)
12 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
get_collection | read | Get detailed information about a specific GitBook collection |
get_collection_spaces | read | List all spaces that belong to a specific GitBook collection |
get_file | read | Get detailed information about a specific file uploaded to a GitBook space |
get_page_by_path | read | Retrieve a page from a GitBook space using its path instead of page ID |
get_page_content | read | Retrieve the content of a specific page from a GitBook space, with options for format and metadata |
get_space | read | Get detailed information about a specific GitBook space |
get_space_content | read | Get the complete content structure and page hierarchy of a GitBook space |
get_space_files | read | List all files (images, documents, etc.) uploaded to a GitBook space |
list_collections | read | List all collections in a GitBook organization, optionally filtered by organization ID |
list_organizations | read | List all GitBook organizations accessible with the current API token |
list_spaces | read | List all spaces in a GitBook organization, optionally filtered by organization ID |
search_content | read | Search for content within a GitBook space using a text query |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
.prettierignore
@modelcontextprotocol/sdk, dotenv, yargs, zod, @modelcontextprotocol/inspector, @types/node, @types/yargs, prettier
openapi.json
Gates applied: no_behavioural_pass.
b43ef81439e7full audit observations/trust-audit/mcp-server/rickysullivan__gitbook.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | b43ef81439e7 | SAFE | B | 89 | first audit |
Questions
What is the GitBook MCP server?
A Model Context Protocol (MCP) server that provides access to GitBook's API for AI assistants and LLM applications.
What tools does GitBook expose?
12 in total: 12 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is GitBook safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does GitBook need?
It reads GITBOOK_API_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does GitBook run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as gitbook-mcp at 1.0.4.
How current is this page?
The grade is for one exact copy of the source (b43ef81439e7), read on 2026-10-09. The repository is watched and re-audited when it changes.