brewpage-mcp 1.8.0 → 1.9.0
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 +12 -6
- package/dist/index.js +17 -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.
|
|
15
|
+
npx -y brewpage-mcp@1.9.0
|
|
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.
|
|
31
|
+
"args": ["-y", "brewpage-mcp@1.9.0"]
|
|
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.
|
|
42
|
+
claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.9.0
|
|
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.
|
|
56
|
+
"args": ["-y", "brewpage-mcp@1.9.0"]
|
|
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.
|
|
70
|
+
"args": ["-y", "brewpage-mcp@1.9.0"]
|
|
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.
|
|
78
|
+
npm install -g brewpage-mcp@1.9.0
|
|
79
79
|
brewpage-mcp
|
|
80
80
|
```
|
|
81
81
|
|
|
@@ -108,6 +108,8 @@ For a fresh publication, sites and non-public namespaces require Dedicated subdo
|
|
|
108
108
|
|
|
109
109
|
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.
|
|
110
110
|
|
|
111
|
+
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.
|
|
112
|
+
|
|
111
113
|
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`.
|
|
112
114
|
|
|
113
115
|
### Hosting
|
|
@@ -130,6 +132,8 @@ Publish HTML or Markdown content to BrewPage. Returns a public URL and owner tok
|
|
|
130
132
|
|
|
131
133
|
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).
|
|
132
134
|
|
|
135
|
+
The result includes `deliveryModeReason` and a `Delivery notice:` line when the server returns them (see above).
|
|
136
|
+
|
|
133
137
|
Example prompt that invokes this tool:
|
|
134
138
|
|
|
135
139
|
> "Save this HTML report so I can share the link with my team."
|
|
@@ -146,6 +150,8 @@ Update an existing HTML or Markdown page in place, preserving its short URL. Req
|
|
|
146
150
|
|
|
147
151
|
Parameters: `namespace` (string), `id` (string), `content` (string, the new body), `ownerToken` (string), `format` (optional HTML/Markdown alias or supported code language such as `json`, `yaml`, or `typescript`; omitted preserves the stored format).
|
|
148
152
|
|
|
153
|
+
An update never changes the link or delivery mode; an advisory `deliveryModeReason` and `Delivery notice:` line are printed when the server returns them.
|
|
154
|
+
|
|
149
155
|
Example prompt:
|
|
150
156
|
|
|
151
157
|
> "Fix the typo in the report I published earlier -- same link."
|
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.
|
|
8
|
+
version: "1.9.0",
|
|
9
9
|
});
|
|
10
10
|
const PUBLIC_NAMESPACE = "public";
|
|
11
11
|
/**
|
|
@@ -47,6 +47,17 @@ function hostingResponseLines(data) {
|
|
|
47
47
|
lines.push("Hosting: Existing link");
|
|
48
48
|
if (data.deliveryModeMatched === false)
|
|
49
49
|
lines.push("Requested hosting differs from the existing winner; its URL and mode were preserved.");
|
|
50
|
+
lines.push(...deliveryReasonLines(data));
|
|
51
|
+
return lines;
|
|
52
|
+
}
|
|
53
|
+
/** Optional HTML create/update fields: why the delivery mode was chosen or flagged. */
|
|
54
|
+
function deliveryReasonLines(data) {
|
|
55
|
+
const { deliveryModeReason: reason, deliveryNotice: notice } = data;
|
|
56
|
+
const lines = [];
|
|
57
|
+
if (typeof reason === "string" && reason.length > 0)
|
|
58
|
+
lines.push(`deliveryModeReason: ${JSON.stringify(reason)}`);
|
|
59
|
+
if (typeof notice === "string" && notice.length > 0)
|
|
60
|
+
lines.push(`Delivery notice: ${notice}`);
|
|
50
61
|
return lines;
|
|
51
62
|
}
|
|
52
63
|
async function apiRequest(method, path, body, headers, responseType = "json") {
|
|
@@ -97,7 +108,9 @@ function formatUpdateResponse(data) {
|
|
|
97
108
|
lines.push(...hostingResponseLines(data));
|
|
98
109
|
return lines.join("\n");
|
|
99
110
|
}
|
|
100
|
-
server.tool("publish_html", "Publish HTML or Markdown content to BrewPage. Returns a public URL and owner token. Supports password protection, custom TTL, optional filename, and an opt-in top toolbar (showTopBar)."
|
|
111
|
+
server.tool("publish_html", "Publish HTML or Markdown content to BrewPage. Returns a public URL and owner token. Supports password protection, custom TTL, optional filename, and an opt-in top toolbar (showTopBar). " +
|
|
112
|
+
"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; " +
|
|
113
|
+
"the result then includes deliveryModeReason and a delivery notice. Always share the returned URL.", {
|
|
101
114
|
content: z.string().describe("HTML or Markdown content to publish"),
|
|
102
115
|
deliveryMode: DELIVERY_MODE_SCHEMA,
|
|
103
116
|
format: z
|
|
@@ -567,7 +580,8 @@ server.tool("republish_site", "Republish (full-replace) an existing multi-file B
|
|
|
567
580
|
content: [{ type: "text", text: lines.join("\n") }],
|
|
568
581
|
};
|
|
569
582
|
});
|
|
570
|
-
server.tool("update_html", "Update an existing BrewPage HTML/Markdown page. Requires owner token. Returns the updated page metadata."
|
|
583
|
+
server.tool("update_html", "Update an existing BrewPage HTML/Markdown page. Requires owner token. Returns the updated page metadata. " +
|
|
584
|
+
"The link and delivery mode never change on update; an advisory deliveryModeReason and delivery notice are included when the new content uses browser features that may not work fully on a BrewPage link.", {
|
|
571
585
|
namespace: z.string().describe("Page namespace"),
|
|
572
586
|
id: z.string().describe("Page ID"),
|
|
573
587
|
content: z.string().describe("New HTML or Markdown content"),
|
package/package.json
CHANGED