brewpage-mcp 1.16.6 → 1.16.7

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.6
20
+ npx -y brewpage-mcp@1.16.7
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.6"]
53
+ "args": ["-y", "brewpage-mcp@1.16.7"]
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.6
64
+ claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.16.7
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.6"]
78
+ "args": ["-y", "brewpage-mcp@1.16.7"]
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.6"]
92
+ "args": ["-y", "brewpage-mcp@1.16.7"]
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.6
100
+ npm install -g brewpage-mcp@1.16.7
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.7 -- 2026-11-01
534
+
535
+ - Owner tools answer a 404 `WRONG_RESOURCE_TYPE` (this id lives under another type) with the server body plus the `resourceUrl` to repeat the write at, instead of the publish-anew hint. Contract 2.8.58.
536
+
533
537
  ## 1.16.6 -- 2026-10-31
534
538
 
535
539
  - `publish_html`, `publish_file` and `publish_site` descriptions lead with `namespace=public` to be found (gallery + Google, Bing & AI search; omitted: private); the `namespace` input names what to publish publicly (docs, guides, demos, portfolios, reports, landing pages) and the generated `priv-*` default; the private result line says how to be found. Shorter texts, no new facts.
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.6";
3
+ export declare const USER_AGENT = "brewpage-mcp/1.16.7";
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.6";
4
+ export const USER_AGENT = "brewpage-mcp/1.16.7";
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 };
@@ -21,6 +21,7 @@ const SECRETS = "Secrets allowed; likely ones are flagged in notices. Private na
21
21
  NO_PUBLIC_CREDENTIALS;
22
22
  const MANAGE_URL_TEXT = "Returns manageUrl, a private management link (grants control; not for public sharing).";
23
23
  const OLD_READ_ONLY_CODE = "OLD_PUBLICATION_READ_ONLY";
24
+ const WRONG_TYPE_CODE = "WRONG_RESOURCE_TYPE";
24
25
  const OLD_READ_ONLY_TEXT = ` Old publications (made before 5 October 2026) are read-only: 409 ${OLD_READ_ONLY_CODE} with createUrl to publish anew.`;
25
26
  /** Notice codes the agent must relay to the user. */
26
27
  const WARNING_CODES = new Set(["secret-detected"]);
@@ -63,14 +64,18 @@ function retryAfterText(status, headers) {
63
64
  const PUBLISH_TOOL_FOR = {
64
65
  "update HTML": "publish_html", "republish site": "publish_site", "update JSON": "publish_json", "set KV": "publish_kv",
65
66
  };
66
- /** Owner-tool failure: the server answer verbatim plus a hint for a wrong-token 403, a missing row or a frozen old publication. */
67
+ /** Owner-tool failure: server answer verbatim plus a hint for wrong-token 403, wrong-type or missing row, frozen old publication. */
67
68
  function ownerFailure(operation, status, data, fromEnv, headers) {
68
69
  const lines = [`Failed to ${operation} (${status}): ${JSON.stringify(data)}${retryAfterText(status, headers)}`];
69
70
  const code = data?.code;
70
71
  if (status === 403 && (code === undefined || code === "OWNER_AUTHORIZATION_FAILED")) {
71
72
  lines.push(`Wrong owner token for this publication. Use ownerToken from create.${fromEnv ? ` Sent: ${OWNER_TOKEN_ENV}.` : ""}`);
72
73
  }
73
- if (status === 404 && PUBLISH_TOOL_FOR[operation]) {
74
+ const resourceUrl = data?.resourceUrl;
75
+ if (status === 404 && code === WRONG_TYPE_CODE && typeof resourceUrl === "string") {
76
+ lines.push(`Wrong type for this id: repeat the write at resourceUrl (${resourceUrl}).`);
77
+ }
78
+ else if (status === 404 && PUBLISH_TOOL_FOR[operation]) {
74
79
  lines.push(`Use the ${PUBLISH_TOOL_FOR[operation]} tool to publish a new copy.`);
75
80
  }
76
81
  if (status === 409 && code === OLD_READ_ONLY_CODE) {
@@ -218,7 +223,7 @@ export function createServer(options = {}) {
218
223
  const apiFetch = options.fetch ?? fetch;
219
224
  const server = new McpServer({
220
225
  name: "brewpage-mcp",
221
- version: "1.16.6",
226
+ version: "1.16.7",
222
227
  });
223
228
  /** Caller argument first, then the configured default; `fromEnv` marks the configured one. */
224
229
  function ownerTokenFor(argument) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brewpage-mcp",
3
- "version": "1.16.6",
3
+ "version": "1.16.7",
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",