brewpage-mcp 1.2.0 → 1.3.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.
Files changed (2) hide show
  1. package/dist/index.js +19 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ function formatPublishResponse(data) {
34
34
  lines.push(``, `===================================`, `OWNER TOKEN: ${data.ownerToken}`, `===================================`, ``, `IMPORTANT: Save your owner token! You need it to update or delete this resource later. It cannot be recovered if lost.`);
35
35
  return lines.join("\n");
36
36
  }
37
- server.tool("publish_html", "Publish HTML or Markdown content to BrewPage. Returns a public URL and owner token. Supports password protection and custom TTL.", {
37
+ 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).", {
38
38
  content: z.string().describe("HTML or Markdown content to publish"),
39
39
  format: z
40
40
  .enum(["HTML", "MARKDOWN"])
@@ -50,11 +50,21 @@ server.tool("publish_html", "Publish HTML or Markdown content to BrewPage. Retur
50
50
  .describe("Optional password to protect the page"),
51
51
  ttlDays: z
52
52
  .number()
53
- .min(30)
54
- .max(365)
53
+ .int()
54
+ .min(1)
55
+ .max(30)
56
+ .optional()
57
+ .describe("Time to live in days (1-30, default: 15)"),
58
+ filename: z
59
+ .string()
60
+ .max(200)
61
+ .optional()
62
+ .describe("Optional original filename (≤200 chars). Used as title fallback when no <title>/<h1>; immutable on update."),
63
+ showTopBar: z
64
+ .boolean()
55
65
  .optional()
56
- .describe("Time to live in days (30-365, default: 365)"),
57
- }, async ({ content, format, namespace, password, ttlDays }) => {
66
+ .describe("Add a thin top toolbar (filename + Download button + theme toggle) on the served page. Default: hidden."),
67
+ }, async ({ content, format, namespace, password, ttlDays, filename, showTopBar }) => {
58
68
  const body = { content, format };
59
69
  if (namespace)
60
70
  body.namespace = namespace;
@@ -62,6 +72,10 @@ server.tool("publish_html", "Publish HTML or Markdown content to BrewPage. Retur
62
72
  body.password = password;
63
73
  if (ttlDays)
64
74
  body.ttlDays = ttlDays;
75
+ if (filename)
76
+ body.filename = filename;
77
+ if (showTopBar !== undefined)
78
+ body.showTopBar = showTopBar;
65
79
  const { ok, data } = await apiRequest("POST", "/api/html", body);
66
80
  if (!ok) {
67
81
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brewpage-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "MCP server for BrewPage — publish and manage HTML, KV, JSON, and file content from AI assistants",
5
5
  "type": "module",
6
6
  "bin": {