notebooklm-mcp-server 1.1.4 → 1.1.6
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/dist/client.d.ts +1 -1
- package/dist/client.js +3 -2
- package/dist/index.js +3 -3
- package/dist/server.js +10 -9
- package/dist/update.d.ts +1 -1
- package/dist/update.js +11 -6
- package/package.json +1 -1
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 correct batchexecute envelope format.
|
|
16
16
|
*/
|
|
17
17
|
private callRpc;
|
|
18
18
|
/**
|
package/dist/client.js
CHANGED
|
@@ -27,10 +27,11 @@ export class NotebookLMClient {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Internal RPC executor with
|
|
30
|
+
* Internal RPC executor with correct batchexecute envelope format.
|
|
31
31
|
*/
|
|
32
32
|
async callRpc(rpcId, params, _retryCount = 0) {
|
|
33
|
-
|
|
33
|
+
// Current Google batchexecute envelope format
|
|
34
|
+
const fReq = JSON.stringify([[[rpcId, JSON.stringify(params), null, "1"]]]);
|
|
34
35
|
const body = new URLSearchParams();
|
|
35
36
|
body.append('f.req', fReq);
|
|
36
37
|
if (this.csrfToken) {
|
package/dist/index.js
CHANGED
|
@@ -5,19 +5,19 @@ const program = new Command();
|
|
|
5
5
|
program
|
|
6
6
|
.name('notebooklm-mcp-server')
|
|
7
7
|
.description('NotebookLM MCP Server (Node.js)')
|
|
8
|
-
.version('1.1.
|
|
8
|
+
.version('1.1.6');
|
|
9
9
|
program
|
|
10
10
|
.command('server')
|
|
11
11
|
.description('Start the MCP server (default)')
|
|
12
12
|
.action(async () => {
|
|
13
|
-
await checkForUpdates();
|
|
13
|
+
await checkForUpdates(true);
|
|
14
14
|
await import('./server.js');
|
|
15
15
|
});
|
|
16
16
|
program
|
|
17
17
|
.command('auth')
|
|
18
18
|
.description('Run interactive authentication')
|
|
19
19
|
.action(async () => {
|
|
20
|
-
await checkForUpdates();
|
|
20
|
+
await checkForUpdates(false);
|
|
21
21
|
const { runAuthCli } = await import('./auth-cli.js');
|
|
22
22
|
await runAuthCli();
|
|
23
23
|
});
|
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.6",
|
|
10
10
|
}, {
|
|
11
11
|
capabilities: {
|
|
12
12
|
tools: {},
|
|
@@ -277,18 +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:
|
|
280
|
+
return { content: [{ type: "text", text: "No se encontraron cuadernos. Si crees que esto es un error, intenta ejecutar 'refresh_auth' para renovar la sesión." }] };
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
const listText = notebooks.map(n => `- ${n.title} (ID: ${n.id})`).join('\n');
|
|
283
|
+
return { content: [{ type: "text", text: `Has encontrado ${notebooks.length} cuadernos:\n\n${listText}` }] };
|
|
283
284
|
case "notebook_create":
|
|
284
285
|
const newId = await client.createNotebook(args?.title);
|
|
285
|
-
return { content: [{ type: "text", text:
|
|
286
|
+
return { content: [{ type: "text", text: `Cuaderno creado exitosamente con ID: ${newId}` }] };
|
|
286
287
|
case "notebook_delete":
|
|
287
288
|
await client.deleteNotebook(args?.notebook_id);
|
|
288
|
-
return { content: [{ type: "text", text:
|
|
289
|
+
return { content: [{ type: "text", text: `Cuaderno eliminado exitosamente.` }] };
|
|
289
290
|
case "notebook_rename":
|
|
290
291
|
await client.renameNotebook(args?.notebook_id, args?.title);
|
|
291
|
-
return { content: [{ type: "text", text:
|
|
292
|
+
return { content: [{ type: "text", text: `Cuaderno renombrado correctamente a: ${args?.title}` }] };
|
|
292
293
|
case "notebook_add_url":
|
|
293
294
|
const sourceIdUrl = await client.addUrlSource(args?.notebook_id, args?.url);
|
|
294
295
|
return { content: [{ type: "text", text: JSON.stringify({ status: "success", source_id: sourceIdUrl }) }] };
|
|
@@ -347,7 +348,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
347
348
|
// After auth is successful, we need to update our client
|
|
348
349
|
const newCookies = auth.getSavedCookies();
|
|
349
350
|
client = new NotebookLMClient(newCookies);
|
|
350
|
-
return { content: [{ type: "text", text:
|
|
351
|
+
return { content: [{ type: "text", text: "Autenticación renovada correctamente. Las herramientas deberían funcionar ahora." }] };
|
|
351
352
|
default:
|
|
352
353
|
throw new Error(`Unknown tool: ${name}`);
|
|
353
354
|
}
|
|
@@ -355,7 +356,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
355
356
|
catch (error) {
|
|
356
357
|
console.error(chalk.red(`Tool execution error [${name}]:`), error);
|
|
357
358
|
return {
|
|
358
|
-
content: [{ type: "text", text:
|
|
359
|
+
content: [{ type: "text", text: `Error de ejecución: ${error.message || String(error)}` }],
|
|
359
360
|
isError: true,
|
|
360
361
|
};
|
|
361
362
|
}
|
|
@@ -363,7 +364,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
363
364
|
async function main() {
|
|
364
365
|
const transport = new StdioServerTransport();
|
|
365
366
|
await server.connect(transport);
|
|
366
|
-
console.error("NotebookLM MCP Server running on stdio");
|
|
367
|
+
console.error("NotebookLM MCP Server v1.1.6 running on stdio");
|
|
367
368
|
}
|
|
368
369
|
main().catch((error) => {
|
|
369
370
|
console.error("Fatal error:", error);
|
package/dist/update.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function checkForUpdates(): Promise<void>;
|
|
1
|
+
export declare function checkForUpdates(silentStart?: boolean): Promise<void>;
|
package/dist/update.js
CHANGED
|
@@ -5,30 +5,35 @@ import path from 'path';
|
|
|
5
5
|
import fs from 'fs';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
export async function checkForUpdates() {
|
|
8
|
+
export async function checkForUpdates(silentStart = true) {
|
|
9
9
|
try {
|
|
10
10
|
// Get current version from package.json
|
|
11
11
|
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
12
12
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
13
13
|
const currentVersion = pkg.version;
|
|
14
|
+
if (!silentStart) {
|
|
15
|
+
console.error(chalk.blue(`[v${currentVersion}] Comprobando actualizaciones...`));
|
|
16
|
+
}
|
|
14
17
|
// Get latest version from npm
|
|
15
18
|
const { data } = await axios.get('https://registry.npmjs.org/notebooklm-mcp-server/latest', { timeout: 3000 });
|
|
16
19
|
const latestVersion = data.version;
|
|
17
20
|
if (latestVersion !== currentVersion) {
|
|
18
|
-
|
|
19
|
-
console.error(chalk.yellow(`\n[Update] Nueva versión disponible: ${latestVersion} (Actual: ${currentVersion})`));
|
|
21
|
+
console.error(chalk.yellow(`\n[Update] ¡Nueva versión disponible! (${latestVersion})`));
|
|
20
22
|
console.error(chalk.yellow(`[Update] Actualizando automáticamente...\n`));
|
|
21
23
|
try {
|
|
22
24
|
execSync('npm install -g notebooklm-mcp-server@latest', { stdio: ['ignore', 'ignore', 'inherit'] });
|
|
23
|
-
console.error(chalk.green('[Update]
|
|
25
|
+
console.error(chalk.green('[Update] Actualización completada. Por favor, reinicia la aplicación.\n'));
|
|
24
26
|
process.exit(0);
|
|
25
27
|
}
|
|
26
28
|
catch (updateError) {
|
|
27
|
-
console.error(chalk.red('[Update] Error al actualizar.
|
|
29
|
+
console.error(chalk.red('[Update] Error al actualizar automáticamente.'));
|
|
28
30
|
}
|
|
29
31
|
}
|
|
32
|
+
else if (!silentStart) {
|
|
33
|
+
console.error(chalk.green(`[v${currentVersion}] Estás usando la última versión.`));
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
catch (error) {
|
|
32
|
-
// Fail silently
|
|
37
|
+
// Fail silently
|
|
33
38
|
}
|
|
34
39
|
}
|