brewpage-mcp 1.9.3 → 1.9.5

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.
Files changed (3) hide show
  1. package/README.md +22 -12
  2. package/dist/index.js +8 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@ MCP server for [BrewPage](https://brewpage.app) -- publish and manage HTML, KV,
12
12
  ## Quick Start
13
13
 
14
14
  ```bash
15
- npx -y brewpage-mcp@1.9.3
15
+ npx -y brewpage-mcp@1.9.5
16
16
  ```
17
17
 
18
18
  Requires Node.js 20 or newer. This starts the stdio server for an MCP client.
@@ -28,7 +28,7 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
28
28
  "mcpServers": {
29
29
  "brewpage": {
30
30
  "command": "npx",
31
- "args": ["-y", "brewpage-mcp@1.9.3"]
31
+ "args": ["-y", "brewpage-mcp@1.9.5"]
32
32
  }
33
33
  }
34
34
  }
@@ -39,7 +39,7 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
39
39
  Register a project-scoped stdio server:
40
40
 
41
41
  ```bash
42
- claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.9.3
42
+ claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.9.5
43
43
  ```
44
44
 
45
45
  This writes `.mcp.json` in the project root. Use `--scope user` for user-scoped registration. See the [official Claude Code MCP guide](https://code.claude.com/docs/en/mcp).
@@ -53,7 +53,7 @@ Open **Settings > MCP** and add:
53
53
  "mcpServers": {
54
54
  "brewpage": {
55
55
  "command": "npx",
56
- "args": ["-y", "brewpage-mcp@1.9.3"]
56
+ "args": ["-y", "brewpage-mcp@1.9.5"]
57
57
  }
58
58
  }
59
59
  }
@@ -67,7 +67,7 @@ Open the Cline MCP settings panel and add:
67
67
  {
68
68
  "brewpage": {
69
69
  "command": "npx",
70
- "args": ["-y", "brewpage-mcp@1.9.3"]
70
+ "args": ["-y", "brewpage-mcp@1.9.5"]
71
71
  }
72
72
  }
73
73
  ```
@@ -75,7 +75,7 @@ Open the Cline MCP settings panel and add:
75
75
  ### Global Install
76
76
 
77
77
  ```bash
78
- npm install -g brewpage-mcp@1.9.3
78
+ npm install -g brewpage-mcp@1.9.5
79
79
  brewpage-mcp
80
80
  ```
81
81
 
@@ -106,21 +106,21 @@ All five publish tools accept optional `deliveryMode: "path" | "subdomain"`, sen
106
106
 
107
107
  The MCP server wraps a subset of the backend-generated public [REST contract](../openapi/openapi.json). Its inputs retain their published behavior: TTL inputs accept 1–30 days (default 15), while backend owner-specific caps and eligible automatic extensions can affect actual expiry. Use returned `expiresAt`. `get_page` reads stored rendered HTML or format-specific code/text from the API; it does not call the owner-only original-source endpoint or a browser viewer. `publish_file` uploads from a source URL and does not expose password or TTL inputs.
108
108
 
109
- For a fresh publication, sites and non-public namespaces require Dedicated subdomain (`subdomain`); explicit `path` is rejected. Other public publications default to Promotion (`path`) and may choose Dedicated subdomain, including password-protected content. Promotion uses a BrewPage path with stricter active-document restrictions. Each NEW site gets one publication-specific host for its complete bundle, preserving relative/root-relative paths; missing assets return 404, with no SPA fallback. Third-party widgets may still need provider configuration.
109
+ For a fresh publication, sites and HTML pages of format `HTML` outside `public` (including the generated unlisted namespace) require Dedicated subdomain (`subdomain`); explicit `path` is rejected. Everything else in any namespace (Markdown, code/text, files, JSON, KV, public HTML) defaults to Promotion (`path`) and may choose Dedicated subdomain, including password-protected content. Promotion uses a BrewPage path with stricter active-document restrictions. Each NEW site gets one publication-specific host for its complete bundle, preserving relative/root-relative paths; missing assets return 404, with no SPA fallback. Third-party widgets may still need provider configuration.
110
110
 
111
111
  Responses use the server's primary `link` verbatim, including the root slash, and expose `routingCohort`, actual/requested/effective modes, `deliveryModeMatched`, `modeLocked`, `hostingVersion`, access and the trusted-apex `managementLink` when present. Never reconstruct a host from namespace or ID. NEW password links are clean URLs: do not add `?p=`; browser readers unlock through the trusted gateway. Owner tokens and API calls stay on the configured apex API origin.
112
112
 
113
113
  When `deliveryMode` is omitted for a `public` HTML or Markdown page, the server may publish it on its own subdomain if the page needs browser features a BrewPage link does not provide. `publish_html` then prints `deliveryModeReason: "auto:<codes>"` and a `Delivery notice:` line with the server's explanation; pass `deliveryMode: "path"` to keep a BrewPage link, or change it later with `update_hosting`. `advisory:<codes>` (from `publish_html` or `update_html`) means the address was not changed but such features were found. Codes are comma-separated, drawn from `storage`, `cookies`, `history`, `downloads`, `top-navigation`, `media-capture`, `pointer-lock`, `embeds`, `fullscreen`. Neither line appears when nothing applies.
114
114
 
115
- An existing deduplication winner keeps its actual URL, cohort and mode, even when another mode was requested. OLD publications display **Existing link**, with null mode metadata; their legacy links and behavior remain unchanged. Ordinary content updates and site republishing preserve hosting. An eligible NEW public non-site may change mode separately with `update_hosting`.
115
+ When creation returns an existing publication, it keeps its actual URL, cohort and mode, even when another mode was requested. OLD publications display **Existing link**, with null mode metadata; their legacy links and behavior remain unchanged. Ordinary content updates and site republishing preserve hosting. An eligible NEW publication (not a site, not a non-public `html`-format HTML page) may change mode separately with `update_hosting`.
116
116
 
117
117
  ### Hosting
118
118
 
119
119
  ### `update_hosting`
120
120
 
121
- Change an eligible NEW public non-site between Promotion and Dedicated subdomain. Parameters: `type` (`html` | `file` | `json` | `kv`), `namespace`, `id`, `ownerToken`, `deliveryMode` (`path` | `subdomain`), and `expectedVersion` (current server `hostingVersion`, integer ≥1).
121
+ Change an eligible NEW publication (not a site, not a non-public `html`-format HTML page) between Promotion and Dedicated subdomain. Parameters: `type` (`html` | `file` | `json` | `kv`), `namespace`, `id`, `ownerToken`, `deliveryMode` (`path` | `subdomain`), and `expectedVersion` (current server `hostingVersion`, integer ≥1).
122
122
 
123
- The tool sends owner-only `PATCH /api/{html|files|json|kv}/{namespace}/{id}/hosting` with `{deliveryMode, expectedVersion}` and `X-Owner-Token`. OLD links, sites and non-public publications are locked. The server returns 403 for invalid owner authority, 400 for locked hosting, and 409 for a stale version; reload current metadata before retrying. A paused real change returns 503. Selecting the current mode returns 200 without incrementing the version. Use the returned primary link after a successful change; the publication host identity is retained through both directions.
123
+ The tool sends owner-only `PATCH /api/{html|files|json|kv}/{namespace}/{id}/hosting` with `{deliveryMode, expectedVersion}` and `X-Owner-Token`. OLD links, sites and non-public `html`-format HTML pages are locked. The server returns 403 for invalid owner authority, 400 for locked hosting, and 409 for a stale version; reload current metadata before retrying. A paused real change returns 503. Selecting the current mode returns 200 without incrementing the version. Use the returned primary link after a successful change; the publication host identity is retained through both directions.
124
124
 
125
125
  ```text
126
126
  update_hosting(type="html", namespace="public", id="aBcDeFgHiJ", ownerToken="tok_...", deliveryMode="subdomain", expectedVersion=1)
@@ -130,7 +130,7 @@ update_hosting(type="html", namespace="public", id="aBcDeFgHiJ", ownerToken="tok
130
130
 
131
131
  ### `publish_html`
132
132
 
133
- Publish HTML or Markdown content to BrewPage. Returns a public URL and owner token.
133
+ Publish HTML or Markdown content to BrewPage. Returns a public URL and owner token. Markdown raw HTML is rendered through an allowlist: scripts, styles, event handlers, forms, frames/embeds and `meta`/`base`/`link` are removed; links allow `http`, `https`, `mailto`, `tel` and relative URLs, images also `data:`; a lone unknown tag such as `<author>` shows as text.
134
134
 
135
135
  Parameters: `content` (string), `format` (`HTML` | `MARKDOWN`, default `HTML`), `namespace` (optional -- **omit for unlisted content**; pass `public` only for gallery/search eligibility, except when password-protected), `password` (optional), `ttlDays` (1--30, default 15), `filename` (optional, used as title fallback), `showTopBar` (optional boolean -- adds a toolbar with filename, Download button, and theme toggle), `deliveryMode` (optional).
136
136
 
@@ -392,7 +392,7 @@ get_stats()
392
392
  | "Upload this image / PDF / video" | `publish_file` | Fetches from URL; inline preview on short URL |
393
393
  | "Deploy this static site" | `publish_site` | Pass `files` array or `entryContent` |
394
394
  | "Replace the site I published" | `republish_site` | Owner token; complete bundle replaces all existing files |
395
- | "Give my public page a dedicated address" | `update_hosting` | NEW public non-site; owner token + current hosting version |
395
+ | "Give my public page a dedicated address" | `update_hosting` | NEW publication, not a site or non-public HTML-format page; owner token + current hosting version |
396
396
  | "Fix a typo in the page I shared -- same link" | `update_html` | Requires `ownerToken`; URL stays the same |
397
397
  | "Remove the page I published" | `delete_resource` | Requires `ownerToken` from creation |
398
398
  | "Read back the page I published" | `get_page` | Returns raw content for editing |
@@ -433,6 +433,16 @@ Every publish response includes an **owner token** -- the only credential that a
433
433
 
434
434
  ## Changelog
435
435
 
436
+ ## 1.9.5 -- 2026-10-21
437
+
438
+ - `deliveryMode`, `publish_html` and `update_hosting` describe the backend 1.117.0 delivery rule: sites and non-public HTML-format pages require `subdomain`; Markdown, code/text, files, JSON and KV default to `path` in any namespace. `publish_html` notes that Markdown raw HTML is allowlist-sanitized.
439
+ - Keep sixteen tools, all input defaults and HTTP behavior unchanged. Independently versioned from backend API contract 1.117.0.
440
+
441
+ ## 1.9.4 -- 2026-10-20
442
+
443
+ - Tool descriptions and responses describe a create that returns an existing publication in plain terms; its link and delivery mode are kept as returned.
444
+ - Keep sixteen tools, all input defaults and HTTP behavior unchanged. Independently versioned from backend API contract 1.113.0.
445
+
436
446
  ## 1.9.3 -- 2026-10-11
437
447
 
438
448
  - Correct tool/discovery descriptions for unlisted access, conditional native indexing, exact share links, current limits, owner/extension TTL exceptions, retained site-republish expiry and API content representations.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { z } from "zod";
5
5
  const BASE_URL = process.env.BREWPAGE_URL || "https://brewpage.app";
6
6
  const server = new McpServer({
7
7
  name: "brewpage-mcp",
8
- version: "1.9.3",
8
+ version: "1.9.5",
9
9
  });
10
10
  const PUBLIC_NAMESPACE = "public";
11
11
  /**
@@ -37,9 +37,9 @@ const NAMESPACE_DESCRIPTION = "Optional. Omit to generate an unlisted namespace:
37
37
  "or pass `public` ONLY when the user explicitly wants gallery/search eligibility. " +
38
38
  "Password-protected content stays excluded; unlisted, protected or otherwise ineligible native responses carry noindex; eligible public HTML, sites and files may permit indexing.";
39
39
  const DELIVERY_MODE_SCHEMA = z.enum(["path", "subdomain"]).optional().describe("Optional delivery choice for a fresh publication, independent of password/namespace. " +
40
- "Public non-sites normally default to path (Promotion); public HTML may automatically choose subdomain for browser features. " +
41
- "Fresh sites and non-public content require subdomain. " +
42
- "An existing dedup winner keeps its actual mode and URL.");
40
+ "Fresh sites and HTML-format pages outside public (including the default unlisted namespace) require subdomain; explicit path there is rejected. " +
41
+ "Everything else in any namespace (Markdown, code/text, files, JSON, KV, public HTML) defaults to path (Promotion); public HTML may automatically choose subdomain for browser features. " +
42
+ "When creation returns an existing publication, it keeps its actual mode and URL.");
43
43
  function hostingResponseLines(data) {
44
44
  const fields = ["routingCohort", "deliveryMode", "requestedDeliveryMode", "effectiveDeliveryMode",
45
45
  "deliveryModeMatched", "modeLocked", "hostingVersion", "access", "managementLink"];
@@ -47,7 +47,7 @@ function hostingResponseLines(data) {
47
47
  if (data.routingCohort === "old")
48
48
  lines.push("Hosting: Existing link");
49
49
  if (data.deliveryModeMatched === false)
50
- lines.push("Requested hosting differs from the existing winner; its URL and mode were preserved.");
50
+ lines.push("Requested hosting differs from the existing publication; its URL and mode were preserved.");
51
51
  lines.push(...deliveryReasonLines(data));
52
52
  return lines;
53
53
  }
@@ -111,7 +111,7 @@ function formatUpdateResponse(data) {
111
111
  }
112
112
  server.tool("publish_html", "Publish HTML or Markdown content to BrewPage (repository default limit 5 MiB). Returns its primary share link and owner token. Supports password protection, custom TTL, optional filename, and an opt-in top toolbar (showTopBar). " +
113
113
  "When deliveryMode is omitted for a `public` page, the server may publish it on its own subdomain if the page needs browser features a BrewPage link does not provide; " +
114
- "the result then includes deliveryModeReason and a delivery notice. Always share the returned URL.", {
114
+ "the result then includes deliveryModeReason and a delivery notice. Markdown raw HTML is allowlisted: scripts, styles, event handlers, forms and embeds are removed. Always share the returned URL.", {
115
115
  content: z.string().describe("HTML or Markdown content to publish"),
116
116
  deliveryMode: DELIVERY_MODE_SCHEMA,
117
117
  format: z
@@ -229,9 +229,9 @@ server.tool("publish_file", "Upload a file to BrewPage via URL. Repository defau
229
229
  ],
230
230
  };
231
231
  });
232
- server.tool("update_hosting", "Change delivery mode for a NEW public non-site publication. Requires owner token and current hostingVersion. OLD links and forced subdomain modes are locked; reload after a 409 conflict. Content updates never change hosting.", {
232
+ server.tool("update_hosting", "Change delivery mode for a NEW publication (not a site, not a non-public HTML-format page). Requires owner token and current hostingVersion. OLD links and forced subdomain modes are locked; reload after a 409 conflict. Content updates never change hosting.", {
233
233
  type: z.enum(["html", "file", "json", "kv"]).describe("Resource type; sites have no hosting-choice endpoint"),
234
- namespace: z.string().describe("Resource namespace; only public is eligible"),
234
+ namespace: z.string().describe("Resource namespace; non-public HTML-format pages are locked"),
235
235
  id: z.string().describe("Resource ID"),
236
236
  ownerToken: z.string().describe("Original resource owner token"),
237
237
  deliveryMode: z.enum(["path", "subdomain"]).describe("path = Promotion; subdomain = Dedicated subdomain"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brewpage-mcp",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "mcpName": "io.github.kochetkov-ma/brewpage-mcp",
5
5
  "description": "MCP server for BrewPage — publish and manage HTML, sites, KV, JSON and files from AI assistants",
6
6
  "type": "module",