
BookStack
STDIOMCP server for searching BookStack pages with HTML-to-text conversion
MCP server for searching BookStack pages with HTML-to-text conversion
A Model Context Protocol (MCP) server that provides tools for searching pages from BookStack. This server interacts with the BookStack API and provides structured data for pages with clean HTML-to-text conversion.
To install mcp-bookstack for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @yellowgg2/mcp-bookstack --client claude
git clone https://github.com/yellowgg2/mcp-bookstack.git cd mcp-bookstack
npm install
Create a .env
file with your BookStack API credentials or provide them in the MCP settings configuration file:
BOOKSTACK_API_TOKEN=your_token
BOOKSTACK_API_URL=your_bookstack_url
BOOKSTACK_API_KEY=your_api_key
npm run build
For VSCode Claude extension:
{ "mcpServers": { "bookstack": { "command": "node", "args": ["/path/to/mcp-bookstack/build/app.js"], "env": { "BOOKSTACK_API_URL": "your_bookstack_url", "BOOKSTACK_API_TOKEN": "your_token", "BOOKSTACK_API_KEY": "your_api_key" } } } }
The server provides a tool called search_pages
that can be used to search pages from BookStack.
Parameters:
query
(string): Query to search for pages
page
(number): Page number to return
count
(number): Number of pages to return
Example usage:
use_mcp_tool with: server_name: "bookstack" tool_name: "search_pages" arguments: { "query": "knowledge base", "page": 1, "count": 5 }
Sample output:
# Page Title
Page content in plain text format...
Source: https://your-bookstack-url/page-url
To use this MCP server with Claude, you'll need to:
For the Claude desktop app, VSCode Claude extension, and Cursor, add the server configuration to:
// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) // %APPDATA%\Claude\claude_desktop_config.json (Windows) { "mcpServers": { "bookstack": { "command": "node", "args": ["/path/to/mcp-bookstack/build/app.js"], "env": { "BOOKSTACK_API_URL": "your_bookstack_url", "BOOKSTACK_API_TOKEN": "your_token", "BOOKSTACK_API_KEY": "your_api_key" } } } }
Once configured, you can interact with Claude using natural language to search BookStack pages. Examples:
Claude will automatically use the appropriate parameters to search for the pages you want.
Each page response includes:
The HTML-to-text conversion handles:
The server is built using:
To modify the server:
src/app.ts
npm run build
The server includes robust error handling for:
Errors are returned with appropriate error codes and descriptive messages.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this in your own projects.