notebooklm-mcp-server 1.1.6 β 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 +45 -11
- package/dist/auth-cli.js +9 -10
- package/dist/auth.js +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +3 -3
- package/dist/index.js +1 -1
- package/dist/server.js +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,6 +54,9 @@ npm install -g notebooklm-mcp-server
|
|
|
54
54
|
npx playwright install chromium
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
> [!NOTE]
|
|
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
|
+
|
|
57
60
|
### 2. Direct usage with NPX (Zero-Config)
|
|
58
61
|
|
|
59
62
|
If you don't want to install it globally, you can run it directly:
|
|
@@ -76,6 +79,9 @@ Before using the server, you must link it to your Google Account. This version u
|
|
|
76
79
|
2. A browser window will open. Log in with your Google account.
|
|
77
80
|
3. Close the browser once you see your notebooks. Your session is now securely saved locally.
|
|
78
81
|
|
|
82
|
+
> [!TIP]
|
|
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
|
+
|
|
79
85
|
---
|
|
80
86
|
|
|
81
87
|
## β‘ Quick Start
|
|
@@ -170,17 +176,45 @@ claude skill add notebooklm -- "npx -y notebooklm-mcp-server start"
|
|
|
170
176
|
|
|
171
177
|
## π Documentation
|
|
172
178
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
| `
|
|
179
|
-
| `
|
|
180
|
-
| `
|
|
181
|
-
| `
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
The following tools are available through this MCP server:
|
|
180
|
+
|
|
181
|
+
### π Notebook Management
|
|
182
|
+
| Tool | Description |
|
|
183
|
+
| :----------------- | :---------------------------------------------------- |
|
|
184
|
+
| `notebook_list` | Lists all notebooks in your account. |
|
|
185
|
+
| `notebook_create` | Creates a new notebook with a title. |
|
|
186
|
+
| `notebook_rename` | Renames an existing notebook. |
|
|
187
|
+
| `notebook_delete` | Deletes a notebook (Warning: Destructive). |
|
|
188
|
+
|
|
189
|
+
### ποΈ Source Management
|
|
190
|
+
| Tool | Description |
|
|
191
|
+
| :----------------------- | :----------------------------------------------------- |
|
|
192
|
+
| `notebook_add_url` | Adds a website or YouTube video as a source. |
|
|
193
|
+
| `notebook_add_text` | Adds custom text content as a source. |
|
|
194
|
+
| `notebook_add_local_file` | Uploads a local PDF, Markdown or Text file. |
|
|
195
|
+
| `notebook_add_drive` | Adds a file from Google Drive (Docs, Slides, etc). |
|
|
196
|
+
| `source_delete` | Removes a source from a notebook. |
|
|
197
|
+
| `source_sync` | Syncs a Drive source to get the latest version. |
|
|
198
|
+
|
|
199
|
+
### π Research & Query
|
|
200
|
+
| Tool | Description |
|
|
201
|
+
| :----------------- | :---------------------------------------------------- |
|
|
202
|
+
| `notebook_query` | Asks a grounded question to a specific notebook. |
|
|
203
|
+
| `research_start` | Starts a web/drive research task. |
|
|
204
|
+
| `research_poll` | Polls for research status and results. |
|
|
205
|
+
| `research_import` | Imports research results as permanent sources. |
|
|
206
|
+
|
|
207
|
+
### π¨ Studio & Generation
|
|
208
|
+
| Tool | Description |
|
|
209
|
+
| :---------------------- | :---------------------------------------------------- |
|
|
210
|
+
| `audio_overview_create` | Generates an Audio Overview (podcast). |
|
|
211
|
+
| `studio_poll` | Checks status of generated audio/video artifacts. |
|
|
212
|
+
| `mind_map_generate` | Generates a Mind Map JSON from sources. |
|
|
213
|
+
|
|
214
|
+
### βοΈ System
|
|
215
|
+
| Tool | Description |
|
|
216
|
+
| :------------- | :----------------------------------------------------------------- |
|
|
217
|
+
| `refresh_auth` | **Interactive**: Opens a browser to renew your Google session. Use this if tools start failing. |
|
|
184
218
|
|
|
185
219
|
---
|
|
186
220
|
|
package/dist/auth-cli.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { AuthManager } from './auth.js';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
-
import ora from 'ora';
|
|
5
4
|
export async function runAuthCli() {
|
|
6
5
|
const auth = new AuthManager();
|
|
7
|
-
|
|
8
|
-
console.
|
|
9
|
-
console.
|
|
10
|
-
|
|
6
|
+
// Use stderr for ALL logs to avoid breaking MCP stdout
|
|
7
|
+
console.error('\n' + chalk.cyan.bold('βββββββββββββββββββββββββββββββββββββββββββββ'));
|
|
8
|
+
console.error(chalk.cyan.bold('β NotebookLM MCP Authentication β'));
|
|
9
|
+
console.error(chalk.cyan.bold('βββββββββββββββββββββββββββββββββββββββββββββ\n'));
|
|
11
10
|
try {
|
|
12
11
|
await auth.runAuthentication((status) => {
|
|
13
|
-
|
|
12
|
+
console.error(chalk.blue(`[Status] ${status}`));
|
|
14
13
|
});
|
|
15
|
-
|
|
16
|
-
console.
|
|
14
|
+
console.error('\n' + chalk.green.bold('Authentication successful!'));
|
|
15
|
+
console.error(chalk.white('Your session is now active. You can close any leftovers and return to your chat.'));
|
|
17
16
|
}
|
|
18
17
|
catch (error) {
|
|
19
|
-
|
|
20
|
-
console.error(
|
|
18
|
+
console.error('\n' + chalk.red.bold('Authentication failed'));
|
|
19
|
+
console.error(chalk.red('Error: ') + error.message);
|
|
21
20
|
process.exit(1);
|
|
22
21
|
}
|
|
23
22
|
}
|
package/dist/auth.js
CHANGED
|
@@ -89,7 +89,7 @@ export class AuthManager {
|
|
|
89
89
|
fs.mkdirSync(path.dirname(this.authPath), { recursive: true });
|
|
90
90
|
}
|
|
91
91
|
fs.writeFileSync(this.authPath, JSON.stringify(authData, null, 2));
|
|
92
|
-
console.
|
|
92
|
+
console.error(`Authentication successful! Cookies saved to ${this.authPath}`);
|
|
93
93
|
await browser.close();
|
|
94
94
|
}
|
|
95
95
|
getSavedCookies() {
|
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: {},
|
|
@@ -277,19 +277,19 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
277
277
|
case "notebook_list":
|
|
278
278
|
const notebooks = await client.listNotebooks();
|
|
279
279
|
if (!notebooks || notebooks.length === 0) {
|
|
280
|
-
return { content: [{ type: "text", text: "No
|
|
280
|
+
return { content: [{ type: "text", text: "No notebooks found. Please verify your session with 'notebooklm-mcp-auth'." }] };
|
|
281
281
|
}
|
|
282
282
|
const listText = notebooks.map(n => `- ${n.title} (ID: ${n.id})`).join('\n');
|
|
283
|
-
return { content: [{ type: "text", text: `
|
|
283
|
+
return { content: [{ type: "text", text: `I found ${notebooks.length} notebooks in your account:\n\n${listText}` }] };
|
|
284
284
|
case "notebook_create":
|
|
285
285
|
const newId = await client.createNotebook(args?.title);
|
|
286
|
-
return { content: [{ type: "text", text: `
|
|
286
|
+
return { content: [{ type: "text", text: `Successfully created notebook: ${args?.title} (ID: ${newId})` }] };
|
|
287
287
|
case "notebook_delete":
|
|
288
288
|
await client.deleteNotebook(args?.notebook_id);
|
|
289
|
-
return { content: [{ type: "text", text: `
|
|
289
|
+
return { content: [{ type: "text", text: `Notebook deleted.` }] };
|
|
290
290
|
case "notebook_rename":
|
|
291
291
|
await client.renameNotebook(args?.notebook_id, args?.title);
|
|
292
|
-
return { content: [{ type: "text", text: `
|
|
292
|
+
return { content: [{ type: "text", text: `Notebook renamed to: ${args?.title}` }] };
|
|
293
293
|
case "notebook_add_url":
|
|
294
294
|
const sourceIdUrl = await client.addUrlSource(args?.notebook_id, args?.url);
|
|
295
295
|
return { content: [{ type: "text", text: JSON.stringify({ status: "success", source_id: sourceIdUrl }) }] };
|
|
@@ -356,7 +356,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
356
356
|
catch (error) {
|
|
357
357
|
console.error(chalk.red(`Tool execution error [${name}]:`), error);
|
|
358
358
|
return {
|
|
359
|
-
content: [{ type: "text", text: `Error
|
|
359
|
+
content: [{ type: "text", text: `Error: ${error.message || String(error)}` }],
|
|
360
360
|
isError: true,
|
|
361
361
|
};
|
|
362
362
|
}
|
|
@@ -364,7 +364,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
364
364
|
async function main() {
|
|
365
365
|
const transport = new StdioServerTransport();
|
|
366
366
|
await server.connect(transport);
|
|
367
|
-
console.error("NotebookLM MCP Server v1.1.
|
|
367
|
+
console.error("NotebookLM MCP Server v1.1.8 running on stdio");
|
|
368
368
|
}
|
|
369
369
|
main().catch((error) => {
|
|
370
370
|
console.error("Fatal error:", error);
|