How to Build a BookStack MCP Server: Connect Your LLM to Internal Docs
Z
Zack Saadioui
8/11/2025
So you've got a ton of internal documentation, & you're trying to figure out how to get your AI to, well, read it. It's a super common problem these days. You've got this powerful Large Language Model (LLM) that's supposed to make everything easier, but it doesn't know anything about your company's specific processes, your product documentation, or your team's collective knowledge. It's like having a super-genius intern who's never been onboarded.
Here's the thing: you can't just point your LLM at a folder of random documents & expect it to make sense of it all. You need a structured, organized knowledge base that your AI can easily access & understand. & that's where BookStack comes in.
In this article, I'm going to walk you through how to create what's called a BookStack MCP server. It sounds complicated, but honestly, it's pretty straightforward once you get the hang of it. We're going to cover:
What BookStack is & why it's a great choice for your internal documentation.
What the heck an "MCP server" is & why it's the key to connecting your docs to your LLM.
A step-by-step guide to setting up your own BookStack server.
How to install & configure the BookStack MCP server.
How to connect your LLM to your new BookStack server.
By the end of this, you'll have a fully functional system that lets your AI read & understand your documentation, so it can provide actually helpful, context-aware answers. Pretty cool, right?
What is BookStack, & Why Should You Care?
Before we get into the nitty-gritty of servers & protocols, let's talk about BookStack. Simply put, BookStack is a free & open-source platform for organizing & storing information. Think of it like a private Wikipedia for your team or company. It's designed to be simple, easy to use, & highly organized.
Here's why I'm a big fan of BookStack, especially when it comes to creating a knowledge base for an LLM:
It's structured. BookStack uses a "Shelves," "Books," "Chapters," & "Pages" hierarchy. This is HUGE for an LLM. Instead of just a pile of documents, your AI gets a clear, logical structure that helps it understand the relationships between different pieces of information.
It has a great editor. The editor is a simple, WYSIWYG (what you see is what you get) interface, but you can also use Markdown. This makes it easy for anyone on your team to contribute to the knowledge base, which is key to keeping it up-to-date.
It's searchable. BookStack has powerful, built-in search capabilities. This is obviously great for your human users, but it's also a feature that the MCP server can leverage to help your LLM find the exact information it needs.
It has a robust API. This is the secret sauce that makes the whole BookStack MCP server thing possible. BookStack's API allows other applications (like our MCP server) to interact with its content programmatically.
Honestly, just having a well-organized BookStack instance is a game-changer for any team. But when you connect it to an LLM, it becomes something else entirely. Suddenly, you have an AI that can answer questions based on your actual documentation.
Imagine a new team member asking a question about your company's expense policy. Instead of having to track down the right document, they can just ask the AI, which will pull the answer directly from the official policy in BookStack. Or, think about your customer support team. They could have an AI assistant that can instantly find the right troubleshooting steps for a customer's issue, all based on your product's technical documentation.
This is where you can see the power of combining a great knowledge base with AI. & if you're looking for a way to bring this kind of AI-powered support to your customers, you should definitely check out Arsturn. Arsturn helps businesses create custom AI chatbots trained on their own data. These chatbots can provide instant customer support, answer questions, & engage with website visitors 24/7. It's a fantastic way to leverage the knowledge you've already documented to create a better customer experience.
The "MCP" in BookStack MCP Server: A Quick Explainer
Okay, so we know what BookStack is. Now, what's this "MCP" business? MCP stands for Model Context Protocol. It's an open protocol that was developed to standardize how applications provide context to LLMs.
Think of it like a USB-C cable for your AI. Before USB-C, you had a million different cables for all your different devices. It was a mess. Now, with USB-C, you have one standard that works for almost everything. MCP aims to do the same thing for LLMs. It creates a standardized way for an LLM to connect to different data sources & tools.
Here’s the basic idea behind MCP:
It’s a client-server model. You have an "MCP host" (like your LLM application), an "MCP client" (which connects the host to a server), & an "MCP server" (which provides access to the data or tool).
It defines a standard way to communicate. MCP uses a specific set of rules & formats for things like "prompts," "resources," and "tools." This means that any LLM that "speaks" MCP can connect to any MCP server, without needing a custom integration for each one.
It’s all about context. The whole point of MCP is to give the LLM the context it needs to answer questions & perform tasks accurately. By connecting to an MCP server, the LLM can access information that it wasn't trained on, like your company's private documentation.
So, a "BookStack MCP server" is simply an MCP server that's been specifically designed to connect to a BookStack instance. It acts as a bridge between your BookStack knowledge base & your LLM. When your LLM needs to answer a question, it can send a request to the BookStack MCP server, which will then search your BookStack instance, find the relevant information, & send it back to the LLM in a format it can understand.
This is a WAY more elegant solution than trying to build a custom integration from scratch. Because MCP is an open standard, you're not locked into a specific LLM or a specific tool. You can swap out your LLM, or even your knowledge base, without having to rebuild your entire system.
Let's Build It: Setting Up Your BookStack Server
Alright, enough theory. Let's get our hands dirty. The first step is to get a BookStack instance up & running. If you already have one, you can skip this section. But if you're starting from scratch, here's a general guide for installing it on an Ubuntu server.
A quick heads-up: This is a pretty standard web application installation. If you've ever set up a WordPress site or something similar, this will feel familiar. If not, don't worry, I'll walk you through it.
Step 1: Get a Server
First things first, you need a server. A basic VPS (Virtual Private Server) from any major cloud provider will do the trick. For this guide, we'll assume you're using a fresh installation of Ubuntu 24.04.
Step 2: Update Your Server & Install the Basics
Once you've got your server, SSH into it & run the following commands to update the package lists & install some essential tools: