Skip to main content
Glama
BookStack MCP Server

BookStack MCP Server

by ttpears

BookStack MCP Server

npm version CI HOL trust score License: MIT

Connect an AI assistant to your BookStack wiki through the Model Context Protocol. Search documentation, answer questions with source links, summarize books, and optionally maintain pages and other content.

Read-only by default. The server exposes 21 read tools and, when enabled, 22 write tools. BookStack permissions still apply to every API request. Use a dedicated account with access to only the content the assistant should see.

Quick Start

1. Create a BookStack API token

In BookStack, open your profile's API Tokens section and create a token for a dedicated user. Its role needs Access System API and permission to view the relevant books/pages. Copy both the Token ID and Token Secret; they are separate values.

Also grant Export Content to read WYSIWYG pages as Markdown: BookStack stores no Markdown source for those pages, so the server uses its export endpoint as a fallback. User lookup and recycle-bin tools require additional administrative permissions; ordinary reading does not.

2. Choose an installation

Your setup

Start here

Claude Desktop

Install the .mcpb bundle from the latest release under Settings → Extensions, then enter the three BookStack settings

Claude Code

Marketplace or direct CLI setup

Codex or Gemini CLI

Native plugin and extension setup

Cursor

Native plugin or manual MCP setup

Any local MCP client

Use the stdio configuration below

LibreChat / shared Docker service

Internal HTTP deployment

Remote connector with Microsoft sign-in

HTTPS and Entra OAuth deployment

For npm-based installations, use a supported Node.js LTS release (Node 24 recommended; CI also uses Node 22). The published package declares node >=18; that minimum is not a recommendation to run an unsupported Node release. Docker includes its own Node runtime.

3. Configure a local MCP client

Add this entry to your client's MCP configuration, replacing the example values:

{
  "mcpServers": {
    "bookstack": {
      "command": "npx",
      "args": ["-y", "bookstack-mcp@5.7.1"],
      "env": {
        "BOOKSTACK_BASE_URL": "https://wiki.example.com",
        "BOOKSTACK_TOKEN_ID": "your-token-id",
        "BOOKSTACK_TOKEN_SECRET": "your-token-secret"
      }
    }
  }
}

This configuration contains credentials: keep it private and outside version control. It pins the reviewed release 5.7.1; update the exact version deliberately when upgrading. The repository's native plugin/extension launchers also pin a matching npm version.

Restart the client, check that BookStack tools appear, and ask: “List the books I can access, then find our onboarding guide and link to it.” This verifies MCP connectivity and BookStack access. Starting npx without the required settings fails; starting it in a terminal with settings waits for MCP input rather than opening a web interface.

Related MCP server: BookStack MCP Server

Client Configuration

The client guide covers Claude Desktop, Claude Code, Codex, Cursor, Gemini CLI, and LibreChat, including per-user HTTP credential headers. The configuration reference documents all server settings and the different npm and Docker defaults.

For development from a checkout, see CONTRIBUTING.md. The server does not automatically read .env; use the client's env settings, export variables, or explicitly pass Node's --env-file option.

Available Tools

Task

Tools and behavior

Find information

search_content, search_pages, find_users, get_recent_changes

Read the wiki

List/detail tools for books, chapters, pages, shelves, attachments, and comments; list_images

Export

export_page, export_book, export_chapter as HTML, Markdown, plaintext, PDF, or ZIP

Maintain content

Optional create/update/delete tools, gallery image uploads, and recycle-bin operations

See the complete tool reference and recipes for all 43 tool names, pagination, tags, image policies, and version requirements. MCP tools/list on your connected server is authoritative for argument schemas and enabled tools.

To enable writes in non-OAuth mode, set BOOKSTACK_ENABLE_WRITE=true and use a BookStack token with the corresponding permissions. In OAuth mode, writes instead require the configured Entra role and a separate write-token pair. Entra users normally share those BookStack service accounts; sign-in does not automatically give each user their own BookStack identity or private content boundary.

Editing pages safely

  • For HTML/WYSIWYG pages, read get_page with format: "raw" and update using html. The rendered html view can remove editor attributes and resolve includes.

  • For Markdown pages, read format: "markdown" and update using markdown. Saving html clears the stored Markdown source.

  • Tags replace the entire tag list. Omit tags to preserve it, or send [] to clear it. Read the current list before changing individual tags.

  • Read all content chunks before replacing a large page. Worked examples show the workflow.

MCP Resources

Clients with resource support can browse bookstack://book/{id} for book metadata and bookstack://page/{id} for Markdown and page metadata. Both templates provide ID completion through BookStack search.

Four MCP prompts guide read workflows: answer_from_wiki, find_pages, summarize_book, and recent_changes. Prompt arguments are documented alongside the tools. Client support for resources and prompts varies.

Security

Use HTTPS, keep TLS verification enabled, and protect HTTP services with OAuth or a trusted internal network. HTTP without OAuth has no built-in caller authentication. Set an explicit allowed-host list when exposing a container; a host allowlist is not authentication.

HTTP image downloads require an allowed hostname, and local file uploads are disabled by default. Request bodies, request duration, and session counts are bounded. See deployment boundaries and the security policy, including private vulnerability reporting.

The privacy policy explains data flows, credentials, OAuth/Redis state, and logging. Your AI client and deployment operator may have additional policies. Use is governed by the terms and MIT license.

Documentation

Browse the documentation index for installation, deployment, configuration, tool recipes, troubleshooting, contributions, releases, and HOL Guard. For a connection problem, start with the troubleshooting guide.

Design background: Why my BookStack MCP server starts read-only describes permission boundaries, shared-token rate limiting, and response-size decisions.

Available Tools

17 tools
export_bookExport BookC

Export an entire book in various formats

Inputs: id (required), format (required).

export_chapterExport ChapterC

Export a chapter in various formats

Inputs: id (required), format (required).

export_pageExport PageB

Export a page in various formats (PDF/ZIP provide direct BookStack download URLs)

Inputs: id (required), format (required).

get_attachmentGet Attachment DetailsC

Get details of a specific attachment including download links

Inputs: id (required).

get_attachmentsList AttachmentsC

List attachments (files and links) with filtering and sorting

Inputs: offset, count, sort, filter.

get_bookGet Book DetailsC

Get detailed information about a specific book

Inputs: id (required).

get_booksList BooksC

List available books with advanced filtering and sorting

Inputs: offset, count, sort, filter.

get_capabilitiesGet BookStack CapabilitiesB

Get information about available BookStack MCP capabilities and current configuration

Inputs: no named parameters.

get_chapterGet Chapter DetailsC

Get details of a specific chapter

Inputs: id (required).

get_chaptersList ChaptersC

List chapters, optionally filtered by book

Inputs: book_id, offset, count.

get_pageGet Page ContentC

Get full content of a specific page

Inputs: id (required).

get_pagesList PagesC

List pages with content previews, word counts, and contextual information

Inputs: book_id, chapter_id, offset, count, +2 more.

get_recent_changesGet Recent ChangesC

Get recently updated content with contextual previews and change descriptions

Inputs: type, limit, days.

get_shelfGet Shelf DetailsC

Get details of a specific book shelf including all books

Inputs: id (required).

get_shelvesList ShelvesC

List available book shelves (collections) with filtering and sorting

Inputs: offset, count, sort, filter.

search_contentSearch BookStack ContentC

Search across BookStack content with contextual previews and location info

Inputs: query (required), type, count, offset.

search_pagesSearch PagesC

Search specifically for pages with optional book filtering

Inputs: query (required), book_id, count, offset.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes targeting specific resources like books, chapters, pages, attachments, and shelves, with clear action distinctions (get vs. list vs. export). However, search_content and search_pages have some overlap in purpose, as both handle search operations, which could cause minor confusion for an agent.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, such as get_book, export_page, and search_content. All tools use snake_case with clear, descriptive verbs, making the set predictable and easy to navigate.

    Tool Count4/5

    With 17 tools, the count is slightly high but reasonable for a content management system like BookStack, covering resources like books, chapters, pages, shelves, and attachments. It feels comprehensive without being overwhelming, though it borders on the heavier side.

    Completeness5/5

    The tool surface provides complete CRUD-like coverage for the BookStack domain, including retrieval (get/list), export, search, and management of attachments and recent changes. There are no obvious gaps, and agents can perform full lifecycle operations on all core resources.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers