Configuration
Environment Variables
GITBOOK_API_TOKEN
Yes
string
GitBook API token (obtain from https://app.gitbook.com/account/developer)
GITBOOK_ORGANIZATION_ID
No
string
Default organization ID for operations
GITBOOK_SPACE_ID
No
string
Default space ID for single-space projects
Environment variables can be set in
.env.local
,.env
, or your system environment.
CLI Arguments
--organization-id
--org
string
Organization ID to work with
--space-id
--space
string
Default space for operations
Example:
node dist/index.js --organization-id your-org-id --space-id your-space-id
Configuration Files
The following files can be used to provide project-based configuration context:
.github/copilot-instructions.md
.cursorrules
.cursor/rules/rules.md
.cursor/rules/instructions.md
Format Example:
## GitBook Configuration
For GitBook MCP operations, use the following configuration:
- organization-id: your-org-id-here
- space-id: your-space-id-here
Precedence
Configuration precedence (highest to lowest):
CLI Arguments
Configuration Files
Environment Variables
Default Parameter Behavior
When GITBOOK_ORGANIZATION_ID
or GITBOOK_SPACE_ID
are configured:
Tools with optional ID parameters can omit them
Configured defaults are used automatically
Explicit parameters override defaults
Last updated