@charlie.act7/gemini-notebook-mcp 2.1.1 → 2.1.3
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 +40 -13
- package/dist/auth/auth-manager.d.ts +8 -11
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +45 -67
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -1
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +9 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +50 -6
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +63 -44
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +28 -21
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/notebooklm/audio.d.ts +3 -0
- package/dist/notebooklm/audio.d.ts.map +1 -1
- package/dist/notebooklm/audio.js +61 -4
- package/dist/notebooklm/audio.js.map +1 -1
- package/dist/notebooklm/sources.d.ts +2 -2
- package/dist/notebooklm/sources.d.ts.map +1 -1
- package/dist/notebooklm/sources.js +5 -5
- package/dist/notebooklm/sources.js.map +1 -1
- package/dist/resources/resource-handlers.js +2 -2
- package/dist/resources/resource-handlers.js.map +1 -1
- package/dist/session/browser-session.d.ts +2 -1
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +67 -36
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +11 -6
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +79 -50
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +16 -10
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/tools/definitions/ask-question.d.ts +4 -3
- package/dist/tools/definitions/ask-question.d.ts.map +1 -1
- package/dist/tools/definitions/ask-question.js +9 -109
- package/dist/tools/definitions/ask-question.js.map +1 -1
- package/dist/tools/definitions/notebook-management.js +4 -4
- package/dist/tools/definitions/notebook-management.js.map +1 -1
- package/dist/tools/definitions/session-management.d.ts.map +1 -1
- package/dist/tools/definitions/session-management.js +2 -0
- package/dist/tools/definitions/session-management.js.map +1 -1
- package/dist/tools/definitions/sources.d.ts.map +1 -1
- package/dist/tools/definitions/sources.js +8 -7
- package/dist/tools/definitions/sources.js.map +1 -1
- package/dist/tools/definitions/system.d.ts.map +1 -1
- package/dist/tools/definitions/system.js +32 -24
- package/dist/tools/definitions/system.js.map +1 -1
- package/dist/tools/definitions.d.ts +3 -3
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +5 -9
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers.d.ts +11 -3
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +71 -66
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/validation.d.ts +6 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +160 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +2 -1
- package/dist/transport/http.js.map +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cleanup-manager.d.ts +35 -115
- package/dist/utils/cleanup-manager.d.ts.map +1 -1
- package/dist/utils/cleanup-manager.js +179 -632
- package/dist/utils/cleanup-manager.js.map +1 -1
- package/dist/utils/disclaimer.d.ts +2 -1
- package/dist/utils/disclaimer.d.ts.map +1 -1
- package/dist/utils/disclaimer.js +3 -2
- package/dist/utils/disclaimer.js.map +1 -1
- package/dist/utils/logger.d.ts +26 -39
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +104 -50
- package/dist/utils/logger.js.map +1 -1
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +17 -0
- package/dist/version.js.map +1 -0
- package/docs/configuration.md +37 -7
- package/docs/implementation-plan.md +111 -0
- package/docs/tools.md +23 -15
- package/docs/troubleshooting.md +24 -12
- package/docs/usage-guide.md +7 -4
- package/package.json +70 -71
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Implementation plan
|
|
2
|
+
|
|
3
|
+
This roadmap turns the security and reliability review into independently releasable changes. Each phase has an explicit compatibility boundary and acceptance criteria so that browser automation, protocol changes, and new product features are not mixed in one release.
|
|
4
|
+
|
|
5
|
+
## 2.1.3 — Security and consistency
|
|
6
|
+
|
|
7
|
+
Status: implemented on `agent/security-hardening-2.1.3`.
|
|
8
|
+
|
|
9
|
+
Scope:
|
|
10
|
+
|
|
11
|
+
- Keep all tool descriptions static and exclude notebook/user content from trusted MCP metadata.
|
|
12
|
+
- Report the NotebookLM model as `google-managed` and derive the server version from `package.json`.
|
|
13
|
+
- Limit `cleanup_data` to `NOTEBOOKLM_DATA_DIR`, with a short-lived preview token and an unchanged-manifest check.
|
|
14
|
+
- Replace short session IDs with UUIDs and scope browser sessions to the owning MCP connection.
|
|
15
|
+
- Redact content, URLs, paths, account identifiers, and DOM diagnostics from logs by default.
|
|
16
|
+
- Validate every tool call with Zod before opening a browser.
|
|
17
|
+
- Return machine-readable error details and `structuredContent` alongside text content.
|
|
18
|
+
- Constrain downloads to `NOTEBOOKLM_OUTPUT_DIR`, sanitize filenames, create the output directory, and avoid collisions.
|
|
19
|
+
- Apply one authenticated-page recovery wrapper to question, source, and audio operations.
|
|
20
|
+
- Make browser locale and timezone configurable.
|
|
21
|
+
- Add multi-platform CI, CodeQL, Dependabot, package checks, and focused regression tests.
|
|
22
|
+
|
|
23
|
+
Acceptance criteria:
|
|
24
|
+
|
|
25
|
+
- `npm run check` passes.
|
|
26
|
+
- `npm pack --dry-run` succeeds and reports version `2.1.3`.
|
|
27
|
+
- A notebook title/description containing instructions never appears in a tool description.
|
|
28
|
+
- Invalid input is rejected before browser initialization.
|
|
29
|
+
- A cleanup confirmation fails when its preview token expired or the target manifest changed.
|
|
30
|
+
- Cleanup and downloads cannot escape their configured roots, including through symbolic links.
|
|
31
|
+
- One HTTP/MCP connection cannot list, reset, or close another connection's browser sessions.
|
|
32
|
+
- Test questions, DOM fragments, full URLs, account names, and local paths do not appear in default logs.
|
|
33
|
+
|
|
34
|
+
## 2.2.0 — Browser robustness and MCP protocol
|
|
35
|
+
|
|
36
|
+
The following work is deliberately separate because it changes browser abstractions or protocol contracts.
|
|
37
|
+
|
|
38
|
+
1. Finish the selector registry
|
|
39
|
+
- Move citations, sources, Studio, home-grid, and authentication selectors into one versioned registry.
|
|
40
|
+
- Add verification callbacks and return `UI_CHANGED` when a selector group cannot be verified.
|
|
41
|
+
- Add anonymized DOM fixtures for multiple languages and UI states.
|
|
42
|
+
|
|
43
|
+
2. Complete the browser operation boundary
|
|
44
|
+
- Route every browser operation through the authenticated-page wrapper.
|
|
45
|
+
- Add operation-wide timeout budgets, one bounded retry, overlay cleanup, and redacted diagnostics.
|
|
46
|
+
- Propagate MCP cancellation through navigation, answer extraction, citations, generation, and downloads.
|
|
47
|
+
|
|
48
|
+
3. Strengthen transport isolation
|
|
49
|
+
- Define and document the supported single-user deployment model.
|
|
50
|
+
- If multi-user mode is added, require an authenticated principal and isolate profile, storage, library, and sessions per principal—not only browser session IDs.
|
|
51
|
+
- Add tests for session hijacking, concurrent requests, SSE closure, oversized bodies, and invalid Host/Origin/token values.
|
|
52
|
+
|
|
53
|
+
4. Evaluate MCP SDK migration
|
|
54
|
+
- Confirm the current official stable SDK and specification before changing dependencies.
|
|
55
|
+
- Migrate on a dedicated branch, preserve compatibility where possible, and use registered input/output schemas, normalized errors, request context, cancellation, and resources.
|
|
56
|
+
- Keep `structuredContent` contract tests against supported clients.
|
|
57
|
+
|
|
58
|
+
5. Expand the test pyramid
|
|
59
|
+
- Add selector fixtures, concurrency/failure injection, log-privacy snapshots, and packaged-binary smoke tests.
|
|
60
|
+
- Test Windows, macOS, and Linux with Node 22 and the next supported LTS.
|
|
61
|
+
|
|
62
|
+
Exit criteria:
|
|
63
|
+
|
|
64
|
+
- No browser-facing tool bypasses the common recovery/cancellation layer.
|
|
65
|
+
- Selector failure is distinguishable from a valid empty result.
|
|
66
|
+
- Transport ownership and deployment limits are documented and covered by adversarial tests.
|
|
67
|
+
- The packed CLI completes an MCP initialize/list-tools smoke test on every supported platform.
|
|
68
|
+
|
|
69
|
+
## 2.3.0 — NotebookLM features
|
|
70
|
+
|
|
71
|
+
This phase adds functionality without conflating NotebookLM browser automation with the Gemini API.
|
|
72
|
+
|
|
73
|
+
1. Source lifecycle
|
|
74
|
+
- Add `list_sources`, `get_source`, `get_source_status`, `remove_source`, `rename_source`, `refresh_source`, and batch operations.
|
|
75
|
+
- Add file, YouTube, and Drive import only after stable source IDs and indexing states are available.
|
|
76
|
+
|
|
77
|
+
2. Library synchronization
|
|
78
|
+
- Add `sync_library` and account import/change detection.
|
|
79
|
+
- Store a stable local UUID separately from the Google notebook ID and optional display slug.
|
|
80
|
+
|
|
81
|
+
3. Generic Studio artifacts
|
|
82
|
+
- Add `generate_artifact`, `list_artifacts`, `get_artifact_status`, `download_artifact`, and `delete_artifact`.
|
|
83
|
+
- Persist job IDs and states so polling survives an MCP restart.
|
|
84
|
+
|
|
85
|
+
4. Citation enrichment
|
|
86
|
+
- Return source ID/type/URL when available, structured locations, excerpts, and extraction status.
|
|
87
|
+
- Enforce one total citation-extraction budget instead of a full timeout per citation.
|
|
88
|
+
|
|
89
|
+
5. Optional Gemini API backend
|
|
90
|
+
- Perform a discovery spike against current official Gemini API and File Search documentation.
|
|
91
|
+
- Expose a separately named tool and provenance contract; never present API answers as NotebookLM answers.
|
|
92
|
+
- Require explicit API configuration, document costs/quotas, and do not assume existing notebooks are automatically available.
|
|
93
|
+
|
|
94
|
+
Exit criteria:
|
|
95
|
+
|
|
96
|
+
- Source and artifact operations return stable IDs and observable states.
|
|
97
|
+
- Library synchronization handles rename, duplicate, deletion, and inaccessible-notebook cases.
|
|
98
|
+
- Citations remain structured and bounded in latency.
|
|
99
|
+
- Browser and API backends have unambiguous names, storage, quotas, and provenance.
|
|
100
|
+
|
|
101
|
+
## Release discipline
|
|
102
|
+
|
|
103
|
+
For each release:
|
|
104
|
+
|
|
105
|
+
1. Update schemas, implementation, tests, documentation, and changelog in the same pull request.
|
|
106
|
+
2. Run `npm run check` and `npm pack --dry-run` from a clean checkout.
|
|
107
|
+
3. Install the generated tarball and smoke-test MCP initialization and `tools/list`.
|
|
108
|
+
4. Merge only after CI passes.
|
|
109
|
+
5. Publish from the merged commit with npm provenance when the registry workflow is configured.
|
|
110
|
+
6. Verify the registry version and tarball integrity after publication.
|
|
111
|
+
|
package/docs/tools.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tools
|
|
2
2
|
|
|
3
|
-
Every tool registered in
|
|
3
|
+
Every tool registered in the current 2.x release, with parameter schema, an example invocation (MCP `tools/call` arguments shape), and the expected return shape.
|
|
4
4
|
|
|
5
5
|
The server returns each tool result wrapped as `{ "success": true, "data": <object> }` (or `{ "success": false, "error": <string> }`). The shapes below describe the inner `data`.
|
|
6
6
|
|
|
@@ -53,7 +53,8 @@ Ask a question against a notebook. Reuses an existing browser session when `sess
|
|
|
53
53
|
},
|
|
54
54
|
"_provenance": {
|
|
55
55
|
"provider": "google-notebooklm",
|
|
56
|
-
"model": "
|
|
56
|
+
"model": "google-managed",
|
|
57
|
+
"model_selection": "managed-by-notebooklm",
|
|
57
58
|
"via": "chrome-automation",
|
|
58
59
|
"grounding": "user-uploaded-documents",
|
|
59
60
|
"ai_generated": true
|
|
@@ -148,7 +149,7 @@ Generate a podcast-style Audio Overview for a notebook. Resolves when the audio
|
|
|
148
149
|
}
|
|
149
150
|
```
|
|
150
151
|
|
|
151
|
-
Pair with `download_audio` to persist the file. Video / Infographic / Slides are not
|
|
152
|
+
Pair with `download_audio` to persist the file. Video / Infographic / Slides are not currently exposed.
|
|
152
153
|
|
|
153
154
|
---
|
|
154
155
|
|
|
@@ -160,7 +161,7 @@ Download the most recent Audio Overview to disk.
|
|
|
160
161
|
|
|
161
162
|
| Name | Type | Required | Notes |
|
|
162
163
|
|---|---|---|---|
|
|
163
|
-
| `destination_dir` | string | yes |
|
|
164
|
+
| `destination_dir` | string | yes | Directory under `NOTEBOOKLM_OUTPUT_DIR`; `.` selects the configured root. Created if missing. |
|
|
164
165
|
| `session_id` | string | no | |
|
|
165
166
|
| `notebook_id` | string | no | |
|
|
166
167
|
| `notebook_url` | string | no | |
|
|
@@ -171,7 +172,7 @@ Download the most recent Audio Overview to disk.
|
|
|
171
172
|
{
|
|
172
173
|
"name": "download_audio",
|
|
173
174
|
"arguments": {
|
|
174
|
-
"destination_dir": "
|
|
175
|
+
"destination_dir": "."
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
```
|
|
@@ -181,7 +182,7 @@ Download the most recent Audio Overview to disk.
|
|
|
181
182
|
```jsonc
|
|
182
183
|
{
|
|
183
184
|
"status": "success",
|
|
184
|
-
"file_path": "
|
|
185
|
+
"file_path": "<NOTEBOOKLM_OUTPUT_DIR>/overview-2026-04-30.m4a",
|
|
185
186
|
"size_bytes": 9_412_000
|
|
186
187
|
}
|
|
187
188
|
```
|
|
@@ -349,7 +350,9 @@ No parameters.
|
|
|
349
350
|
```jsonc
|
|
350
351
|
{
|
|
351
352
|
"status": "ok",
|
|
352
|
-
"
|
|
353
|
+
"auth_state_present": true,
|
|
354
|
+
"authenticated": null,
|
|
355
|
+
"authentication_check": "Authentication is verified when opening NotebookLM",
|
|
353
356
|
"active_sessions": 1,
|
|
354
357
|
"version": "2.0.0",
|
|
355
358
|
"config": {
|
|
@@ -361,7 +364,11 @@ No parameters.
|
|
|
361
364
|
}
|
|
362
365
|
```
|
|
363
366
|
|
|
364
|
-
|
|
367
|
+
`auth_state_present` means that `state.json` exists, is readable, and contains a
|
|
368
|
+
cookie array. It is not proof that Google currently accepts those cookies.
|
|
369
|
+
`authenticated` is therefore `null`; live authentication is checked when a
|
|
370
|
+
browser-driven NotebookLM tool opens the service. A missing backup may produce a
|
|
371
|
+
non-destructive tip, but never justifies `re_auth` or `cleanup_data` by itself.
|
|
365
372
|
|
|
366
373
|
---
|
|
367
374
|
|
|
@@ -374,7 +381,7 @@ Opens a visible Chrome for first-time Google login.
|
|
|
374
381
|
| `show_browser` | bool | no | Default `true` for setup. |
|
|
375
382
|
| `browser_options` | object | no | Same shape as `ask_question`. |
|
|
376
383
|
|
|
377
|
-
|
|
384
|
+
The call waits for login completion for up to 10 minutes and reports progress. A subsequent NotebookLM operation performs the live authentication check; `get_health` only reports saved-state presence.
|
|
378
385
|
|
|
379
386
|
---
|
|
380
387
|
|
|
@@ -391,18 +398,19 @@ Closes all sessions, deletes saved cookies + Chrome profile, opens a fresh login
|
|
|
391
398
|
|
|
392
399
|
## cleanup_data
|
|
393
400
|
|
|
394
|
-
|
|
401
|
+
Preview + deletion restricted to the configured `NOTEBOOKLM_DATA_DIR`. The tool never scans or deletes npm caches, Claude/Cursor/VS Code data, system temporary files, or trash.
|
|
395
402
|
|
|
396
403
|
| Name | Type | Required | Notes |
|
|
397
404
|
|---|---|---|---|
|
|
398
|
-
| `confirm` | bool | yes | `false` = preview only. `true` =
|
|
399
|
-
| `preserve_library` | bool | no | Keep `library.json` while wiping everything else. Default `false`. |
|
|
405
|
+
| `confirm` | bool | yes | `false` = preview only. `true` = execute using the preview token. |
|
|
406
|
+
| `preserve_library` | bool | no | Keep `library.json` while wiping everything else. Default `false`. |
|
|
407
|
+
| `preview_token` | string | when confirming | Expiring one-time token returned by the preview. |
|
|
400
408
|
|
|
401
409
|
Workflow:
|
|
402
410
|
|
|
403
|
-
1. `cleanup_data({ confirm: false, preserve_library: true })` —
|
|
404
|
-
2. Close all
|
|
405
|
-
3. `cleanup_data({ confirm: true,
|
|
411
|
+
1. `cleanup_data({ confirm: false, preserve_library: true })` — review paths, digest, and expiry.
|
|
412
|
+
2. Close all browser sessions.
|
|
413
|
+
3. `cleanup_data({ confirm: true, preview_token: "..." })` — execute only if the manifest is unchanged.
|
|
406
414
|
|
|
407
415
|
---
|
|
408
416
|
|
package/docs/troubleshooting.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Troubleshooting
|
|
2
2
|
|
|
3
|
-
A symptom → fix matrix for
|
|
3
|
+
A symptom → fix matrix for the current 2.x release. For the full env-var inventory, see [`configuration.md`](./configuration.md).
|
|
4
4
|
|
|
5
5
|
## Chrome fails to launch (macOS Tahoe / Windows exit 21)
|
|
6
6
|
|
|
@@ -34,21 +34,30 @@ Checks:
|
|
|
34
34
|
{ "name": "ask_question", "arguments": { "question": "...", "show_browser": true } }
|
|
35
35
|
```
|
|
36
36
|
Or start the server with `HEADLESS=false`.
|
|
37
|
-
3.
|
|
37
|
+
3. `get_health` can confirm that a readable auth backup exists, but it does not
|
|
38
|
+
probe Google. A browser-driven NotebookLM operation performs the live check.
|
|
38
39
|
|
|
39
40
|
## Session expired / repeated login prompts
|
|
40
41
|
|
|
41
|
-
Symptom: NotebookLM
|
|
42
|
+
Symptom: a browser-driven NotebookLM operation redirects to
|
|
43
|
+
`accounts.google.com` after a previously successful login.
|
|
42
44
|
|
|
43
45
|
Workflow:
|
|
44
46
|
|
|
45
|
-
1.
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
1. Retry with `show_browser=true` and confirm that Google actually requests
|
|
48
|
+
credentials. The age of `state.json` and `get_health.auth_state_present` do
|
|
49
|
+
not establish whether the live session is valid.
|
|
50
|
+
2. Close other MCP/Chrome processes that may hold the persistent profile lock,
|
|
51
|
+
or set `NOTEBOOK_PROFILE_STRATEGY=single` to fail clearly instead of using an
|
|
52
|
+
isolated profile.
|
|
53
|
+
3. Only after a confirmed sign-in redirect, run `re_auth` to wipe stored auth
|
|
54
|
+
and prompt for a fresh login. If that fails repeatedly, preview
|
|
55
|
+
`cleanup_data` with the library preserved:
|
|
48
56
|
```json
|
|
49
57
|
{ "name": "cleanup_data", "arguments": { "confirm": false, "preserve_library": true } }
|
|
50
58
|
```
|
|
51
|
-
Review the preview, then run again with
|
|
59
|
+
Review the preview, close every browser session, then run again with
|
|
60
|
+
`confirm: true` and the returned `preview_token`. Then `setup_auth`.
|
|
52
61
|
|
|
53
62
|
## WSL1
|
|
54
63
|
|
|
@@ -95,22 +104,25 @@ Symptom: Chrome processes survive after the MCP server exits.
|
|
|
95
104
|
v2 ships a 5-second shutdown watchdog and an aggressive teardown path, so this is rare. If it does happen:
|
|
96
105
|
|
|
97
106
|
1. Kill the lingering Chromes manually.
|
|
98
|
-
2.
|
|
107
|
+
2. Preview `cleanup_data` with `preserve_library: true`, then confirm using the
|
|
108
|
+
returned token to remove MCP-owned profile data.
|
|
99
109
|
3. Restart the server.
|
|
100
110
|
|
|
101
111
|
## Profile lock / `ProcessSingleton` errors
|
|
102
112
|
|
|
103
113
|
Cause: Another Chrome owns the base profile.
|
|
104
114
|
|
|
105
|
-
Fix:
|
|
115
|
+
Fix: the default `NOTEBOOK_PROFILE_STRATEGY=single` fails clearly so the server
|
|
116
|
+
does not silently open a clean profile. Close the other MCP/Chrome process. If
|
|
117
|
+
concurrent instances are intentional, opt into automatic isolation:
|
|
106
118
|
|
|
107
119
|
```bash
|
|
108
|
-
NOTEBOOK_PROFILE_STRATEGY=
|
|
120
|
+
NOTEBOOK_PROFILE_STRATEGY=auto npx notebooklm-mcp@latest
|
|
109
121
|
```
|
|
110
122
|
|
|
111
123
|
## Rate limit reached
|
|
112
124
|
|
|
113
|
-
Symptom:
|
|
125
|
+
Symptom: NotebookLM reports a rate or quota limit.
|
|
114
126
|
|
|
115
127
|
Options:
|
|
116
128
|
|
|
@@ -150,7 +162,7 @@ NOTEBOOKLM_FOLLOW_UP_REMINDER=true npx notebooklm-mcp@latest
|
|
|
150
162
|
|
|
151
163
|
## AI marker breaks downstream parsing
|
|
152
164
|
|
|
153
|
-
The default answer text starts with `[AI-GENERATED via
|
|
165
|
+
The default answer text starts with `[AI-GENERATED via Google NotebookLM — …]`. To return to the unprefixed answer, set:
|
|
154
166
|
|
|
155
167
|
```bash
|
|
156
168
|
NOTEBOOKLM_AI_MARKER=false npx notebooklm-mcp@latest
|
package/docs/usage-guide.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Usage Guide
|
|
2
2
|
|
|
3
|
-
Practical end-to-end walkthroughs
|
|
3
|
+
Practical end-to-end walkthroughs for the current 2.x release. Each section is a self-contained recipe with the exact tool calls / curl commands.
|
|
4
4
|
|
|
5
5
|
- [First-time setup](#first-time-setup)
|
|
6
6
|
- [Multi-turn session pattern](#multi-turn-session-pattern)
|
|
@@ -29,13 +29,16 @@ Call `setup_auth`. A Chrome window opens. Log in to the Google account that owns
|
|
|
29
29
|
{ "name": "setup_auth", "arguments": {} }
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Inspect the saved-state backup:
|
|
33
33
|
|
|
34
34
|
```json
|
|
35
35
|
{ "name": "get_health", "arguments": {} }
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Expect `"
|
|
38
|
+
Expect `"auth_state_present": true`. `get_health` deliberately returns
|
|
39
|
+
`"authenticated": null` because only a real NotebookLM navigation can verify
|
|
40
|
+
whether Google still accepts the session. The next NotebookLM operation performs
|
|
41
|
+
that live check and refreshes the saved cookies after the interface loads.
|
|
39
42
|
|
|
40
43
|
### 3. Add a notebook to the local library
|
|
41
44
|
|
|
@@ -180,7 +183,7 @@ Generation can take several minutes — keep `timeout_ms` generous. The default
|
|
|
180
183
|
{
|
|
181
184
|
"name": "download_audio",
|
|
182
185
|
"arguments": {
|
|
183
|
-
"destination_dir": "
|
|
186
|
+
"destination_dir": "."
|
|
184
187
|
}
|
|
185
188
|
}
|
|
186
189
|
```
|
package/package.json
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@charlie.act7/gemini-notebook-mcp",
|
|
3
|
-
"publishConfig": {
|
|
4
|
-
"access": "public"
|
|
5
|
-
},
|
|
6
|
-
"version": "2.1.
|
|
7
|
-
"description": "MCP server for Google Gemini Notebook (formerly NotebookLM) — chat, source ingestion, audio overviews, citations, stdio + Streamable-HTTP transports.",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"bin": {
|
|
10
|
-
"gemini-notebook-mcp": "dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsc",
|
|
14
|
-
"watch": "tsc --watch",
|
|
15
|
-
"dev": "tsx watch src/index.ts",
|
|
16
|
-
"prepare": "npm run build",
|
|
17
|
-
"test": "tsx --test tests/**/*.test.ts",
|
|
18
|
-
"lint": "eslint src",
|
|
19
|
-
"lint:fix": "eslint src --fix",
|
|
20
|
-
"format": "prettier --write src tests scripts",
|
|
21
|
-
"format:check": "prettier --check src tests scripts",
|
|
22
|
-
"mcp:smoke": "node scripts/mcp-client.mjs health",
|
|
23
|
-
"mcp:auth": "node scripts/mcp-client.mjs auth",
|
|
24
|
-
"mcp:ask": "node scripts/mcp-client.mjs ask",
|
|
25
|
-
"mcp:inspect": "node scripts/inspect-live-chat.mjs",
|
|
26
|
-
"mcp:test-live": "node scripts/test-live-chat.mjs",
|
|
27
|
-
"check": "npm run format:check && npm run lint && npm run build && npm test"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"mcp",
|
|
31
|
-
"notebooklm",
|
|
32
|
-
"gemini",
|
|
33
|
-
"gemini-notebook",
|
|
34
|
-
"ai",
|
|
35
|
-
"claude"
|
|
36
|
-
],
|
|
37
|
-
"license": "MIT",
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/CharlieCardenasToledo/gemini-notebook-mcp.git"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://github.com/CharlieCardenasToledo/gemini-notebook-mcp#readme",
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/CharlieCardenasToledo/gemini-notebook-mcp/issues"
|
|
45
|
-
},
|
|
46
|
-
"files": [
|
|
47
|
-
"dist",
|
|
48
|
-
"README.md",
|
|
49
|
-
"LICENSE",
|
|
50
|
-
"docs"
|
|
51
|
-
],
|
|
52
|
-
"dependencies": {
|
|
53
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
54
|
-
"env-paths": "^3.0.0",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"@
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"typescript": "^
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@charlie.act7/gemini-notebook-mcp",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "2.1.3",
|
|
7
|
+
"description": "MCP server for Google Gemini Notebook (formerly NotebookLM) — chat, source ingestion, audio overviews, citations, stdio + Streamable-HTTP transports.",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"bin": {
|
|
10
|
+
"gemini-notebook-mcp": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"watch": "tsc --watch",
|
|
15
|
+
"dev": "tsx watch src/index.ts",
|
|
16
|
+
"prepare": "npm run build",
|
|
17
|
+
"test": "tsx --test tests/**/*.test.ts",
|
|
18
|
+
"lint": "eslint src",
|
|
19
|
+
"lint:fix": "eslint src --fix",
|
|
20
|
+
"format": "prettier --write src tests scripts",
|
|
21
|
+
"format:check": "prettier --check src tests scripts",
|
|
22
|
+
"mcp:smoke": "node scripts/mcp-client.mjs health",
|
|
23
|
+
"mcp:auth": "node scripts/mcp-client.mjs auth",
|
|
24
|
+
"mcp:ask": "node scripts/mcp-client.mjs ask",
|
|
25
|
+
"mcp:inspect": "node scripts/inspect-live-chat.mjs",
|
|
26
|
+
"mcp:test-live": "node scripts/test-live-chat.mjs",
|
|
27
|
+
"check": "npm run format:check && npm run lint && npm run build && npm test"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"mcp",
|
|
31
|
+
"notebooklm",
|
|
32
|
+
"gemini",
|
|
33
|
+
"gemini-notebook",
|
|
34
|
+
"ai",
|
|
35
|
+
"claude"
|
|
36
|
+
],
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/CharlieCardenasToledo/gemini-notebook-mcp.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/CharlieCardenasToledo/gemini-notebook-mcp#readme",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/CharlieCardenasToledo/gemini-notebook-mcp/issues"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"README.md",
|
|
49
|
+
"LICENSE",
|
|
50
|
+
"docs"
|
|
51
|
+
],
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
54
|
+
"env-paths": "^3.0.0",
|
|
55
|
+
"patchright": "^1.48.2",
|
|
56
|
+
"zod": "^3.22.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@types/node": "^22.13.0",
|
|
61
|
+
"eslint": "^10.2.1",
|
|
62
|
+
"prettier": "^3.8.3",
|
|
63
|
+
"tsx": "^4.7.0",
|
|
64
|
+
"typescript": "^5.3.3",
|
|
65
|
+
"typescript-eslint": "^8.59.1"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=22.13.0"
|
|
69
|
+
}
|
|
70
|
+
}
|