bookstack-mcp 5.5.0 → 5.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,8 @@ npx bookstack-mcp
18
18
 
19
19
  Read the [privacy policy](./PRIVACY.md) for data flows, credentials, optional
20
20
  OAuth/Redis state, and logging. Your MCP client and deployment operator may have
21
- additional policies.
21
+ additional policies. The [terms of use](./TERMS.md) explain the scope of the
22
+ software under its [MIT license](./LICENSE).
22
23
 
23
24
  Field notes: [Why my BookStack MCP server starts read-only](https://hackyourworld.com/bookstack-mcp-server-read-only-by-default/) covers the shared-token rate-limit failure, process-wide cache, response-size measurements, and permission boundaries that shaped the current design.
24
25
 
@@ -78,10 +79,36 @@ use these tools to order pages and chapters within a book.
78
79
  (1–180 characters), saved as the revision summary in the page's history. It
79
80
  needs BookStack v26.09 or newer; older versions silently ignore it.
80
81
 
82
+ `get_page` accepts `format: "raw"` to return the page's stored editor HTML
83
+ (BookStack's `raw_html`). The `html` format is the rendered view readers see:
84
+ page includes are resolved and the content filter has run, so attributes such as
85
+ `rel`, `data-*` or legacy `width`/`align` may be gone.
86
+
87
+ When you edit a page, match the format to the page's `editor` field:
88
+
89
+ - **HTML (WYSIWYG) pages:** read `format: "raw"` and send the result back as
90
+ `update_page.html`. Starting from `html` saves the rendered output and drops
91
+ whatever rendering removed.
92
+ - **Markdown pages:** read `format: "markdown"` and send the result back as
93
+ `update_page.markdown`. For these pages `raw_html` is HTML generated from the
94
+ Markdown, and saving any `html` clears the stored Markdown source.
95
+
81
96
  > **Security warning:** `BOOKSTACK_INSECURE_SKIP_TLS_VERIFY=true` disables TLS certificate verification for outgoing requests to BookStack. Use only for self-signed certs on a trusted LAN — connections become vulnerable to MITM attacks. The server logs a `WARNING` line at startup whenever this is enabled.
82
97
 
83
98
  ## Client Configuration
84
99
 
100
+ ### Codex plugin
101
+
102
+ This repository includes a native Codex manifest at
103
+ `.codex-plugin/plugin.json`, which references the stdio server in `.mcp.json`.
104
+ Set `BOOKSTACK_BASE_URL`, `BOOKSTACK_TOKEN_ID`, and `BOOKSTACK_TOKEN_SECRET` in
105
+ the environment that launches Codex before enabling the plugin. Write operations
106
+ remain disabled unless `BOOKSTACK_ENABLE_WRITE=true` is set.
107
+
108
+ The manifest supplies the project website, privacy policy, and terms of use for
109
+ plugin directories, including HOL. The HOL Guard CI workflow scans this manifest
110
+ alongside the Claude and Gemini manifests; it does not submit or publish listings.
111
+
85
112
  ### Claude Desktop
86
113
 
87
114
  The easiest install is the prebuilt MCPB bundle attached to each [GitHub release](https://github.com/ttpears/bookstack-mcp/releases/latest):
package/TERMS.md ADDED
@@ -0,0 +1,42 @@
1
+ # Terms of use for bookstack-mcp
2
+
3
+ Last reviewed: 2026-10-10.
4
+
5
+ `bookstack-mcp` is open-source software you run locally or deploy yourself. Its
6
+ use, copying, modification, and distribution are governed by the
7
+ [MIT license](./LICENSE), including its copyright notice, warranty disclaimer,
8
+ and limitation of liability. This document explains that software's scope; it
9
+ does not add restrictions to the MIT license.
10
+
11
+ ## Software and hosted services
12
+
13
+ The repository distributes an MCP server, not a hosted BookStack service. The
14
+ project does not provide an account, subscription, service-level agreement, or
15
+ guarantee of support or availability. A separately operated deployment may have
16
+ its own terms, provided by its operator.
17
+
18
+ BookStack instances, MCP clients, AI providers, Microsoft Entra ID, Redis hosts,
19
+ and package registries are separate services. Their applicable terms and
20
+ policies govern your use of those services; this project does not make
21
+ commitments on their behalf.
22
+
23
+ ## Access and content
24
+
25
+ You choose the BookStack instance, credentials, connected clients, and deployment
26
+ configuration. Use credentials and content you are authorized to access, and
27
+ review AI-generated changes before relying on them. Write operations are disabled
28
+ by default; enabling them permits tools to create, modify, and delete content
29
+ within the configured BookStack user's permissions. Maintain backups appropriate
30
+ to your deployment.
31
+
32
+ The project does not claim ownership of your wiki content. Data handling is
33
+ described in [PRIVACY.md](./PRIVACY.md), and deployment security guidance and
34
+ vulnerability reporting are described in [SECURITY.md](./SECURITY.md).
35
+
36
+ ## Questions and versions
37
+
38
+ For questions about the software, use the
39
+ [project issue tracker](https://github.com/ttpears/bookstack-mcp/issues) without
40
+ including credentials or private content. Contact the relevant operator for
41
+ questions about a hosted deployment. This document is versioned with the
42
+ repository; consult the documents shipped with the revision you run.
@@ -209,9 +209,15 @@ export class BookStackClient {
209
209
  }
210
210
  async enhancePageResponse(page, options) {
211
211
  const url = await this.generatePageUrl(page);
212
- // Pick a single content format to return to avoid 3x duplication (html + markdown + text)
212
+ // Pick a single content format to return to avoid 3x duplication (html + markdown + text).
213
+ // 'raw' is the stored editor HTML; unlike 'html' it has not been through BookStack's
214
+ // render step, so it is the safe base for HTML written back with update_page.
215
+ // Markdown-authored pages should be edited through 'markdown' instead.
213
216
  const format = options?.format ?? 'markdown';
214
- const fullContent = (format === 'html' ? page.html : format === 'text' ? page.text : page.markdown) || '';
217
+ const fullContent = (format === 'html' ? page.html
218
+ : format === 'raw' ? page.raw_html
219
+ : format === 'text' ? page.text
220
+ : page.markdown) || '';
215
221
  // Character-range slicing so very large pages can be paginated
216
222
  const DEFAULT_LIMIT = 50000;
217
223
  const offset = Math.max(0, options?.offset ?? 0);
package/dist/index.js CHANGED
@@ -250,7 +250,7 @@ function registerTools(server, client, config) {
250
250
  description: "Get a page. Returns one format (default markdown); use offset/limit + content_next_offset to paginate large pages.",
251
251
  inputSchema: {
252
252
  id: z.coerce.number().min(1),
253
- format: z.enum(["markdown", "html", "text"]).optional().describe("Which content format to return. Defaults to markdown."),
253
+ format: z.enum(["markdown", "html", "text", "raw"]).optional().describe("Which content format to return. Defaults to markdown. 'html' is the rendered page as readers see it (includes resolved, content filtering applied); 'raw' is the stored editor HTML. To edit a page, check its 'editor' field: for HTML (WYSIWYG) pages read 'raw' and send it back as update_page.html; for Markdown pages read 'markdown' and send it back as update_page.markdown, because saving html clears the stored Markdown source."),
254
254
  offset: z.coerce.number().min(0).optional().describe("Character offset into the content to start from (default 0)"),
255
255
  limit: z.coerce.number().min(1).max(200000).optional().describe("Max characters of content to return (default 50000)")
256
256
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bookstack-mcp",
3
- "version": "5.5.0",
3
+ "version": "5.6.1",
4
4
  "description": "MCP server for BookStack wiki — search, read, create, and manage documentation via AI assistants",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "files": [
10
10
  "dist",
11
- "PRIVACY.md"
11
+ "PRIVACY.md",
12
+ "TERMS.md"
12
13
  ],
13
14
  "scripts": {
14
15
  "build": "tsc && shx chmod +x dist/*.js",