brewpage-mcp 1.19.1 → 1.20.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 CHANGED
@@ -8,7 +8,7 @@ MCP server for [BrewPage](https://brewpage.app) -- publish and manage HTML, KV,
8
8
 
9
9
  ## What is BrewPage
10
10
 
11
- [BrewPage](https://brewpage.app) is a free instant hosting platform designed for AI agents and developers. One `POST` request publishes HTML, Markdown, a multi-file site, a JSON document, or a binary file and returns its primary HTTPS link -- no account needed, no API keys, no infrastructure setup. Every resource carries an **owner token** returned at creation time: use it to update content in place, delete the resource, or authenticate list operations across sessions. `brewpage-mcp` exposes this API as thirty typed MCP tools so any compatible agent -- Claude, Codex, Gemini, Cursor, Cline -- can publish, update, fetch, and manage BrewPage HTML, JSON, KV, and file content without leaving the conversation.
11
+ [BrewPage](https://brewpage.app) is a free instant hosting platform designed for AI agents and developers. One `POST` request publishes HTML, Markdown, a multi-file site, a JSON document, or a binary file and returns its primary HTTPS link -- no account needed, no API keys, no infrastructure setup. Every resource carries an **owner token** returned at creation time: use it to update content in place, delete the resource, or authenticate list operations across sessions. `brewpage-mcp` exposes this API as thirty-two typed MCP tools so any compatible agent -- Claude, Codex, Gemini, Cursor, Cline -- can publish, update, fetch, and manage BrewPage HTML, JSON, KV, and file content without leaving the conversation.
12
12
 
13
13
  Optional: sign in free (Google or any email) at https://account.brewpage.app to never lose your pages or tokens and to mint tokens that never expire. Not needed to publish.
14
14
 
@@ -18,7 +18,7 @@ Choosing a host? See how BrewPage compares with GitHub Pages, Netlify Drop, Tiin
18
18
 
19
19
  ### Remote (no install)
20
20
 
21
- One remote MCP server for every client: `https://brewpage.app/mcp` (Streamable HTTP, no authentication, same 30 tools). Add it by URL in Claude (a custom connector), ChatGPT (a custom MCP server) or any Streamable HTTP client.
21
+ One remote MCP server for every client: `https://brewpage.app/mcp` (Streamable HTTP, no authentication, same 32 tools). Add it by URL in Claude (a custom connector), ChatGPT (a custom MCP server) or any Streamable HTTP client.
22
22
 
23
23
  Claude Code: `claude mcp add --transport http brewpage --scope user https://brewpage.app/mcp` (leave out `--scope user` to add it to the current project only), or in `.mcp.json`:
24
24
 
@@ -38,7 +38,7 @@ Claude Code: `claude mcp add --transport http brewpage --scope user https://brew
38
38
  For clients that only start local servers; the same tools as the server URL.
39
39
 
40
40
  ```bash
41
- npx -y brewpage-mcp@1.19.1
41
+ npx -y brewpage-mcp@1.20.0
42
42
  ```
43
43
 
44
44
  Requires Node.js 20 or newer. This starts the stdio server for an MCP client.
@@ -63,7 +63,7 @@ Local fallback (stdio, needs Node.js; the same tools): add to `~/Library/Applica
63
63
  "mcpServers": {
64
64
  "brewpage": {
65
65
  "command": "npx",
66
- "args": ["-y", "brewpage-mcp@1.19.1"]
66
+ "args": ["-y", "brewpage-mcp@1.20.0"]
67
67
  }
68
68
  }
69
69
  }
@@ -86,7 +86,7 @@ Custom servers follow your ChatGPT plan and workspace settings.
86
86
  The remote command above is the default. Local fallback: register a project-scoped stdio server:
87
87
 
88
88
  ```bash
89
- claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.19.1
89
+ claude mcp add --transport stdio --scope project brewpage -- npx -y brewpage-mcp@1.20.0
90
90
  ```
91
91
 
92
92
  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).
@@ -110,7 +110,7 @@ Local fallback (stdio, needs Node.js; the same tools): open **Settings > MCP** a
110
110
  "mcpServers": {
111
111
  "brewpage": {
112
112
  "command": "npx",
113
- "args": ["-y", "brewpage-mcp@1.19.1"]
113
+ "args": ["-y", "brewpage-mcp@1.20.0"]
114
114
  }
115
115
  }
116
116
  }
@@ -124,14 +124,14 @@ Open the Cline MCP settings panel and add:
124
124
  {
125
125
  "brewpage": {
126
126
  "command": "npx",
127
- "args": ["-y", "brewpage-mcp@1.19.1"]
127
+ "args": ["-y", "brewpage-mcp@1.20.0"]
128
128
  }
129
129
  }
130
130
  ```
131
131
 
132
132
  ## Tools
133
133
 
134
- Thirty tools are available. Creation returns an owner token; keep it to modify or delete the resource later. Owner tools take `ownerToken`, else `BREWPAGE_OWNER_TOKEN` (local server only). Supported password inputs use `X-Password`. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.
134
+ Thirty-two tools are available. Creation returns an owner token; keep it to modify or delete the resource later. Owner tools take `ownerToken`, else `BREWPAGE_OWNER_TOKEN` (local server only). Supported password inputs use `X-Password`. Secrets allowed; likely ones are flagged in notices. For a secret: private namespace + password.
135
135
 
136
136
  | Tool | Purpose |
137
137
  |------|---------|
@@ -149,7 +149,9 @@ Thirty tools are available. Creation returns an owner token; keep it to modify o
149
149
  | `get_kv` | Read a KV value |
150
150
  | `update_hosting` | Change eligible delivery mode with owner token and hosting version |
151
151
  | `delete_resource` | Delete an HTML page, site, JSON document, KV store or file |
152
- | `set_visibility` | Hide or show a public publication in the gallery and sitemap; link unchanged |
152
+ | `set_visibility` | List or unlist a public publication in the gallery and sitemap; link unchanged |
153
+ | `make_private` | Make a public publication private: new private link, the public link stops working; one-way |
154
+ | `set_badge` | Hide or show the BrewPage badge on a publication of your profile, up to 5 hidden |
153
155
  | `set_title` | Rename an HTML page or site; the title stays on republish; link unchanged |
154
156
  | `bind_token` | Add an owner token to your profile (admin token) |
155
157
  | `mint_token` | Mint a profile token, shown once (admin token) |
@@ -436,9 +438,9 @@ delete_resource(type="html", namespace="public", id="aBcDeFgHiJ", ownerToken="to
436
438
 
437
439
  ### `set_visibility`
438
440
 
439
- Hide or show a public publication in the gallery and sitemap; the link stays the same. Only public, password-free HTML, sites and files can be listed; others answer with a `visibility-not-listable` notice.
441
+ List or unlist a public publication in the gallery and sitemap; the link stays the same. Only public, password-free HTML, sites and files can be listed; others answer with a `visibility-not-listable` notice.
440
442
 
441
- Parameters: `type` (`html` | `site` | `file` | `json` | `kv`), `namespace`, `id`, `listed` (boolean), `ownerToken` (optional).
443
+ Parameters: `type` (`html` | `site` | `file` | `json` | `kv`), `namespace`, `id`, `listed` (boolean: `true` = listed, `false` = unlisted), `ownerToken` (optional).
442
444
 
443
445
  ```
444
446
  set_visibility(type="html", namespace="public", id="aBcDeFgHiJ", listed=false)
@@ -448,6 +450,34 @@ Output: `LISTED: false · link unchanged`.
448
450
 
449
451
  ---
450
452
 
453
+ ### `make_private`
454
+
455
+ Make a public publication private (`POST /api/{type}/{ns}/{id}/private`): it gets a new private link in a private namespace under a new id, and the public link stops working. Views and stats stay; a custom domain on it is detached. One-way: to go public again, publish again. The owner token stays the same; later calls take the new namespace and id.
456
+
457
+ Parameters: `type` (`html` | `site` | `file` | `json` | `kv`), `namespace` (`public`), `id`, `ownerToken` (optional).
458
+
459
+ ```
460
+ make_private(type="html", namespace="public", id="aBcDeFgHiJ")
461
+ ```
462
+
463
+ Output: `MADE PRIVATE · the public link no longer works`, then the new link, namespace and id, and the new management link when the publication had one. Give the user the new link and the management link. A publication outside `public` answers 409 `NOT_PUBLIC`.
464
+
465
+ ---
466
+
467
+ ### `set_badge`
468
+
469
+ Hide or show the BrewPage badge on a publication (`POST /api/{type}/{ns}/{id}/badge`). HTML pages and sites show a small BrewPage badge; page code must not hide or alter it. Hiding works when the publication's owner token is in a BrewPage profile: sign in free at https://account.brewpage.app, then `bind_token`. A profile hides the badge on up to 5 publications; showing it again frees the slot.
470
+
471
+ Parameters: `type` (`html` | `site` | `file` | `json` | `kv`), `namespace`, `id`, `hidden` (optional boolean: `true` = hide, `false` = show; omitted reports the current state), `ownerToken` (optional).
472
+
473
+ ```
474
+ set_badge(type="html", namespace="public", id="aBcDeFgHiJ", hidden=true)
475
+ ```
476
+
477
+ Output: `BADGE: hidden · 2 of 5 hidden in the profile · link unchanged`. Without a profile the badge stays shown and the result carries the `badge-hide-needs-profile` notice; a sixth hide answers 409 `BADGE_HIDDEN_LIMIT`.
478
+
479
+ ---
480
+
451
481
  ### `set_title`
452
482
 
453
483
  Rename an HTML page or site: the title shown in the gallery, profile, search and link cards (`POST /api/{html|sites}/{ns}/{id}/title`). The new title stays when you republish; the link stays the same. Works when the publication's owner token is in a BrewPage profile: sign in at https://account.brewpage.app, then `bind_token`; otherwise 403 with a hint.
@@ -725,6 +755,10 @@ Every publish response includes an **owner token** -- the only credential that a
725
755
 
726
756
  ## Changelog
727
757
 
758
+ ## 1.20.0 -- 2026-11-12
759
+
760
+ - Two new tools. `make_private` turns a public publication into a private one: new private link, the public link stops working, views and stats stay; one-way. `set_badge` hides or shows the BrewPage badge on a publication of your profile, up to 5 hidden. `set_visibility` reads as list or unlist; inputs unchanged. The server instructions and the tools that send page code say that page code must not hide or alter the badge. Thirty-two tools. Contract 2.27.0. `User-Agent: brewpage-mcp/1.20.0`.
761
+
728
762
  ## 1.19.1 -- 2026-11-12
729
763
 
730
764
  - README only: the remote server `https://brewpage.app/mcp` comes first, with setup steps for Claude and ChatGPT; the local `npx` server is the fallback; the global install section is removed. No tool or input change. Contract 2.22.0. `User-Agent: brewpage-mcp/1.19.1`.
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.19.1";
3
+ export declare const USER_AGENT = "brewpage-mcp/1.20.0";
4
4
  export declare const OWNER_TOKEN_ENV = "BREWPAGE_OWNER_TOKEN";
5
5
  /** Server instructions of the handshake: one paragraph per line; the first stands alone within 512 chars. */
6
6
  export declare const SERVER_INSTRUCTIONS: string;
package/dist/tools.js CHANGED
@@ -2,13 +2,14 @@ import { McpServer } from "@modelcontextprotocol/server";
2
2
  import { z } from "zod";
3
3
  import { PAGE_DATA_CALLS, PAGE_DATA_GUIDE } from "./guides/page-data.js";
4
4
  export const DEFAULT_BASE_URL = "https://brewpage.app";
5
- export const USER_AGENT = "brewpage-mcp/1.19.1";
5
+ export const USER_AGENT = "brewpage-mcp/1.20.0";
6
6
  export const OWNER_TOKEN_ENV = "BREWPAGE_OWNER_TOKEN";
7
7
  /** Server instructions of the handshake: one paragraph per line; the first stands alone within 512 chars. */
8
8
  export const SERVER_INSTRUCTIONS = [
9
9
  "BrewPage publishes HTML, Markdown, sites, files, JSON and KV and returns a share link plus an owner token. Keep the owner token private and send it as ownerToken on every later call for that publication; it cannot be recovered. A page that must save what its visitors enter (form answers, guestbook, votes, scores, game progress) needs Page data: read get_guide topic page-data BEFORE writing the page, then publish with the state argument.",
10
10
  "After publishing, give the user the page link and the management link from the result. Say that the management link is private: whoever has it can edit or delete the page, and its Data tab shows what visitors saved.",
11
11
  "KV and JSON tools hold your own data. Page data holds what a page's visitors save: get_page_data reads it, set_page_data writes author entries, configure_page_data changes who can read a list, delete_page_data moderates. In a later chat these four take the management link as manageUrl.",
12
+ "HTML pages and sites show a small BrewPage badge; page code must not hide or alter it. A profile can turn it off on up to 5 pages (set_badge).",
12
13
  ].join("\n");
13
14
  const READ_ONLY = { readOnlyHint: true };
14
15
  const DESTRUCTIVE = { readOnlyHint: false, destructiveHint: true };
@@ -27,6 +28,10 @@ const NO_PUBLIC_CREDENTIALS = "BrewPage tokens and manage links must never be in
27
28
  const SECRETS = "Secrets allowed; likely ones are flagged in notices. Private namespace + password suit secrets. " +
28
29
  NO_PUBLIC_CREDENTIALS;
29
30
  const MANAGE_URL_TEXT = "Returns manageUrl, a private management link (grants control; not for public sharing).";
31
+ /** Badge sentence of the four tools that publish or replace page code. */
32
+ const BADGE_TEXT = "Page code must not hide or alter the BrewPage badge; a profile can turn the badge off for a page.";
33
+ const BADGE_NEEDS_PROFILE_CODE = "badge-hide-needs-profile";
34
+ const BADGE_NEEDS_PROFILE_NEXT = "Next: sign in at https://account.brewpage.app, add this publication's owner token with bind_token, then retry.";
30
35
  const OLD_READ_ONLY_CODE = "OLD_PUBLICATION_READ_ONLY";
31
36
  const WRONG_TYPE_CODE = "WRONG_RESOURCE_TYPE";
32
37
  /** 403 message of a rename on a publication no profile owns. */
@@ -466,7 +471,7 @@ function ownerLinkLines(data) {
466
471
  lines.push(``, `MANAGE LINK (private): ${data.manageUrl}`, `Give it to the user with the link: anyone who has it can edit or delete this publication. Never post it publicly.`);
467
472
  }
468
473
  if (data.listed === true && !hasCredentialNotice(data))
469
- lines.push(``, `VISIBILITY: public, listed. Hide: set_visibility listed=false`);
474
+ lines.push(``, `VISIBILITY: public, listed. Unlist: set_visibility listed=false`);
470
475
  return lines;
471
476
  }
472
477
  /** Optional delivery fields on HTML and hosting responses: why the mode was chosen, flagged or not applied. */
@@ -513,7 +518,7 @@ export function createServer(options = {}) {
513
518
  const apiFetch = options.fetch ?? fetch;
514
519
  const server = new McpServer({
515
520
  name: "brewpage-mcp",
516
- version: "1.19.1",
521
+ version: "1.20.0",
517
522
  }, { instructions: SERVER_INSTRUCTIONS });
518
523
  /** Caller argument first, then the configured default; `fromEnv` marks the configured one. */
519
524
  function ownerTokenFor(argument) {
@@ -595,7 +600,7 @@ export function createServer(options = {}) {
595
600
  "A `public` page without deliveryMode may get its own subdomain if it needs browser features a BrewPage link lacks; " +
596
601
  "the result then has deliveryModeReason and a delivery notice. Markdown raw HTML is allowlisted: scripts, styles, event handlers, forms, embeds removed. " +
597
602
  "Optional `domain` connects a domain the user owns to an HTML-format page. " +
598
- MANAGE_URL_TEXT + " " + SECRETS + " " + PUBLISH_STATE_TEXT,
603
+ MANAGE_URL_TEXT + " " + SECRETS + " " + BADGE_TEXT + " " + PUBLISH_STATE_TEXT,
599
604
  inputSchema: {
600
605
  content: z.string().describe("HTML, Markdown, code or JSON to publish"),
601
606
  deliveryMode: DELIVERY_MODE_SCHEMA,
@@ -858,7 +863,7 @@ export function createServer(options = {}) {
858
863
  ...toolMeta("Publish site", ADDITIVE),
859
864
  description: "Publish an HTML site to BrewPage. " + PUBLIC_HINT + "Single-page: `entryContent`. Multi-page: `files` (`{path, content}` array). Optional `entry` overrides `index.html`. Returns its primary share link and owner token. " +
860
865
  "Static only: HTML, CSS, JS (incl. built React/Vue bundles) run in the browser; server code (PHP etc.) never runs. " + SITE_LIMITS_TEXT +
861
- " Optional `domain` connects a domain the user owns. " + MANAGE_URL_TEXT + " " + SECRETS + " " + PUBLISH_STATE_TEXT,
866
+ " Optional `domain` connects a domain the user owns. " + MANAGE_URL_TEXT + " " + SECRETS + " " + BADGE_TEXT + " " + PUBLISH_STATE_TEXT,
862
867
  inputSchema: {
863
868
  deliveryMode: DELIVERY_MODE_SCHEMA,
864
869
  entryContent: z
@@ -977,7 +982,7 @@ export function createServer(options = {}) {
977
982
  });
978
983
  server.registerTool("republish_site", {
979
984
  ...toolMeta("Republish site", DESTRUCTIVE),
980
- description: "Republish (full-replace) an existing multi-file BrewPage site in place at the SAME URL/ID. Requires owner token. The uploaded bundle becomes the complete new file set — files absent from it are removed, new files added, matching files overwritten. Single-page: `entryContent`. Multi-page: `files` (array of `{path, content}`). Optional `entry` overrides the default `index.html`. Republishing preserves existing expiry." + OLD_READ_ONLY_TEXT + " " + SITE_LIMITS_TEXT + " " + NO_PUBLIC_CREDENTIALS,
985
+ description: "Republish (full-replace) an existing multi-file BrewPage site in place at the SAME URL/ID. Requires owner token. The uploaded bundle becomes the complete new file set — files absent from it are removed, new files added, matching files overwritten. Single-page: `entryContent`. Multi-page: `files` (array of `{path, content}`). Optional `entry` overrides the default `index.html`. Republishing preserves existing expiry." + OLD_READ_ONLY_TEXT + " " + SITE_LIMITS_TEXT + " " + NO_PUBLIC_CREDENTIALS + " " + BADGE_TEXT,
981
986
  inputSchema: {
982
987
  namespace: z.string().describe("Site namespace"),
983
988
  id: z.string().describe("Site ID"),
@@ -1076,7 +1081,7 @@ export function createServer(options = {}) {
1076
1081
  ...toolMeta("Update page", DESTRUCTIVE),
1077
1082
  description: "Update an existing BrewPage HTML, Markdown, code or JSON page. Requires owner token. Returns the updated page metadata. " +
1078
1083
  "Format omitted keeps the stored format, except a whole HTML document makes a Markdown page an HTML page. " +
1079
- "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." + OLD_READ_ONLY_TEXT + " " + NO_PUBLIC_CREDENTIALS,
1084
+ "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." + OLD_READ_ONLY_TEXT + " " + NO_PUBLIC_CREDENTIALS + " " + BADGE_TEXT,
1080
1085
  inputSchema: {
1081
1086
  namespace: z.string().describe("Page namespace"),
1082
1087
  id: z.string().describe("Page ID"),
@@ -1475,12 +1480,12 @@ export function createServer(options = {}) {
1475
1480
  });
1476
1481
  server.registerTool("set_visibility", {
1477
1482
  ...toolMeta("Set gallery visibility", ADDITIVE),
1478
- description: "Hide or show a public publication in the gallery and sitemap. Link unchanged.",
1483
+ description: "List or unlist a public publication in the gallery and sitemap. Link unchanged.",
1479
1484
  inputSchema: {
1480
1485
  type: z.enum(["html", "site", "file", "json", "kv"]).describe("Publication type; only public html, site and file can be listed"),
1481
1486
  namespace: z.string().describe("Publication namespace"),
1482
1487
  id: z.string().describe("Publication ID"),
1483
- listed: z.boolean().describe("false = hide, true = show"),
1488
+ listed: z.boolean().describe("true = listed, false = unlisted"),
1484
1489
  ownerToken: z.string().optional().describe(OWNER_TOKEN_DESCRIPTION),
1485
1490
  },
1486
1491
  }, async ({ type, namespace, id, listed, ownerToken }) => {
@@ -1494,6 +1499,64 @@ export function createServer(options = {}) {
1494
1499
  const result = data;
1495
1500
  return textResult([...credentialAlertLines(result), `LISTED: ${result.listed} · link unchanged`, ...noticeLines(result)].join("\n"));
1496
1501
  });
1502
+ server.registerTool("make_private", {
1503
+ ...toolMeta("Make private", DESTRUCTIVE),
1504
+ description: "Make a public publication private: it gets a new private link and the public link stops working; a custom domain on it is detached. One-way. " +
1505
+ "Returns the new link, namespace and id, plus a new management link when the publication had one; the owner token stays the same.",
1506
+ inputSchema: {
1507
+ type: z.enum(["html", "site", "file", "json", "kv"]).describe("Publication type"),
1508
+ namespace: z.string().describe("Publication namespace; only `public` publications can be made private"),
1509
+ id: z.string().describe("Publication ID"),
1510
+ ownerToken: z.string().optional().describe(OWNER_TOKEN_DESCRIPTION),
1511
+ },
1512
+ }, async ({ type, namespace, id, ownerToken }) => {
1513
+ const auth = ownerTokenFor(ownerToken);
1514
+ if (!auth.token)
1515
+ return textResult(NO_OWNER_TOKEN, true);
1516
+ const path = apiPath(TYPE_SEGMENTS[type], namespace, id, "private");
1517
+ const { ok, status, data, headers: answerHeaders } = await apiRequest("POST", path, undefined, { "X-Owner-Token": auth.token });
1518
+ if (!ok)
1519
+ return ownerFailure("make private", status, data, auth.fromEnv, answerHeaders);
1520
+ const result = data;
1521
+ return textResult([
1522
+ ...credentialAlertLines(result),
1523
+ `MADE PRIVATE · the public link no longer works`,
1524
+ ``,
1525
+ `New link: ${result.link || "N/A"}`,
1526
+ `Namespace: ${result.namespace || "N/A"}`,
1527
+ `ID: ${result.id || "N/A"}`,
1528
+ `Give the user the new link. Later calls take this namespace and ID with the same owner token.`,
1529
+ ...noticeLines(result),
1530
+ ...ownerLinkLines(result),
1531
+ ].join("\n"));
1532
+ });
1533
+ server.registerTool("set_badge", {
1534
+ ...toolMeta("Hide or show badge", ADDITIVE),
1535
+ description: "Hide or show the BrewPage badge on a publication. Needs an owner token that is in a BrewPage profile (free sign-in at https://account.brewpage.app); up to 5 hidden per profile.",
1536
+ inputSchema: {
1537
+ type: z.enum(["html", "site", "file", "json", "kv"]).describe("Publication type"),
1538
+ namespace: z.string().describe("Publication namespace"),
1539
+ id: z.string().describe("Publication ID"),
1540
+ hidden: z.boolean().optional().describe("true = hide the badge, false = show it. Omit: report the current state."),
1541
+ ownerToken: z.string().optional().describe(OWNER_TOKEN_DESCRIPTION),
1542
+ },
1543
+ }, async ({ type, namespace, id, hidden, ownerToken }) => {
1544
+ const auth = ownerTokenFor(ownerToken);
1545
+ if (!auth.token)
1546
+ return textResult(NO_OWNER_TOKEN, true);
1547
+ const path = apiPath(TYPE_SEGMENTS[type], namespace, id, "badge");
1548
+ const { ok, status, data, headers: answerHeaders } = await apiRequest("POST", path, hidden === undefined ? {} : { hidden }, { "X-Owner-Token": auth.token });
1549
+ if (!ok)
1550
+ return ownerFailure("set badge", status, data, auth.fromEnv, answerHeaders);
1551
+ const result = data;
1552
+ const used = typeof result.used === "number" && result.used > 0 ? ` · ${result.used} of ${result.limit} hidden in the profile` : "";
1553
+ return textResult([
1554
+ ...credentialAlertLines(result),
1555
+ `BADGE: ${result.hidden === true ? "hidden" : "shown"}${used} · link unchanged`,
1556
+ ...noticeLines(result),
1557
+ ...(notices(result).some((n) => n.code === BADGE_NEEDS_PROFILE_CODE) ? [BADGE_NEEDS_PROFILE_NEXT] : []),
1558
+ ].join("\n"));
1559
+ });
1497
1560
  server.registerTool("set_title", {
1498
1561
  ...toolMeta("Rename page or site", ADDITIVE),
1499
1562
  description: "Rename an HTML page or site: the title shown in the gallery, profile, search and link cards. " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brewpage-mcp",
3
- "version": "1.19.1",
3
+ "version": "1.20.0",
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",