brewpage-mcp 1.16.3 → 1.16.4

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
@@ -17,7 +17,7 @@ Choosing a host? See how BrewPage compares with GitHub Pages, Netlify Drop, Tiin
17
17
  ## Quick Start
18
18
 
19
19
  ```bash
20
- npx -y brewpage-mcp@1.16.3
20
+ npx -y brewpage-mcp@1.16.4
21
21
  ```
22
22
 
23
23
  Requires Node.js 20 or newer. This starts the stdio server for an MCP client.
@@ -50,7 +50,7 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
50
50
  "mcpServers": {
51
51
  "brewpage": {
52
52
  "command": "npx",
53
- "args": ["-y", "brewpage-mcp@1.16.3"]
53
+ "args": ["-y", "brewpage-mcp@1.16.4"]
54
54
  }
55
55
  }
56
56
  }
@@ -61,7 +61,7 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
61
61
  Register a project-scoped stdio server:
62
62
 
63
63
  ```bash
64
- claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.16.3
64
+ claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.16.4
65
65
  ```
66
66
 
67
67
  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).
@@ -75,7 +75,7 @@ Open **Settings > MCP** and add:
75
75
  "mcpServers": {
76
76
  "brewpage": {
77
77
  "command": "npx",
78
- "args": ["-y", "brewpage-mcp@1.16.3"]
78
+ "args": ["-y", "brewpage-mcp@1.16.4"]
79
79
  }
80
80
  }
81
81
  }
@@ -89,7 +89,7 @@ Open the Cline MCP settings panel and add:
89
89
  {
90
90
  "brewpage": {
91
91
  "command": "npx",
92
- "args": ["-y", "brewpage-mcp@1.16.3"]
92
+ "args": ["-y", "brewpage-mcp@1.16.4"]
93
93
  }
94
94
  }
95
95
  ```
@@ -97,7 +97,7 @@ Open the Cline MCP settings panel and add:
97
97
  ### Global Install
98
98
 
99
99
  ```bash
100
- npm install -g brewpage-mcp@1.16.3
100
+ npm install -g brewpage-mcp@1.16.4
101
101
  brewpage-mcp
102
102
  ```
103
103
 
@@ -530,6 +530,10 @@ Every publish response includes an **owner token** -- the only credential that a
530
530
 
531
531
  ## Changelog
532
532
 
533
+ ## 1.16.4 -- 2026-10-30
534
+
535
+ - Owner update tools (`update_html`, `republish_site`, `update_json`, `set_kv`) answer a 404 with the server body plus which publish tool makes a new copy; `delete_resource` relays the 404 unchanged.
536
+
533
537
  ## 1.16.3 -- 2026-10-30
534
538
 
535
539
  - Create `ownerToken` description: the token from the first create keeps publications under one owner; the owner-token banner adds that it goes as `ownerToken` on later publishes and updates; `publish_site` says static HTML, CSS and JS (incl. built bundles) run in the browser, PHP and other server code never run. Gemini context: save `ownerToken` privately, never in chat.
package/dist/tools.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare const DEFAULT_BASE_URL = "https://brewpage.app";
3
- export declare const USER_AGENT = "brewpage-mcp/1.16.3";
3
+ export declare const USER_AGENT = "brewpage-mcp/1.16.4";
4
4
  export declare const OWNER_TOKEN_ENV = "BREWPAGE_OWNER_TOKEN";
5
5
  export interface ServerOptions {
6
6
  /** BrewPage origin for API calls; default https://brewpage.app. */
package/dist/tools.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { McpServer } from "@modelcontextprotocol/server";
2
2
  import { z } from "zod";
3
3
  export const DEFAULT_BASE_URL = "https://brewpage.app";
4
- export const USER_AGENT = "brewpage-mcp/1.16.3";
4
+ export const USER_AGENT = "brewpage-mcp/1.16.4";
5
5
  export const OWNER_TOKEN_ENV = "BREWPAGE_OWNER_TOKEN";
6
6
  const READ_ONLY = { readOnlyHint: true };
7
7
  const DESTRUCTIVE = { readOnlyHint: false, destructiveHint: true };
@@ -59,13 +59,20 @@ function retryAfterText(status, headers) {
59
59
  const after = status === 503 ? headers?.get("retry-after") : null;
60
60
  return after ? ` Retry-After: ${after}.` : "";
61
61
  }
62
- /** Owner-tool failure: the server answer verbatim plus a hint for a plain wrong-token 403 or a frozen old publication. */
62
+ /** Create tool for each content update: a 404 update means the row is gone, so the agent publishes anew. */
63
+ const PUBLISH_TOOL_FOR = {
64
+ "update HTML": "publish_html", "republish site": "publish_site", "update JSON": "publish_json", "set KV": "publish_kv",
65
+ };
66
+ /** Owner-tool failure: the server answer verbatim plus a hint for a wrong-token 403, a missing row or a frozen old publication. */
63
67
  function ownerFailure(operation, status, data, fromEnv, headers) {
64
68
  const lines = [`Failed to ${operation} (${status}): ${JSON.stringify(data)}${retryAfterText(status, headers)}`];
65
69
  const code = data?.code;
66
70
  if (status === 403 && (code === undefined || code === "OWNER_AUTHORIZATION_FAILED")) {
67
71
  lines.push(`Wrong owner token for this publication. Use ownerToken from create.${fromEnv ? ` Sent: ${OWNER_TOKEN_ENV}.` : ""}`);
68
72
  }
73
+ if (status === 404 && PUBLISH_TOOL_FOR[operation]) {
74
+ lines.push(`Use the ${PUBLISH_TOOL_FOR[operation]} tool to publish a new copy.`);
75
+ }
69
76
  if (status === 409 && code === OLD_READ_ONLY_CODE) {
70
77
  const { createUrl, republishUrl } = data;
71
78
  lines.push("Read-only old publication: cannot be updated. " +
@@ -209,7 +216,7 @@ export function createServer(options = {}) {
209
216
  const apiFetch = options.fetch ?? fetch;
210
217
  const server = new McpServer({
211
218
  name: "brewpage-mcp",
212
- version: "1.16.3",
219
+ version: "1.16.4",
213
220
  });
214
221
  /** Caller argument first, then the configured default; `fromEnv` marks the configured one. */
215
222
  function ownerTokenFor(argument) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brewpage-mcp",
3
- "version": "1.16.3",
3
+ "version": "1.16.4",
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",