BookStack MCP (bookstack-mcp)
Use the bookstack-mcp MCP tools as the primary interface for reading, searching, exporting, and maintaining a BookStack wiki.
Core Workflows
- Search & discover: Start with
search_content(supports BookStack qualifiers like{type:page},{created_by:jane-doe},{updated_by:me}) orsearch_pages(scoped bybook_id), plusget_recent_changes,get_books,get_chapters,get_shelves, andget_pages. Search results are previews—always fetch full content withget_page. - Read large pages: Call
get_page(limitdefaults to50000, max200000chars). Ifcontent_next_offsetis non-null, callget_pageagain withoffset: content_next_offsetand the sameformatuntilnull. Always read all chunks before editing a large page. - Edit pages safely:
- Markdown pages: Read with
format: "markdown", update withmarkdown. - HTML/WYSIWYG pages: Read with
format: "raw", update withhtml. - Tags:
tagsreplaces the entire tag list. Omittagsto preserve existing tags, sendtags: []to clear all, or read current tags first and send the full desired list. - Move/reorder: On
create_page, omitchapter_idfor a top-level book page (chapter_id: 0can 404). Onupdate_page, passchapter_id: 0withbook_idto move an existing page to a book's top level; moving into a chapter requires bothchapter_idandbook_id. Lowerprioritysorts first.
- Markdown pages: Read with
- Images, attachments & exports:
create_imageuploads gallery images (PNG/JPEG/GIF/WebP/SVG, up to 50 MiB) viaurlorfile_path(localstdioonly) and returnscontent.html/content.markdownsnippets. It does not insert the image into the page—follow up withupdate_page.create_attachmentcreates link attachments (name,uploaded_to,link), not binary file uploads.export_page/export_book/export_chapter:html,markdown, andplaintextreturn content directly;pdfandzipreturn BookStack web download URLs.
- Comments & recovery:
get_comments/create_comment/update_comment/delete_commentrequire BookStack v25.11+. For deletions, getdeletion_idfromget_recycle_bin, then callrestore_deletedorpermanently_delete(irreversible).
Read references/tools-reference.md for all 43 tools (21 read + 22 write), MCP resource templates, and prompts.
Gotchas
- Read-only by default: Only 21 read tools are registered unless
BOOKSTACK_ENABLE_WRITE=true(or OAuth write-role + write-token pair) is configured. Tool visibility does not override BookStack role permissions. - Never save rendered
htmlback to a page:get_pagewithformat: "html"returns the rendered reader view (stripping editor attributes and expanding includes), and savinghtmlon a Markdown page clears its stored Markdown source. - Author search requires slugs, not IDs:
{created_by:...},{updated_by:...}, and{owned_by:...}reject numeric user IDs; usemeor a user slug (resolve viafind_usersif you have admin access). Export Contentpermission for Markdown: BookStack stores no Markdown source for WYSIWYG pages, sobookstack-mcpfalls back to BookStack's export endpoint, which requires the Export Content role permission.deletion_id!= entity ID:restore_deletedandpermanently_deletetake thedeletion_idfromget_recycle_bin, not the original page/book/chapter ID.changelogversion behavior:changelog(1–180 chars) oncreate_page/update_pageis recorded on BookStack v26.09+ and silently ignored on older versions.
Setup & Configuration
If bookstack-mcp is not yet connected or needs write mode, image allowlists (BOOKSTACK_IMAGE_ALLOWED_HOSTS), or client config, read references/setup-and-config.md.


