TB

ttpears/bookstack-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

59 stars 24 forks 质量 77 趋势 21MIT

ttpears/bookstack-mcp 是从 https://github.com/ttpears/bookstack-mcp. 导入的 MCP 服务器候选

概览

ttpears/bookstack-mcp 是从 https://github.com/ttpears/bookstack-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,赋予AI助手对BookStack文档的完全访问权限——搜索、阅读、创建和管理内容。

请阅读关于数据流、凭证、可选的隐私政策 OAuth/Redis 状态和日志。你的 MCP 客户端和部署操作员可能有 附加政策。使用条款说明了 其MIT许可下的软件。

现场笔记:为什么我的BookStack MCP服务器开始只读,涵盖了共享令牌速率限制失败、进程范围缓存、响应大小测量以及权限边界,这些都塑造了当前的设计。

特色

  • 21个只读工具 + 22个用于BookStack API访问的写入工具
  • 书籍、章节、页面、书架、附件和评论——完整CRUD
  • 支持回收站——恢复或永久删除软删除内容
  • 通过Zod实现类型安全输入验证(自动强制字符串/数字参数以实现广泛的客户端兼容性)
  • 所有回复中嵌入URL和内容预览
  • 为HTML编写页面提供Markdown导出备份,确保AI客户端始终获得可用内容
  • 令牌高效响应:紧凑的JSON,无冗余字段,无N+1次取用——有效载荷比3.x小~55%

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

BookStack MCP Server

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:

{
在 GitHub 查看完整 README

安装

npx -y [email protected]
新手?先看 mcpskill.org 教程 →

配置

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