mcp-server-jotbird 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JotBird LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,167 @@
1
+ # mcp-server-jotbird
2
+
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
+
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.
6
+
7
+ Works with Claude, ChatGPT, Gemini, and any MCP-compatible client.
8
+
9
+ ## Quick start
10
+
11
+ ### 1. Get an API key
12
+
13
+ Sign in at [jotbird.com](https://www.jotbird.com), open **Account > API keys**, and generate a key.
14
+
15
+ ### 2. Add to your client
16
+
17
+ <details open>
18
+ <summary><strong>Claude Desktop</strong></summary>
19
+
20
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "jotbird": {
26
+ "command": "npx",
27
+ "args": ["-y", "mcp-server-jotbird"],
28
+ "env": {
29
+ "JOTBIRD_API_KEY": "jb_your_key_here"
30
+ }
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ </details>
37
+
38
+ <details>
39
+ <summary><strong>Claude Code</strong></summary>
40
+
41
+ ```bash
42
+ claude mcp add jotbird -e JOTBIRD_API_KEY=jb_your_key_here -- npx -y mcp-server-jotbird
43
+ ```
44
+
45
+ </details>
46
+
47
+ <details>
48
+ <summary><strong>ChatGPT</strong></summary>
49
+
50
+ ChatGPT connectors require a remote (HTTP) MCP server — they don't support local stdio servers directly. To use this server with ChatGPT:
51
+
52
+ 1. Host the server behind an HTTP transport (e.g. using [`mcp-proxy`](https://github.com/nichochar/mcp-proxy) or [`supergateway`](https://github.com/nichochar/supergateway))
53
+ 2. In ChatGPT, go to **Settings > Connectors > Create**
54
+ 3. Enter the URL of your hosted server
55
+
56
+ See [OpenAI's MCP docs](https://platform.openai.com/docs/mcp) for details.
57
+
58
+ </details>
59
+
60
+ <details>
61
+ <summary><strong>Gemini CLI</strong></summary>
62
+
63
+ Edit `.gemini/settings.json` (project-level) or `~/.gemini/settings.json` (global):
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "jotbird": {
69
+ "command": "npx",
70
+ "args": ["-y", "mcp-server-jotbird"],
71
+ "env": {
72
+ "JOTBIRD_API_KEY": "$JOTBIRD_API_KEY"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ Or add via CLI:
80
+
81
+ ```bash
82
+ gemini mcp add jotbird -- npx -y mcp-server-jotbird
83
+ ```
84
+
85
+ See [Gemini CLI MCP docs](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html) for details.
86
+
87
+ </details>
88
+
89
+ <details>
90
+ <summary><strong>Other MCP clients</strong></summary>
91
+
92
+ Any client that supports the [Model Context Protocol](https://modelcontextprotocol.io/) over stdio can use this server. Set the `JOTBIRD_API_KEY` environment variable and run:
93
+
94
+ ```bash
95
+ npx -y mcp-server-jotbird
96
+ ```
97
+
98
+ </details>
99
+
100
+ ### 3. Use it
101
+
102
+ Ask your LLM things like:
103
+
104
+ - *"Write a blog post about X and publish it to JotBird"*
105
+ - *"Publish these meeting notes as a shareable page"*
106
+ - *"Update my published page 'my-notes' with this new section"*
107
+ - *"Show me all my published pages"*
108
+ - *"Take down the page with slug 'old-draft'"*
109
+
110
+ ## Tools
111
+
112
+ ### `publish`
113
+
114
+ Publish Markdown content as a formatted web page with a shareable URL. To update an existing page, pass its slug.
115
+
116
+ | Parameter | Required | Description |
117
+ |-----------|----------|-------------|
118
+ | `markdown` | Yes | Markdown content (max 256 KB). Supports footnotes, task lists, definition lists, math (`$…$` and `$$…$$`), and inline HTML. |
119
+ | `title` | No | Page title. If omitted, the first H1 in the Markdown is used. |
120
+ | `slug` | No | URL slug (e.g. `my-notes`). If this slug already exists and you own it, the page is updated in place. Omit to auto-generate. |
121
+
122
+ ### `list_documents`
123
+
124
+ List the user's published pages. Returns each page's title, URL, slug, and expiration date.
125
+
126
+ No parameters.
127
+
128
+ ### `delete`
129
+
130
+ Permanently delete a published page and its shareable URL. Cannot be undone.
131
+
132
+ | Parameter | Required | Description |
133
+ |-----------|----------|-------------|
134
+ | `slug` | Yes | Slug of the page to delete. Use `list_documents` to find slugs. |
135
+
136
+ ## Limits
137
+
138
+ | | Free | Pro |
139
+ |--|------|-----|
140
+ | Published pages | 10 | Unlimited |
141
+ | Publishes per hour | 10 | 100 |
142
+ | Page expiration | 90 days | Never |
143
+ | Max markdown size | 256 KB | 256 KB |
144
+
145
+ ## Environment variables
146
+
147
+ | Variable | Required | Description |
148
+ |----------|----------|-------------|
149
+ | `JOTBIRD_API_KEY` | Yes | Your JotBird API key (`jb_...`) |
150
+ | `JOTBIRD_API_URL` | No | API base URL (default: `https://www.jotbird.com`) |
151
+
152
+ ## Development
153
+
154
+ ```bash
155
+ npm install
156
+ npm run build
157
+ ```
158
+
159
+ Test locally:
160
+
161
+ ```bash
162
+ JOTBIRD_API_KEY=jb_your_key node dist/index.js
163
+ ```
164
+
165
+ ## License
166
+
167
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ export declare function createServer(apiKey: string, apiBase: string): Server;
package/dist/index.js ADDED
@@ -0,0 +1,236 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ import { z } from "zod";
6
+ // ---------------------------------------------------------------------------
7
+ // Configuration
8
+ // ---------------------------------------------------------------------------
9
+ const VERSION = "0.1.0";
10
+ // ---------------------------------------------------------------------------
11
+ // Argument schemas
12
+ // ---------------------------------------------------------------------------
13
+ const PublishArgs = z.object({
14
+ markdown: z.string().describe("The Markdown content to publish"),
15
+ title: z.string().optional().describe("Optional document title"),
16
+ slug: z
17
+ .string()
18
+ .optional()
19
+ .describe("Optional slug. If it matches an existing document you own, that document is updated."),
20
+ });
21
+ const DeleteArgs = z.object({
22
+ slug: z.string().describe("The slug of the document to delete"),
23
+ });
24
+ // ---------------------------------------------------------------------------
25
+ // MCP server factory (exported for testing)
26
+ // ---------------------------------------------------------------------------
27
+ export function createServer(apiKey, apiBase) {
28
+ // -- API helpers (closed over apiKey/apiBase) --
29
+ async function apiRequest(path, options = {}) {
30
+ const res = await fetch(`${apiBase}${path}`, {
31
+ ...options,
32
+ headers: {
33
+ "Content-Type": "application/json",
34
+ Authorization: `Bearer ${apiKey}`,
35
+ "User-Agent": `mcp-server-jotbird/${VERSION}`,
36
+ ...options.headers,
37
+ },
38
+ });
39
+ const data = await res.json().catch(() => null);
40
+ if (!res.ok) {
41
+ if (res.status === 429) {
42
+ const retryAfter = res.headers.get("Retry-After");
43
+ throw new Error(`Rate limit exceeded.${retryAfter ? ` Try again in ${retryAfter} seconds.` : ""}`);
44
+ }
45
+ const msg = data?.error ?? `HTTP ${res.status}`;
46
+ throw new Error(String(msg));
47
+ }
48
+ return data;
49
+ }
50
+ async function publishDocument(params) {
51
+ return apiRequest("/api/v1/publish", {
52
+ method: "POST",
53
+ body: JSON.stringify(params),
54
+ });
55
+ }
56
+ async function listDocuments() {
57
+ return apiRequest("/api/v1/documents");
58
+ }
59
+ async function deleteDocument(slug) {
60
+ return apiRequest(`/api/v1/documents?slug=${encodeURIComponent(slug)}`, { method: "DELETE" });
61
+ }
62
+ // -- Server setup --
63
+ const server = new Server({ name: "mcp-server-jotbird", version: VERSION }, { capabilities: { tools: {} } });
64
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
65
+ tools: [
66
+ {
67
+ name: "publish",
68
+ description: "Publish Markdown content as a beautifully formatted web page with a " +
69
+ "shareable URL on JotBird. Use when the user wants to share, publish, " +
70
+ "or host written content online. Supports full Markdown including " +
71
+ "headings, lists, code blocks, tables, footnotes, and math. " +
72
+ "To update an existing page, pass its slug.",
73
+ inputSchema: {
74
+ type: "object",
75
+ properties: {
76
+ markdown: {
77
+ type: "string",
78
+ description: "Markdown content to publish. Supports standard Markdown plus " +
79
+ "footnotes, task lists, definition lists, math ($…$ and $$…$$), " +
80
+ "and inline HTML. Max 256 KB.",
81
+ },
82
+ title: {
83
+ type: "string",
84
+ description: "Page title. If omitted, the first H1 in the Markdown is used.",
85
+ },
86
+ slug: {
87
+ type: "string",
88
+ description: "URL slug (e.g. 'my-notes'). If this slug already exists and " +
89
+ "you own it, the page is updated in place. Omit to auto-generate.",
90
+ },
91
+ },
92
+ required: ["markdown"],
93
+ },
94
+ },
95
+ {
96
+ name: "list_documents",
97
+ description: "List the user's published JotBird pages. Use to check what's already " +
98
+ "published, find a slug for updating or deleting, or see expiration dates. " +
99
+ "Returns each page's title, URL, slug, and expiration.",
100
+ inputSchema: {
101
+ type: "object",
102
+ properties: {},
103
+ },
104
+ },
105
+ {
106
+ name: "delete",
107
+ description: "Permanently delete a published JotBird page and its shareable URL. " +
108
+ "Use when the user wants to take down or remove a published page. " +
109
+ "This cannot be undone.",
110
+ inputSchema: {
111
+ type: "object",
112
+ properties: {
113
+ slug: {
114
+ type: "string",
115
+ description: "Slug of the page to delete (e.g. 'my-notes'). " +
116
+ "Use list_documents to find slugs.",
117
+ },
118
+ },
119
+ required: ["slug"],
120
+ },
121
+ },
122
+ ],
123
+ }));
124
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
125
+ const { name, arguments: args } = request.params;
126
+ try {
127
+ switch (name) {
128
+ case "publish": {
129
+ const { markdown, title, slug } = PublishArgs.parse(args);
130
+ const result = await publishDocument({ markdown, title, slug });
131
+ const action = result.created ? "Published" : "Updated";
132
+ const expiry = result.expiresAt
133
+ ? `\nExpires: ${result.expiresAt}`
134
+ : "\nExpires: never (Pro)";
135
+ return {
136
+ content: [
137
+ {
138
+ type: "text",
139
+ text: `${action}: ${result.url}\n` +
140
+ `Slug: ${result.slug}\n` +
141
+ `Title: ${result.title ?? "(untitled)"}` +
142
+ expiry,
143
+ },
144
+ ],
145
+ };
146
+ }
147
+ case "list_documents": {
148
+ const { documents } = await listDocuments();
149
+ if (documents.length === 0) {
150
+ return {
151
+ content: [
152
+ { type: "text", text: "No documents found." },
153
+ ],
154
+ };
155
+ }
156
+ const lines = documents.map((d) => {
157
+ const expires = d.expiresAt ?? "never";
158
+ return `- **${d.title || "(untitled)"}**\n ${d.url}\n slug: ${d.slug} · expires: ${expires}`;
159
+ });
160
+ return {
161
+ content: [
162
+ {
163
+ type: "text",
164
+ text: `${documents.length} document(s):\n\n${lines.join("\n\n")}`,
165
+ },
166
+ ],
167
+ };
168
+ }
169
+ case "delete": {
170
+ const { slug } = DeleteArgs.parse(args);
171
+ await deleteDocument(slug);
172
+ return {
173
+ content: [
174
+ {
175
+ type: "text",
176
+ text: `Deleted document "${slug}".`,
177
+ },
178
+ ],
179
+ };
180
+ }
181
+ default:
182
+ return {
183
+ content: [
184
+ { type: "text", text: `Unknown tool: ${name}` },
185
+ ],
186
+ isError: true,
187
+ };
188
+ }
189
+ }
190
+ catch (error) {
191
+ if (error instanceof z.ZodError) {
192
+ const issues = error.issues
193
+ .map((i) => `${i.path.join(".")}: ${i.message}`)
194
+ .join("; ");
195
+ return {
196
+ content: [
197
+ {
198
+ type: "text",
199
+ text: `Validation error: ${issues}`,
200
+ },
201
+ ],
202
+ isError: true,
203
+ };
204
+ }
205
+ return {
206
+ content: [
207
+ {
208
+ type: "text",
209
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`,
210
+ },
211
+ ],
212
+ isError: true,
213
+ };
214
+ }
215
+ });
216
+ return server;
217
+ }
218
+ // ---------------------------------------------------------------------------
219
+ // Start (only when run directly, not when imported by tests)
220
+ // ---------------------------------------------------------------------------
221
+ const isMain = process.argv[1] &&
222
+ import.meta.url.endsWith(process.argv[1].replace(/\\/g, "/"));
223
+ if (isMain) {
224
+ const apiKey = process.env.JOTBIRD_API_KEY;
225
+ if (!apiKey) {
226
+ console.error("Error: JOTBIRD_API_KEY environment variable is required.\n" +
227
+ "Get your API key at: https://www.jotbird.com/account");
228
+ process.exit(1);
229
+ }
230
+ const apiBase = process.env.JOTBIRD_API_URL || "https://www.jotbird.com";
231
+ const server = createServer(apiKey, apiBase);
232
+ const transport = new StdioServerTransport();
233
+ await server.connect(transport);
234
+ console.error(`JotBird MCP server v${VERSION} running on stdio`);
235
+ }
236
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO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0 +1,49 @@
1
+ {
2
+ "name": "mcp-server-jotbird",
3
+ "version": "0.1.0",
4
+ "description": "MCP server for JotBird – publish Markdown documents from any LLM",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "bin": {
8
+ "mcp-server-jotbird": "./dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "dev": "tsc --watch",
16
+ "test": "vitest run",
17
+ "test:watch": "vitest",
18
+ "prepublishOnly": "npm run build"
19
+ },
20
+ "keywords": [
21
+ "mcp",
22
+ "model-context-protocol",
23
+ "jotbird",
24
+ "markdown",
25
+ "publishing"
26
+ ],
27
+ "author": "JotBird LLC",
28
+ "license": "MIT",
29
+ "homepage": "https://www.jotbird.com/mcp",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/jotbirdhq/mcp-server-jotbird.git"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/jotbirdhq/mcp-server-jotbird/issues"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "dependencies": {
41
+ "@modelcontextprotocol/sdk": "^1.0.0",
42
+ "zod": "^3.25.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^20.0.0",
46
+ "typescript": "^5.0.0",
47
+ "vitest": "^4.0.18"
48
+ }
49
+ }