BookStack MCP Server
The BookStack MCP Server enables AI assistants to interact with a BookStack documentation instance through read and (optionally) write operations.
Search & Discovery
Search across all BookStack content (books, pages, chapters, shelves) with advanced syntax and filters
Search specifically within pages, optionally scoped to a particular book
Get recently updated content filtered by type and time range
Reading Content
List and retrieve full details of books, pages, chapters, shelves, and attachments
Filter and paginate listings by book ID, chapter ID, or custom criteria
Exporting Content
Export individual pages, entire books, or chapters in HTML, PDF, Markdown, plaintext, or ZIP formats
Write Operations (requires
BOOKSTACK_ENABLE_WRITE=true)Create and update pages
Create, update, and delete shelves
Create, update, and delete attachments
MCP Resources & Integration
Access books (
bookstack://book/{id}) and pages (bookstack://page/{id}) as browsable MCP resources with ID autocompletionWorks with Claude Desktop, LibreChat, Claude Code, and any MCP-compatible client via stdio or HTTP transports
Security
Write operations disabled by default; requires explicit opt-in
Type-safe input validation and secure API token handling
Provides comprehensive tools for managing BookStack content including searching across books, pages, and chapters, creating and updating pages, retrieving detailed information about books and chapters, and exporting pages in various formats (HTML, PDF, Markdown, Plain text).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BookStack MCP Serversearch for pages about API documentation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BookStack MCP Server
A Model Context Protocol (MCP) server that gives AI assistants full access to your BookStack documentation — search, read, create, and manage content.
npx bookstack-mcpFeatures
20 read-only tools + 18 write tools for complete BookStack API coverage
Books, chapters, pages, shelves, attachments, and comments — full CRUD
Recycle bin support — restore or permanently delete soft-deleted content
Type-safe input validation with Zod (auto-coerces string/number params for broad client compatibility)
Embedded URLs and content previews in all responses
Markdown export fallback for HTML-authored pages, so AI clients always get usable content
Write operations disabled by default for safety
Works with Claude Desktop, Claude Code, LibreChat, and any MCP-compatible client
Stdio and Streamable HTTP transports
Related MCP server: PDF RAG MCP Server
Quick Start
Install from npm
npx bookstack-mcpOr clone and build
git clone https://github.com/ttpears/bookstack-mcp.git
cd bookstack-mcp
npm install && npm run build
npm startEnvironment Variables
BOOKSTACK_BASE_URL=https://your-bookstack.com # Required
BOOKSTACK_TOKEN_ID=your-token-id # Required
BOOKSTACK_TOKEN_SECRET=your-token-secret # Required
BOOKSTACK_ENABLE_WRITE=false # Optional, default false
BOOKSTACK_INSECURE_SKIP_TLS_VERIFY=false # Optional, default falseSecurity warning:
BOOKSTACK_INSECURE_SKIP_TLS_VERIFY=truedisables TLS certificate verification for outgoing requests to BookStack. Use only for self-signed certs on a trusted LAN — connections become vulnerable to MITM attacks. The server logs aWARNINGline at startup whenever this is enabled.
Client Configuration
Claude Desktop
Add to your Claude Desktop config:
{
"mcpServers": {
"bookstack": {
"command": "npx",
"args": ["-y", "bookstack-mcp"],
"env": {
"BOOKSTACK_BASE_URL": "https://your-bookstack.com",
"BOOKSTACK_TOKEN_ID": "your-token-id",
"BOOKSTACK_TOKEN_SECRET": "your-token-secret"
}
}
}
}LibreChat (stdio, single-user)
Add to your librechat.yaml:
mcpServers:
bookstack:
command: npx
args:
- -y
- bookstack-mcp
env:
BOOKSTACK_BASE_URL: "https://your-bookstack.com"
BOOKSTACK_TOKEN_ID: "your-token-id"
BOOKSTACK_TOKEN_SECRET: "your-token-secret"LibreChat (Streamable HTTP, recommended for production / Docker)
Run the server as a long-lived HTTP service and point LibreChat at the URL. This is the right setup for multi-user or containerized deployments.
Start the server in HTTP mode:
MCP_TRANSPORT=http \
MCP_HTTP_PORT=8080 \
BOOKSTACK_BASE_URL=https://your-bookstack.com \
BOOKSTACK_TOKEN_ID=your-token-id \
BOOKSTACK_TOKEN_SECRET=your-token-secret \
npx bookstack-mcpThen configure LibreChat:
mcpServers:
bookstack:
type: streamable-http
url: http://bookstack-mcp:8080/mcp3.0.0 breaking change: the deprecated HTTP+SSE transport (
GET /sse+POST /messages) has been removed. Streamable HTTP at/mcpalready speaks SSE for streaming responses, and is the only HTTP transport in current MCP clients. If you're on an older client that needs the legacy endpoints, pin tobookstack-mcp@2.x.
HTTP transport environment variables
Variable | Default | Description |
|
| Set to |
|
| Port to listen on |
|
| Bind address. Loopback by default for safety |
| (loopback only) | Comma-separated allowlist of |
|
| Streamable HTTP endpoint |
When binding to 0.0.0.0 (e.g. inside a container reachable from other services), set MCP_HTTP_ALLOWED_HOSTS to the hostnames LibreChat will use to reach this server, e.g. MCP_HTTP_ALLOWED_HOSTS=bookstack-mcp,bookstack-mcp.internal.
Restart LibreChat after config changes.
Claude Code (CLI)
The recommended path is the ttpears/claude-plugins marketplace, which ships this repo's plugin manifest (.claude-plugin/plugin.json):
/plugin marketplace add ttpears/claude-plugins
/plugin install bookstack-mcp@ttpears-pluginsThen set the BOOKSTACK_* environment variables in your shell so the plugin's MCP server can authenticate:
export BOOKSTACK_BASE_URL=https://your-bookstack.com
export BOOKSTACK_TOKEN_ID=your-token-id
export BOOKSTACK_TOKEN_SECRET=your-token-secretManual install (alternative)
If you'd rather not use the marketplace, register the server directly with claude mcp add. Repeat --env for each variable, put all flags before the server name, and use -- to mark the start of the command Claude Code will spawn:
claude mcp add bookstack \
--transport stdio \
--scope user \
--env BOOKSTACK_BASE_URL=https://your-bookstack.com \
--env BOOKSTACK_TOKEN_ID=your-token-id \
--env BOOKSTACK_TOKEN_SECRET=your-token-secret \
-- npx -y bookstack-mcpScope picks where the entry is written:
Scope | Where it lives | Shared via git | Use it when |
|
| No | Trying it out in one repo |
|
| No | You want bookstack everywhere |
|
| Yes | The whole team should get it |
The resulting config entry looks like this (in .mcp.json for project scope, or ~/.claude.json otherwise):
{
"mcpServers": {
"bookstack": {
"type": "stdio",
"command": "npx",
"args": ["-y", "bookstack-mcp"],
"env": {
"BOOKSTACK_BASE_URL": "https://your-bookstack.com",
"BOOKSTACK_TOKEN_ID": "your-token-id",
"BOOKSTACK_TOKEN_SECRET": "your-token-secret"
}
}
}
}Tip for committed
.mcp.json: Claude Code expands${VAR}and${VAR:-default}references in.mcp.jsonfrom the surrounding shell. Use that to keep secrets out of git: set"BOOKSTACK_TOKEN_SECRET": "${BOOKSTACK_TOKEN_SECRET}"in the file and have each developer export the variable in their shell.
MCP Resources
Books and pages are also exposed as MCP resources, so clients that browse resources (Claude Desktop, MCP Inspector, etc.) can @-mention them directly:
URI template | Description |
| A book, returned as JSON metadata |
| A page, returned as markdown plus a JSON metadata blob |
Both templates support id autocompletion: as you type, the server searches BookStack and returns matching IDs so you don't have to remember numeric IDs by hand.
Available Tools
Read Operations (always available)
Tool | Description |
| Server capabilities and configuration |
| Search across all content with filtering |
| Search pages with optional book filtering |
| List or get details of books |
| List or get full page content |
| List or get chapter details |
| List or get shelf details |
| List or get attachment details |
| List or get page comments (BookStack v25.11+) |
| List items in the recycle bin |
| Export page as HTML, PDF, Markdown, plaintext, or ZIP |
| Export entire book |
| Export chapter |
| Recently updated content |
Write Operations (requires BOOKSTACK_ENABLE_WRITE=true)
Tool | Description |
| Create or delete a book |
| Create or delete a chapter |
| Create a new page (HTML or Markdown) |
| Update content, rename, or move to a different book/chapter |
| Delete a page (recoverable from recycle bin) |
| Manage shelves |
| Manage attachments |
| Manage page comments (v25.11+) |
| Restore or permanently destroy items in the recycle bin |
BookStack API Setup
Log into BookStack as an admin
Go to Settings > Users > Edit your user
Ensure the user has Access System API permission
In the API Tokens section, create a new token
Copy the Token ID and Token Secret
Security
Write operations are disabled by default
Use HTTPS for production instances
Store API tokens securely (never commit to git)
Consider a dedicated BookStack user with limited permissions
Development
npm run dev # Hot reload with tsx
npm run type-check # Type checking only
npm run build # Production buildLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ttpears/bookstack-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server