brewpage-mcp 1.16.2 → 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 +14 -6
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +14 -6
- package/package.json +1 -1
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
100
|
+
npm install -g brewpage-mcp@1.16.4
|
|
101
101
|
brewpage-mcp
|
|
102
102
|
```
|
|
103
103
|
|
|
@@ -530,6 +530,14 @@ 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
|
+
|
|
537
|
+
## 1.16.3 -- 2026-10-30
|
|
538
|
+
|
|
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.
|
|
540
|
+
|
|
533
541
|
## 1.16.2 -- 2026-10-30
|
|
534
542
|
|
|
535
543
|
- `ttlDays` description names the 90-day cap with an owner token in a profile.
|
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
|
+
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.
|
|
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 };
|
|
@@ -13,7 +13,7 @@ function toolMeta(title, hints) {
|
|
|
13
13
|
/** Env default exists only in the local (stdio) server; remote /mcp takes ownerToken per call. */
|
|
14
14
|
const ENV_DEFAULT = `env ${OWNER_TOKEN_ENV} (local server only)`;
|
|
15
15
|
const NO_OWNER_TOKEN = `No owner token: pass ownerToken (local server: or set ${OWNER_TOKEN_ENV}).`;
|
|
16
|
-
const CREATE_OWNER_TOKEN_DESCRIPTION = `Optional. Default: ${ENV_DEFAULT}, else a new token per create.`;
|
|
16
|
+
const CREATE_OWNER_TOKEN_DESCRIPTION = `Optional; the ownerToken from your first create keeps publications under one owner. Default: ${ENV_DEFAULT}, else a new token per create.`;
|
|
17
17
|
const OWNER_TOKEN_DESCRIPTION = `Owner token from create. Default: ${ENV_DEFAULT}.`;
|
|
18
18
|
/** Backend guard checks create and update content alike. */
|
|
19
19
|
const NO_PUBLIC_CREDENTIALS = "BrewPage tokens and manage links must never be in public content.";
|
|
@@ -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
|
-
/**
|
|
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.
|
|
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) {
|
|
@@ -240,7 +247,7 @@ export function createServer(options = {}) {
|
|
|
240
247
|
`OWNER TOKEN: ${shown}`,
|
|
241
248
|
`===================================`,
|
|
242
249
|
``,
|
|
243
|
-
`IMPORTANT: Save your owner token! You need it to ${purpose}. It cannot be recovered if lost.`,
|
|
250
|
+
`IMPORTANT: Save your owner token! You need it to ${purpose}. It cannot be recovered if lost. Pass it as ownerToken on later publishes and updates.`,
|
|
244
251
|
...(token !== sent && token !== defaultOwnerToken ? [SIGN_IN_HINT] : []),
|
|
245
252
|
];
|
|
246
253
|
}
|
|
@@ -538,7 +545,8 @@ export function createServer(options = {}) {
|
|
|
538
545
|
});
|
|
539
546
|
server.registerTool("publish_site", {
|
|
540
547
|
...toolMeta("Publish site", ADDITIVE),
|
|
541
|
-
description: "Publish an HTML site to BrewPage. Single-page: `entryContent`. Multi-page: `files` (array of `{path, content}`). Optional `entry` overrides default `index.html`. Returns its primary share link and owner token. " +
|
|
548
|
+
description: "Publish an HTML site to BrewPage. Single-page: `entryContent`. Multi-page: `files` (array of `{path, content}`). Optional `entry` overrides default `index.html`. Returns its primary share link and owner token. " +
|
|
549
|
+
"Static sites: HTML, CSS and JS (incl. built React/Vue/TypeScript bundles) run in the browser; PHP and other server code never run. " + SITE_LIMITS_TEXT +
|
|
542
550
|
" " + MANAGE_URL_TEXT + " " + SECRETS,
|
|
543
551
|
inputSchema: {
|
|
544
552
|
deliveryMode: DELIVERY_MODE_SCHEMA,
|
package/package.json
CHANGED