
pnocera/bookstack-mcp-server 是从 https://github.com/pnocera/bookstack-mcp-server. 导入的 MCP 服务器候选
概览
pnocera/bookstack-mcp-server 是从 https://github.com/pnocera/bookstack-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
通过模型上下文协议(MCP)将BookStack与Claude及其他AI助手连接起来。该服务器展示了59个工具和11个资源,涵盖BookStack API的子集——书籍、页面、章节、书架、搜索、用户、角色、权限、附件、图片、回收站、审计日志和系统信息。
该服务器支持两种传输模式:可流式HTTP(默认)和Stdio。
- 可流式HTTP(默认):无状态HTTP传输。认证参数可通过HTTP头部(
x-bookstack-url和x-bookstack-token)为每次请求覆盖。 - Stdio 模式:本地集成的标准输入/输出(例如与 Claude Desktop 连接)。将
MCP_TRANSPORT=stdio设置为启用。
⚠️ 在寻找HTTP端点? MCP端点是
POST /message——不是/。 请参见下文的传输和HTTP端点。
✨ 你得到了什么
- BookStack集成 - 访问您的书籍、页面、章节和内容
- 59 个 MCP 工具和 11 个资源 - 支持的终端系列间的 CRUD、搜索和导出
- 搜索与导出 - 查找内容并导出多种格式
- 用户管理 - 处理用户、角色和权限
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
BookStack MCP Server
Connect BookStack to Claude and other AI assistants through the Model Context Protocol (MCP). This server exposes 59 tools and 11 resources covering the supported subset of the BookStack API — books, pages, chapters, shelves, search, users, roles, permissions, attachments, images, the recycle bin, the audit log and system info.
This server supports two transport modes: Streamable HTTP (default) and Stdio.
- Streamable HTTP (default): A stateless HTTP transport. Authentication parameters can be overridden per-request using HTTP headers (
x-bookstack-urlandx-bookstack-token). - Stdio Mode: Standard input/output for local integration (e.g., with Claude Desktop). Set
MCP_TRANSPORT=stdioto enable.
⚠️ Looking for the HTTP endpoint? The MCP endpoint is
POST /message— not/. See Transports and HTTP endpoints below.
✨ What You Get
- BookStack Integration - Access your books, pages, chapters, and content
- 59 MCP Tools & 11 Resources - CRUD, search and export across the supported endpoint families
- Search & Export - Find content and export in multiple formats
- User Management - Handle users, roles, and permissions
- Production Ready - Rate limiting, validation, error handling, and logging
🚀 Quick Start
⚠️ Requires Bun 1.1.0 or newer. Node.js is not supported. This package ships TypeScript source rather than a compiled bundle, and its executable starts with
#!/usr/bin/env bun— Bun must be installed on the machine that runs it.npx/npm install -gwill not work.
Configure first — the default HTTP transport refuses to start until both tokens below are set:
# 1. Configure
export BOOKSTACK_BASE_URL="https://your-bookstack.com/api"
export BOOKSTACK_API_TOKEN="token_id:token_secret" # OUTBOUND: the credential this server spends
export MCP_AUTH_TOKEN="$(openssl rand -hex 32)" # INBOUND: who may make it spend that credential
# 2. Run without installing (starts the HTTP server on port 3000)
bunx bookstack-mcp-server
# Or install globally, then run it by name
bun add -g bookstack-mcp-server
bookstack-mcp-server
The two tokens are not interchangeable and must not be set to the same value:
BOOKSTACK_API_TOKEN is what the server presents to BookStack; MCP_AUTH_TOKEN is
what callers must present to POST /message, which dispatches all 59 tools with the
authority of the BookStack account behind BOOKSTACK_API_TOKEN. Skip MCP_AUTH_TOKEN
only for stdio, which has no network surface and ignores it.
Check it started:
curl http://localhost:3000/ # => {"status":"running", ...}
curl -i http://localhost:3000/health # => 200 healthy, or 503 if BookStack is unreachable
Add to Claude
To use with Claude Desktop (requires Stdio mode):
# For Claude Code
claude mcp add bookstack bunx bookstack-mcp-server \
安装
docker run -i --rm \