bookstack-mcp 3.3.0 → 3.3.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
@@ -135,16 +135,65 @@ When binding to `0.0.0.0` (e.g. inside a container reachable from other services
135
135
 
136
136
  Restart LibreChat after config changes.
137
137
 
138
- ### Claude Code (plugin marketplace)
138
+ ### Claude Code (CLI)
139
139
 
140
- This repo ships a Claude Code plugin manifest (`.claude-plugin/plugin.json`). Add the marketplace and install:
140
+ The recommended path is the `ttpears/claude-plugins` marketplace, which ships this repo's plugin manifest (`.claude-plugin/plugin.json`):
141
141
 
142
142
  ```
143
143
  /plugin marketplace add ttpears/claude-plugins
144
144
  /plugin install bookstack-mcp@ttpears-plugins
145
145
  ```
146
146
 
147
- Then set the `BOOKSTACK_*` environment variables in your shell so the plugin's MCP server can authenticate.
147
+ Then set the `BOOKSTACK_*` environment variables in your shell so the plugin's MCP server can authenticate:
148
+
149
+ ```bash
150
+ export BOOKSTACK_BASE_URL=https://your-bookstack.com
151
+ export BOOKSTACK_TOKEN_ID=your-token-id
152
+ export BOOKSTACK_TOKEN_SECRET=your-token-secret
153
+ ```
154
+
155
+ #### Manual install (alternative)
156
+
157
+ If you'd rather not use the marketplace, register the server directly with `claude mcp add`. Repeat `--env` for each variable, put all flags **before** the server name, and use `--` to mark the start of the command Claude Code will spawn:
158
+
159
+ ```bash
160
+ claude mcp add bookstack \
161
+ --transport stdio \
162
+ --scope user \
163
+ --env BOOKSTACK_BASE_URL=https://your-bookstack.com \
164
+ --env BOOKSTACK_TOKEN_ID=your-token-id \
165
+ --env BOOKSTACK_TOKEN_SECRET=your-token-secret \
166
+ -- npx -y bookstack-mcp
167
+ ```
168
+
169
+ Scope picks where the entry is written:
170
+
171
+ | Scope | Where it lives | Shared via git | Use it when |
172
+ |-------|----------------|----------------|-------------|
173
+ | `local` (default) | `~/.claude.json`, scoped to the current project | No | Trying it out in one repo |
174
+ | `user` | `~/.claude.json`, available in every project | No | You want bookstack everywhere |
175
+ | `project` | `.mcp.json` at the repo root | Yes | The whole team should get it |
176
+
177
+ The resulting config entry looks like this (in `.mcp.json` for project scope, or `~/.claude.json` otherwise):
178
+
179
+ ```json
180
+ {
181
+ "mcpServers": {
182
+ "bookstack": {
183
+ "type": "stdio",
184
+ "command": "npx",
185
+ "args": ["-y", "bookstack-mcp"],
186
+ "env": {
187
+ "BOOKSTACK_BASE_URL": "https://your-bookstack.com",
188
+ "BOOKSTACK_TOKEN_ID": "your-token-id",
189
+ "BOOKSTACK_TOKEN_SECRET": "your-token-secret"
190
+ }
191
+ }
192
+ }
193
+ }
194
+ ```
195
+
196
+ > **Tip for committed `.mcp.json`:** Claude Code expands `${VAR}` and `${VAR:-default}` references in `.mcp.json` from the surrounding shell. Use that to keep secrets out of git: set `"BOOKSTACK_TOKEN_SECRET": "${BOOKSTACK_TOKEN_SECRET}"` in the file and have each developer export the variable in their shell.
148
197
 
149
198
  ## MCP Resources
150
199
 
@@ -92,8 +92,11 @@ export class BookStackClient {
92
92
  const slice = fullContent.substring(offset, offset + limit);
93
93
  const nextOffset = offset + slice.length;
94
94
  const truncated = nextOffset < totalChars;
95
- // Strip duplicate large fields from the base page object
96
- const { html: _h, markdown: _m, text: _t, ...pageMeta } = page;
95
+ // Strip duplicate large fields from the base page object. raw_html is the
96
+ // unprocessed editor source BookStack returns alongside html/markdown/text;
97
+ // leaving it in would bypass the limit/offset pagination and can blow past
98
+ // MCP token caps for large pages.
99
+ const { html: _h, markdown: _m, text: _t, raw_html: _r, ...pageMeta } = page;
97
100
  return {
98
101
  ...pageMeta,
99
102
  url,
@@ -265,9 +268,9 @@ export class BookStackClient {
265
268
  const preview = page.text
266
269
  ? `${page.text.substring(0, 200)}${page.text.length > 200 ? '...' : ''}`
267
270
  : 'No content preview available';
268
- // List responses from BookStack don't include html/markdown/text, but strip defensively
269
- // and never embed full content here — use get_page for that.
270
- const { html: _h, markdown: _m, text: _t, ...pageMeta } = page;
271
+ // List responses from BookStack don't include html/markdown/text/raw_html, but strip
272
+ // defensively and never embed full content here — use get_page for that.
273
+ const { html: _h, markdown: _m, text: _t, raw_html: _r, ...pageMeta } = page;
271
274
  return {
272
275
  ...pageMeta,
273
276
  url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bookstack-mcp",
3
- "version": "3.3.0",
3
+ "version": "3.3.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": {