# GitBook MCP

> GitBook MCP connects your AI agent directly into your technical documentation platform, giving you full control over knowledge bases and docs-as-code workflows. You can list every organization and space, search content across entire namespaces, audit metadata for visibility rules, and retrieve specific page content without ever opening the GitBook UI.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** documentation, docs-as-code, technical-writing, knowledge-base, collaboration

## Description

Your agent takes control of all your technical documentation. Instead of navigating through menus or copying text from multiple sources, you talk to your knowledge base directly. This MCP lets you list every organization and space mapped in GitBook, giving you an immediate overview of your entire product documentation structure. You can audit specific spaces for access rules or read content pages wholesale just by asking questions. Need to know how different parts of the company organize their docs? Use the collection management tools to map out that hierarchy. If you need to find a single piece of information buried deep in hundreds of pages, run a cross-page search using natural language queries. When you connect this MCP via Vinkius, your agent can treat documentation like any other data source—a structured resource ready for immediate use.

## Tools

### list_organizations
Retrieves a list of every organization account connected to your GitBook profile.

### list_spaces
Displays all individual documentation spaces belonging to a specified organization.

### get_space
Retrieves detailed structural and metadata information about a specific document space.

### list_pages
Lists the titles and hierarchy of pages contained within a single documentation space.

### get_page
Pulls the complete, raw text content from a specified page ID.

### search_content
Performs a natural language search across multiple pages within a designated space to find relevant snippets.

### list_collections
Lists high-level collections that group related documentation spaces together.

### get_me
Retrieves basic metadata about the authenticated user, including their name and email address.

## Prompt Examples

**Prompt:** 
```
List all spaces in organization 'org_123'
```

**Response:** 
```
Retrieving spaces... I found 3 documentation environments in 'org_123': 'API Reference', 'User Guide', and 'Release Notes'. Which one would you like to explore for pages?
```

**Prompt:** 
```
Search my GitBook for 'authentication flow'
```

**Response:** 
```
Searching content... I found several matches in the 'API Reference' space. The most relevant is a page titled 'Auth Overview' (ID: page_abc). Would you like me to retrieve the full content of that page?
```

**Prompt:** 
```
Show me the page hierarchy for space 'User-Guide'
```

**Response:** 
```
Retrieving hierarchy... The 'User Guide' space has a main 'Getting Started' section, followed by 'Dashboard Basics' and 'Advanced Settings'. Each section has multiple nested pages. Would you like the ID for any specific page?
```

## Capabilities

### Map organizational structure
List all organizations and spaces within your GitBook profile to understand the full scope of your documentation.

### Discover page content
Read entire document pages or traverse a space's hierarchy to extract technical information flawlessly.

### Search across namespaces
Execute natural language searches inside your GitBook, pulling relevant snippets from multiple documentation spaces.

### Audit structural metadata
Fetch detailed information about specific document spaces to verify their visibility and access rules.

### Manage content groupings
List collections that group multiple documentation spaces, providing a high-level view of knowledge distribution across your company.

## Use Cases

### Mapping out product knowledge gaps
A Product Manager needs to know if 'Advanced Security' is documented consistently across three different product lines. They run list_collections and then use get_space on each resulting collection to audit the overall documentation scope, identifying missing sections before a release.

### Resolving complex support tickets
A Customer Support Lead gets a difficult question about API authentication. They ask their agent to search_content across all 'API Reference' spaces and get the most relevant page content, delivering an immediate answer instead of searching multiple manuals.

### Debugging documentation integrations
A Developer needs to verify if a new section is correctly placed in the User Guide. They use list_pages first, then get_space to check the metadata, ensuring the structure matches the required schema before writing any code.

### Getting an overview of all company docs
A Technical Writer needs a quick inventory of every documentation area. They start by using list_organizations, followed immediately by list_spaces to get a comprehensive map of the entire internal knowledge base.

## Benefits

- Skip the clicks. Instead of navigating through a dozen tabs to find documentation, you ask your agent for information and get it instantly using cross-page search operations.
- Audit your knowledge structure easily. Use tools like list_collections or get_space to map out exactly how different product documentations are organized across multiple organizations.
- Eliminate manual content retrieval. The get_page tool pulls the full, raw text from any page ID, letting you analyze and process the content without needing a copy/paste workflow.
- Verify permissions instantly. By using tools like get_me or get_space, you can check detailed metadata about spaces to confirm visibility and structural configuration rules before writing anything.
- Handle complex hierarchies. You don't just see pages; you see the entire page hierarchy for a space, helping you understand how content sections relate to one another.

## How It Works

The bottom line is you get direct command access to read, list, and search every part of your GitBook knowledge base using natural language prompts.

1. Subscribe to this MCP and generate an API Token in your GitBook developer settings.
2. Enter the generated GitBook API token into your AI client's connection settings.
3. Ask your agent a question about your documentation, like 'Show me all spaces under the Marketing organization,' and it executes the necessary calls.

## Frequently Asked Questions

**How do I list all documentation spaces using the GitBook MCP?**
You use the list_spaces tool. After listing organizations with list_organizations, calling list_spaces lets you see every individual space contained within that organization.

**Can I read a page without knowing its ID? (GitBook MCP)**
No, direct retrieval requires the page ID. However, you can use list_pages to get the hierarchy and find the necessary IDs first.

**Does GitBook MCP allow me to search across all my product lines?**
Yes, you run a search using search_content on the space that contains multiple related products. This allows cross-page searching within your specified namespace.

**What if I need to check who is viewing the documentation? (GitBook MCP)**
You can retrieve basic profile metadata using get_me, which gives you authenticated user information like name and email for context verification.