notebooklm-mcp-server 1.1.7 → 1.1.8
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 +2 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.js +3 -3
- package/dist/index.js +1 -1
- package/dist/server.js +12 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ npx playwright install chromium
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
> [!NOTE]
|
|
58
|
-
> **Auto-
|
|
58
|
+
> **Auto-update**: The server automatically checks for new versions at startup. If an update exists, it will install itself and ask you to restart to ensure you always have the latest Google fixes.
|
|
59
59
|
|
|
60
60
|
### 2. Direct usage with NPX (Zero-Config)
|
|
61
61
|
|
|
@@ -80,7 +80,7 @@ Before using the server, you must link it to your Google Account. This version u
|
|
|
80
80
|
3. Close the browser once you see your notebooks. Your session is now securely saved locally.
|
|
81
81
|
|
|
82
82
|
> [!TIP]
|
|
83
|
-
> **
|
|
83
|
+
> **Session Expired?** If your agent receives authentication errors, simply ask it to run the command `npx notebooklm-mcp-server refresh_auth`. It will automatically open the browser for you to renew the session without leaving your chat.
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
package/dist/client.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class NotebookLMClient {
|
|
|
12
12
|
private sessionId;
|
|
13
13
|
constructor(cookies: string);
|
|
14
14
|
/**
|
|
15
|
-
* Internal RPC executor with
|
|
15
|
+
* Internal RPC executor with the original, working legacy format.
|
|
16
16
|
*/
|
|
17
17
|
private callRpc;
|
|
18
18
|
/**
|
package/dist/client.js
CHANGED
|
@@ -27,11 +27,11 @@ export class NotebookLMClient {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Internal RPC executor with
|
|
30
|
+
* Internal RPC executor with the original, working legacy format.
|
|
31
31
|
*/
|
|
32
32
|
async callRpc(rpcId, params, _retryCount = 0) {
|
|
33
|
-
//
|
|
34
|
-
const fReq = JSON.stringify([
|
|
33
|
+
// Reverting to the simpler format that proved stable in v1.1.2
|
|
34
|
+
const fReq = JSON.stringify([null, JSON.stringify(params)]);
|
|
35
35
|
const body = new URLSearchParams();
|
|
36
36
|
body.append('f.req', fReq);
|
|
37
37
|
if (this.csrfToken) {
|
package/dist/index.js
CHANGED
package/dist/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import { AuthManager } from "./auth.js";
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
const server = new Server({
|
|
8
8
|
name: "notebooklm-mcp-server",
|
|
9
|
-
version: "1.1.
|
|
9
|
+
version: "1.1.8",
|
|
10
10
|
}, {
|
|
11
11
|
capabilities: {
|
|
12
12
|
tools: {},
|
|
@@ -276,27 +276,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
276
276
|
switch (name) {
|
|
277
277
|
case "notebook_list":
|
|
278
278
|
const notebooks = await client.listNotebooks();
|
|
279
|
-
|
|
280
|
-
content: [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
status: "success",
|
|
285
|
-
notebooks: notebooks || [],
|
|
286
|
-
count: notebooks?.length || 0
|
|
287
|
-
}, null, 2)
|
|
288
|
-
}
|
|
289
|
-
]
|
|
290
|
-
};
|
|
279
|
+
if (!notebooks || notebooks.length === 0) {
|
|
280
|
+
return { content: [{ type: "text", text: "No notebooks found. Please verify your session with 'notebooklm-mcp-auth'." }] };
|
|
281
|
+
}
|
|
282
|
+
const listText = notebooks.map(n => `- ${n.title} (ID: ${n.id})`).join('\n');
|
|
283
|
+
return { content: [{ type: "text", text: `I found ${notebooks.length} notebooks in your account:\n\n${listText}` }] };
|
|
291
284
|
case "notebook_create":
|
|
292
285
|
const newId = await client.createNotebook(args?.title);
|
|
293
|
-
return { content: [{ type: "text", text:
|
|
286
|
+
return { content: [{ type: "text", text: `Successfully created notebook: ${args?.title} (ID: ${newId})` }] };
|
|
294
287
|
case "notebook_delete":
|
|
295
288
|
await client.deleteNotebook(args?.notebook_id);
|
|
296
|
-
return { content: [{ type: "text", text:
|
|
289
|
+
return { content: [{ type: "text", text: `Notebook deleted.` }] };
|
|
297
290
|
case "notebook_rename":
|
|
298
291
|
await client.renameNotebook(args?.notebook_id, args?.title);
|
|
299
|
-
return { content: [{ type: "text", text:
|
|
292
|
+
return { content: [{ type: "text", text: `Notebook renamed to: ${args?.title}` }] };
|
|
300
293
|
case "notebook_add_url":
|
|
301
294
|
const sourceIdUrl = await client.addUrlSource(args?.notebook_id, args?.url);
|
|
302
295
|
return { content: [{ type: "text", text: JSON.stringify({ status: "success", source_id: sourceIdUrl }) }] };
|
|
@@ -363,22 +356,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
363
356
|
catch (error) {
|
|
364
357
|
console.error(chalk.red(`Tool execution error [${name}]:`), error);
|
|
365
358
|
return {
|
|
366
|
-
content: [
|
|
367
|
-
|
|
368
|
-
type: "text",
|
|
369
|
-
text: JSON.stringify({
|
|
370
|
-
status: "error",
|
|
371
|
-
error: error.message || String(error)
|
|
372
|
-
}, null, 2)
|
|
373
|
-
}
|
|
374
|
-
]
|
|
359
|
+
content: [{ type: "text", text: `Error: ${error.message || String(error)}` }],
|
|
360
|
+
isError: true,
|
|
375
361
|
};
|
|
376
362
|
}
|
|
377
363
|
});
|
|
378
364
|
async function main() {
|
|
379
365
|
const transport = new StdioServerTransport();
|
|
380
366
|
await server.connect(transport);
|
|
381
|
-
console.error("NotebookLM MCP Server v1.1.
|
|
367
|
+
console.error("NotebookLM MCP Server v1.1.8 running on stdio");
|
|
382
368
|
}
|
|
383
369
|
main().catch((error) => {
|
|
384
370
|
console.error("Fatal error:", error);
|