mcp-server-jotbird 0.1.6 → 0.2.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
@@ -2,7 +2,7 @@
2
2
 
3
3
  An [MCP](https://modelcontextprotocol.io/) server for [JotBird](https://www.jotbird.com) that lets any LLM publish Markdown as beautifully formatted, shareable web pages.
4
4
 
5
- Write a document in conversation, publish it with one tool call, and get back a live URL. Supports full Markdown — headings, code blocks, tables, footnotes, math, task lists, and more. Update or delete pages by slug.
5
+ Write a document in conversation, publish it with one tool call, and get back a live URL. Supports full Markdown — headings, code blocks, tables, footnotes, math, task lists, and more. Update or delete pages by slug, and view or change page settings (theme, branding, visibility, password protection).
6
6
 
7
7
  Works with Claude, ChatGPT, Gemini, and any MCP-compatible client.
8
8
 
@@ -116,6 +116,10 @@ Ask your LLM things like:
116
116
  - *"Show me all my published pages"*
117
117
  - *"Take down the page with slug 'old-draft'"*
118
118
  - *"Publish this at my namespace as 'project-notes'"* (Pro)
119
+ - *"What are the settings on my page 'my-notes'?"*
120
+ - *"Switch my page 'launch-plan' to the essay theme"* (Pro)
121
+ - *"Make my page 'resume' public so search engines can find it"*
122
+ - *"Password-protect my page 'board-deck'"* (Pro)
119
123
 
120
124
  ## Tools
121
125
 
@@ -142,8 +146,34 @@ Permanently delete a published page and its shareable URL. Cannot be undone.
142
146
 
143
147
  | Parameter | Required | Description |
144
148
  |-----------|----------|-------------|
145
- | `slug` | Yes | Slug of the page to delete. Use `list_documents` to find slugs. |
146
- | `namespaced` | No | When `true`, delete the document at `@username/slug` instead of the flat URL. Requires Pro and a username. |
149
+ | `slug` | Yes | Slug of the page to delete, or the full `@username/slug` identifier for a namespaced page. Use `list_documents` to find slugs. |
150
+ | `namespaced` | No | When `true`, delete the document at `@username/slug` instead of the flat URL. Unnecessary if the slug already starts with `@username/`. Requires Pro and a username. |
151
+
152
+ ### `get_settings`
153
+
154
+ Get a published page's settings: theme, branding, visibility, tags, and expiration. The page password is write-only and never returned.
155
+
156
+ | Parameter | Required | Description |
157
+ |-----------|----------|-------------|
158
+ | `slug` | Yes | Slug of the page, or the full `@username/slug` identifier. Use `list_documents` to find slugs. |
159
+ | `namespaced` | No | When `true`, resolve the slug at `@username/slug` instead of the flat URL. Unnecessary if the slug already starts with `@username/`. |
160
+
161
+ ### `update_settings`
162
+
163
+ Update a published page's settings. Only the fields you pass change; everything else is preserved. Enabling a Pro feature (non-default theme, `hideBranding: true`, password protection) requires a Pro subscription — any account can clear them.
164
+
165
+ | Parameter | Required | Description |
166
+ |-----------|----------|-------------|
167
+ | `slug` | Yes | Slug of the page to update, or the full `@username/slug` identifier. |
168
+ | `namespaced` | No | When `true`, resolve the slug at `@username/slug` instead of the flat URL. Unnecessary if the slug already starts with `@username/`. |
169
+ | `theme` | No | `default`, `minimal`, `essay`, or `terminal`. Non-default themes are Pro-only. |
170
+ | `hideBranding` | No | Hide the "Published with JotBird" footer. Enabling is Pro-only. |
171
+ | `visibility` | No | `unlisted` (default), `public` (search-indexable), or `password` (Pro). Setting a visibility clears any previous password. |
172
+ | `password` | No | Required with (and only valid with) `visibility: "password"`. Never echoed back. |
173
+
174
+ At least one of `theme`, `hideBranding`, or `visibility` must be provided.
175
+
176
+ Settings changes are reflected in the API immediately, but the live page can take up to about a minute to reflect a relaxed visibility (enabling password protection is instant). Theme and branding apply right away.
147
177
 
148
178
  ## Namespaced URLs (Pro)
149
179
 
package/dist/index.js CHANGED
@@ -13,10 +13,16 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
13
13
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
14
14
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
15
15
  import { z } from "zod";
16
+ import { createRequire } from "node:module";
16
17
  // ---------------------------------------------------------------------------
17
18
  // Configuration
18
19
  // ---------------------------------------------------------------------------
19
- const VERSION = "0.1.6";
20
+ // Read the version from package.json so the User-Agent and MCP server identity
21
+ // always match the published release instead of a hand-edited literal that
22
+ // drifts. tsc emits dist/index.js flat, so "../package.json" is the package
23
+ // root. createRequire avoids needing resolveJsonModule for a static import.
24
+ const require = createRequire(import.meta.url);
25
+ const VERSION = require("../package.json").version;
20
26
  // ---------------------------------------------------------------------------
21
27
  // Argument schemas
22
28
  // ---------------------------------------------------------------------------
@@ -35,15 +41,133 @@ const PublishArgs = z.object({
35
41
  .describe("When true, publish at your namespace: share.jotbird.com/@username/slug. " +
36
42
  "Requires a Pro subscription and a username set in Account Settings. " +
37
43
  "A slug is required when namespaced is true."),
38
- });
39
- const DeleteArgs = z.object({
40
- slug: z.string().describe("The slug of the document to delete"),
44
+ })
45
+ // Strict for the same reason as the settings schemas: a stripped key is a
46
+ // silent partial success. A model that passes `theme` here (settings belong to
47
+ // update_settings) should be told, not quietly published with the default.
48
+ .strict();
49
+ const THEMES = ["default", "minimal", "essay", "terminal"];
50
+ const VISIBILITIES = ["unlisted", "password", "public"];
51
+ /**
52
+ * Split an "@username/slug" identifier into its parts.
53
+ *
54
+ * list_documents reports a namespaced page's identity as "@username/slug", and
55
+ * the tool descriptions point at it to find slugs — so that string is exactly
56
+ * what a model passes back. Taken literally it addresses a FLAT slug that does
57
+ * not exist, and the call 404s on a page that plainly does. Mirrors
58
+ * parseSlugValue/resolveTarget in the CLI.
59
+ */
60
+ function parseTarget(slug, namespaced) {
61
+ if (slug.startsWith("@") && slug.includes("/")) {
62
+ return { slug: slug.slice(slug.indexOf("/") + 1), namespaced: true };
63
+ }
64
+ return { slug, namespaced: Boolean(namespaced) };
65
+ }
66
+ // Every tool that addresses an existing page shares this target, and it
67
+ // NORMALIZES ITSELF: parsing yields the resolved {slug, namespaced} and nothing
68
+ // else, so a handler cannot forget to call parseTarget (three hand-written call
69
+ // sites is how the "@username/slug" bug shipped in the first place). `target`
70
+ // preserves what the caller actually typed, for echoing back in messages.
71
+ //
72
+ // The post-transform length check is the load-bearing half: "@user/" splits to
73
+ // an EMPTY slug, which would otherwise sail through `z.string()` and request
74
+ // `/api/v1/documents//settings` — and `delete` would then cheerfully confirm a
75
+ // deletion that never happened.
76
+ //
77
+ // `.strict()` matters for the same class of reason: zod's default is to STRIP
78
+ // unknown keys, which would turn a patch the server rejects (its contract 400s
79
+ // on an unknown key) into a silent partial success. `tags` is the trap —
80
+ // get_settings reports them, so a model naturally tries to set them, and a
81
+ // stripped key would come back as "Settings updated".
82
+ const TargetShape = {
83
+ slug: z
84
+ .string()
85
+ .trim()
86
+ .min(1)
87
+ .describe("Slug of the page, or the full @username/slug identifier"),
41
88
  namespaced: z
42
89
  .boolean()
43
90
  .optional()
44
- .describe("When true, delete the document at @username/slug instead of the flat URL. " +
45
- "Requires a Pro subscription and a username set in Account Settings."),
46
- });
91
+ .describe("When true, resolve the slug at @username/slug instead of the flat URL."),
92
+ };
93
+ function normalizeTarget(a) {
94
+ return { ...a, ...parseTarget(a.slug, a.namespaced), target: a.slug };
95
+ }
96
+ const EMPTY_SLUG = 'slug must name a page, e.g. "my-notes" or "@username/my-notes".';
97
+ const hasSlug = (a) => a.slug.length > 0;
98
+ const TargetArgs = z.object(TargetShape).strict();
99
+ // get_settings and delete take nothing but a target, so they share one schema.
100
+ const NormalizedTargetArgs = TargetArgs.transform(normalizeTarget).refine(hasSlug, { message: EMPTY_SLUG, path: ["slug"] });
101
+ const GetSettingsArgs = NormalizedTargetArgs;
102
+ const DeleteArgs = NormalizedTargetArgs;
103
+ const UpdateSettingsArgs = TargetArgs.extend({
104
+ theme: z.enum(THEMES).optional().describe("Page theme"),
105
+ hideBranding: z
106
+ .boolean()
107
+ .optional()
108
+ .describe("Hide the JotBird footer branding (true is Pro-only)"),
109
+ visibility: z.enum(VISIBILITIES).optional().describe("Page visibility state"),
110
+ password: z
111
+ .string()
112
+ .optional()
113
+ .describe("Page password; required with (and only valid with) visibility \"password\""),
114
+ })
115
+ // These mirror the server's validation. Rejecting locally matters because a
116
+ // PATCH is charged against the hourly rate limit BEFORE validation — a
117
+ // request the server will always refuse would still burn a write.
118
+ //
119
+ // One superRefine rather than chained .refine()s: chained refinements abort at
120
+ // the first failure, so `{password}` with no visibility reported only the
121
+ // generic "provide at least one setting" and never mentioned the password it
122
+ // was about to drop. superRefine collects every issue, and the explicit paths
123
+ // keep the rendered message field-anchored.
124
+ .superRefine((a, ctx) => {
125
+ if (a.password !== undefined && a.visibility !== "password") {
126
+ ctx.addIssue({
127
+ code: z.ZodIssueCode.custom,
128
+ path: ["password"],
129
+ message: 'password is only valid with visibility "password".',
130
+ });
131
+ }
132
+ if (a.visibility === "password" && (a.password ?? "") === "") {
133
+ ctx.addIssue({
134
+ code: z.ZodIssueCode.custom,
135
+ path: ["password"],
136
+ message: 'visibility "password" requires a non-empty password.',
137
+ });
138
+ }
139
+ if (a.theme === undefined &&
140
+ a.hideBranding === undefined &&
141
+ a.visibility === undefined) {
142
+ ctx.addIssue({
143
+ code: z.ZodIssueCode.custom,
144
+ path: [],
145
+ message: "Provide at least one setting to change: theme, hideBranding, or visibility.",
146
+ });
147
+ }
148
+ })
149
+ .transform(normalizeTarget)
150
+ .refine(hasSlug, { message: EMPTY_SLUG, path: ["slug"] });
151
+ // ---------------------------------------------------------------------------
152
+ // Formatting
153
+ // ---------------------------------------------------------------------------
154
+ function formatSettings(s) {
155
+ const identifier = s.username ? `@${s.username}/${s.slug}` : s.slug;
156
+ const lines = [
157
+ `Slug: ${identifier}`,
158
+ `URL: ${s.url}`,
159
+ // `||`, not `??`: an untitled page comes back as "" as readily as null, and
160
+ // `??` would render a bare "Title: ".
161
+ `Title: ${s.title || "(untitled)"}`,
162
+ `Theme: ${s.theme}`,
163
+ `Branding: ${s.hideBranding ? "hidden" : "shown"}`,
164
+ `Visibility: ${s.visibility}`,
165
+ ];
166
+ if (s.tags?.length)
167
+ lines.push(`Tags: ${s.tags.join(", ")}`);
168
+ lines.push(`Expires: ${s.expiresAt ?? "never"}`);
169
+ return lines.join("\n");
170
+ }
47
171
  // ---------------------------------------------------------------------------
48
172
  // MCP server factory (exported for testing)
49
173
  // ---------------------------------------------------------------------------
@@ -65,8 +189,14 @@ export function createServer(apiKey, apiBase) {
65
189
  const retryAfter = res.headers.get("Retry-After");
66
190
  throw new Error(`Rate limit exceeded.${retryAfter ? ` Try again in ${retryAfter} seconds.` : ""}`);
67
191
  }
68
- const msg = data?.error ?? `HTTP ${res.status}`;
69
- throw new Error(String(msg));
192
+ const body = data;
193
+ let msg = String(body?.error ?? `HTTP ${res.status}`);
194
+ // Pro-gated settings 403s name the offending setting — surface it so the
195
+ // model can tell the user which feature needs Pro instead of guessing.
196
+ if (res.status === 403 && body?.setting) {
197
+ msg += ` (Pro required for: ${String(body.setting)})`;
198
+ }
199
+ throw new Error(msg);
70
200
  }
71
201
  return data;
72
202
  }
@@ -85,6 +215,21 @@ export function createServer(apiKey, apiBase) {
85
215
  params.set("namespaced", "true");
86
216
  return apiRequest(`/api/v1/documents?${params.toString()}`, { method: "DELETE" });
87
217
  }
218
+ function settingsPath(slug, namespaced) {
219
+ let path = `/api/v1/documents/${encodeURIComponent(slug)}/settings`;
220
+ if (namespaced)
221
+ path += "?namespaced=true";
222
+ return path;
223
+ }
224
+ async function getSettings(slug, namespaced) {
225
+ return apiRequest(settingsPath(slug, namespaced));
226
+ }
227
+ async function updateSettings(slug, patch, namespaced) {
228
+ return apiRequest(settingsPath(slug, namespaced), {
229
+ method: "PATCH",
230
+ body: JSON.stringify(patch),
231
+ });
232
+ }
88
233
  // -- Server setup --
89
234
  const server = new Server({ name: "mcp-server-jotbird", version: VERSION }, { capabilities: { tools: {} } });
90
235
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
@@ -148,18 +293,95 @@ export function createServer(apiKey, apiBase) {
148
293
  properties: {
149
294
  slug: {
150
295
  type: "string",
151
- description: "Slug of the page to delete (e.g. 'my-notes'). " +
296
+ description: "Slug of the page to delete (e.g. 'my-notes'), or the full " +
297
+ "'@username/my-notes' identifier for a namespaced page. " +
152
298
  "Use list_documents to find slugs.",
153
299
  },
154
300
  namespaced: {
155
301
  type: "boolean",
156
302
  description: "When true, delete the document at @username/slug instead of the flat URL. " +
303
+ "Unnecessary if the slug already starts with '@username/'. " +
157
304
  "Requires a Pro subscription and a username set in Account Settings.",
158
305
  },
159
306
  },
160
307
  required: ["slug"],
161
308
  },
162
309
  },
310
+ {
311
+ name: "get_settings",
312
+ description: "Get a published JotBird page's settings: theme, branding, visibility " +
313
+ "(unlisted/password/public), tags, and expiration. Use before changing " +
314
+ "settings or when the user asks how a page is configured. The page " +
315
+ "password is write-only and never returned.",
316
+ inputSchema: {
317
+ type: "object",
318
+ properties: {
319
+ slug: {
320
+ type: "string",
321
+ description: "Slug of the page (e.g. 'my-notes'), or the full '@username/my-notes' " +
322
+ "identifier for a namespaced page. Use list_documents to find slugs.",
323
+ },
324
+ namespaced: {
325
+ type: "boolean",
326
+ description: "When true, resolve the slug at @username/slug instead of the flat URL. " +
327
+ "Unnecessary if the slug already starts with '@username/'.",
328
+ },
329
+ },
330
+ required: ["slug"],
331
+ },
332
+ },
333
+ {
334
+ name: "update_settings",
335
+ description: "Update a published JotBird page's settings: theme, branding, and " +
336
+ "visibility. Only the provided fields change; others are preserved. " +
337
+ "Pro-only: non-default themes, hiding branding, and password " +
338
+ "protection (free accounts can clear these and switch " +
339
+ "unlisted/public). Visibility semantics: 'unlisted' (default — not " +
340
+ "indexed by search engines), 'public' (indexable, listed in the " +
341
+ "sitemap), 'password' (Pro — requires the password argument; setting " +
342
+ "a visibility clears any previous password). The API reflects changes " +
343
+ "immediately, but the live page can take up to about a minute to " +
344
+ "reflect a relaxed visibility (enabling password protection is " +
345
+ "instant) — a briefly stale page is not a failed update.",
346
+ inputSchema: {
347
+ type: "object",
348
+ properties: {
349
+ slug: {
350
+ type: "string",
351
+ description: "Slug of the page to update (e.g. 'my-notes'), or the full " +
352
+ "'@username/my-notes' identifier for a namespaced page. " +
353
+ "Use list_documents to find slugs.",
354
+ },
355
+ namespaced: {
356
+ type: "boolean",
357
+ description: "When true, resolve the slug at @username/slug instead of the flat URL. " +
358
+ "Unnecessary if the slug already starts with '@username/'.",
359
+ },
360
+ theme: {
361
+ type: "string",
362
+ enum: [...THEMES],
363
+ description: "Page theme. Any non-default theme requires a Pro subscription.",
364
+ },
365
+ hideBranding: {
366
+ type: "boolean",
367
+ description: "Hide the 'Published with JotBird' footer. Enabling requires Pro; " +
368
+ "any account can set it back to false.",
369
+ },
370
+ visibility: {
371
+ type: "string",
372
+ enum: [...VISIBILITIES],
373
+ description: "Page visibility: 'unlisted' (default), 'public' (search-indexable), " +
374
+ "or 'password' (Pro; requires the password argument).",
375
+ },
376
+ password: {
377
+ type: "string",
378
+ description: "Page password. Required with (and only valid with) visibility " +
379
+ "'password'. Write-only — it is never echoed back.",
380
+ },
381
+ },
382
+ required: ["slug"],
383
+ },
384
+ },
163
385
  ],
164
386
  }));
165
387
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
@@ -212,13 +434,48 @@ export function createServer(apiKey, apiBase) {
212
434
  };
213
435
  }
214
436
  case "delete": {
215
- const { slug, namespaced } = DeleteArgs.parse(args);
437
+ const { slug, namespaced, target } = DeleteArgs.parse(args);
216
438
  await deleteDocument(slug, namespaced);
217
439
  return {
218
440
  content: [
219
441
  {
220
442
  type: "text",
221
- text: `Deleted document "${slug}".`,
443
+ text: `Deleted document "${target}".`,
444
+ },
445
+ ],
446
+ };
447
+ }
448
+ case "get_settings": {
449
+ const { slug, namespaced } = GetSettingsArgs.parse(args);
450
+ const settings = await getSettings(slug, namespaced);
451
+ return {
452
+ content: [{ type: "text", text: formatSettings(settings) }],
453
+ };
454
+ }
455
+ case "update_settings": {
456
+ const { slug, namespaced, target: _target, ...patch } = UpdateSettingsArgs.parse(args);
457
+ // Pre-flight every write with the GET (which is not rate-limited):
458
+ // PATCH is charged against the hourly write limit BEFORE validation,
459
+ // even when it 404s, so a mistyped slug would otherwise silently eat
460
+ // one of a free account's 10 writes per hour.
461
+ //
462
+ // The result is deliberately NOT used to skip a PATCH whose values
463
+ // already match. Re-applying identical settings is the documented way
464
+ // to repair drift and to finish a partially-applied patch ("a retry of
465
+ // the same PATCH is idempotent" — PAGE_SETTINGS_ARCHITECTURE.md), and
466
+ // the CLI always writes. Saving a rate-limit unit isn't worth being the
467
+ // one client that can't force a re-apply.
468
+ await getSettings(slug, namespaced);
469
+ const settings = await updateSettings(slug, patch, namespaced);
470
+ const note = patch.visibility !== undefined
471
+ ? "\n\nNote: the live page can take up to about a minute to reflect " +
472
+ "a visibility change (enabling password protection is instant)."
473
+ : "";
474
+ return {
475
+ content: [
476
+ {
477
+ type: "text",
478
+ text: `Settings updated.\n${formatSettings(settings)}${note}`,
222
479
  },
223
480
  ],
224
481
  };
@@ -234,8 +491,10 @@ export function createServer(apiKey, apiBase) {
234
491
  }
235
492
  catch (error) {
236
493
  if (error instanceof z.ZodError) {
494
+ // Cross-field refinements can carry an empty path; prefixing those with
495
+ // ": " renders a stray double colon ("Validation error: : Provide …").
237
496
  const issues = error.issues
238
- .map((i) => `${i.path.join(".")}: ${i.message}`)
497
+ .map((i) => (i.path.length ? `${i.path.join(".")}: ${i.message}` : i.message))
239
498
  .join("; ");
240
499
  return {
241
500
  content: [
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,kEAAkE;AAClE,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,WAAW,EAAE,CAAC;IAC5C,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;IACvC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;QACxB,KAAK,EAAE,GAAG,CAAC,OAAO;QAClB,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACvB,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;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AAE;IACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClD,OAAO,UAAU,KAAK,UAAU,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC,EAAE,CAAC;AAEL,IAAI,MAAM,EAAE,CAAC;IACX,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CACX,4DAA4D;YAC1D,sDAAsD,CACzD,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CAAC;IACzE,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,uBAAuB,OAAO,mBAAmB,CAAC,CAAC;AACnE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-jotbird",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server for JotBird – publish Markdown documents from any LLM",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",