@pan-sec/notebooklm-mcp 2026.2.11 โ 2026.3.1
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 +62 -19
- package/SECURITY.md +31 -61
- package/dist/auth/auth-manager.d.ts +2 -1
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +117 -44
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auth/mcp-auth.d.ts +24 -4
- package/dist/auth/mcp-auth.d.ts.map +1 -1
- package/dist/auth/mcp-auth.js +149 -19
- package/dist/auth/mcp-auth.js.map +1 -1
- package/dist/compliance/alert-manager.d.ts.map +1 -1
- package/dist/compliance/alert-manager.js +7 -4
- package/dist/compliance/alert-manager.js.map +1 -1
- package/dist/compliance/breach-detection.d.ts.map +1 -1
- package/dist/compliance/breach-detection.js +14 -7
- package/dist/compliance/breach-detection.js.map +1 -1
- package/dist/compliance/change-log.d.ts.map +1 -1
- package/dist/compliance/change-log.js +7 -4
- package/dist/compliance/change-log.js.map +1 -1
- package/dist/compliance/compliance-logger.d.ts.map +1 -1
- package/dist/compliance/compliance-logger.js +11 -6
- package/dist/compliance/compliance-logger.js.map +1 -1
- package/dist/compliance/consent-manager.d.ts.map +1 -1
- package/dist/compliance/consent-manager.js +5 -3
- package/dist/compliance/consent-manager.js.map +1 -1
- package/dist/compliance/data-erasure.d.ts +1 -1
- package/dist/compliance/data-erasure.d.ts.map +1 -1
- package/dist/compliance/data-erasure.js +142 -83
- package/dist/compliance/data-erasure.js.map +1 -1
- package/dist/compliance/data-export.d.ts.map +1 -1
- package/dist/compliance/data-export.js +23 -12
- package/dist/compliance/data-export.js.map +1 -1
- package/dist/compliance/data-inventory.d.ts.map +1 -1
- package/dist/compliance/data-inventory.js +7 -6
- package/dist/compliance/data-inventory.js.map +1 -1
- package/dist/compliance/dsar-handler.d.ts +7 -1
- package/dist/compliance/dsar-handler.d.ts.map +1 -1
- package/dist/compliance/dsar-handler.js +74 -61
- package/dist/compliance/dsar-handler.js.map +1 -1
- package/dist/compliance/evidence-collector.d.ts.map +1 -1
- package/dist/compliance/evidence-collector.js +10 -6
- package/dist/compliance/evidence-collector.js.map +1 -1
- package/dist/compliance/health-monitor.d.ts.map +1 -1
- package/dist/compliance/health-monitor.js +15 -9
- package/dist/compliance/health-monitor.js.map +1 -1
- package/dist/compliance/incident-manager.d.ts.map +1 -1
- package/dist/compliance/incident-manager.js +5 -3
- package/dist/compliance/incident-manager.js.map +1 -1
- package/dist/compliance/policy-docs.d.ts.map +1 -1
- package/dist/compliance/policy-docs.js +14 -11
- package/dist/compliance/policy-docs.js.map +1 -1
- package/dist/compliance/privacy-notice-text.d.ts.map +1 -1
- package/dist/compliance/privacy-notice-text.js +3 -4
- package/dist/compliance/privacy-notice-text.js.map +1 -1
- package/dist/compliance/privacy-notice.d.ts.map +1 -1
- package/dist/compliance/privacy-notice.js +5 -3
- package/dist/compliance/privacy-notice.js.map +1 -1
- package/dist/compliance/report-generator.d.ts.map +1 -1
- package/dist/compliance/report-generator.js +5 -3
- package/dist/compliance/report-generator.js.map +1 -1
- package/dist/compliance/retention-engine.d.ts.map +1 -1
- package/dist/compliance/retention-engine.js +24 -10
- package/dist/compliance/retention-engine.js.map +1 -1
- package/dist/compliance/siem-exporter.d.ts.map +1 -1
- package/dist/compliance/siem-exporter.js +40 -16
- package/dist/compliance/siem-exporter.js.map +1 -1
- package/dist/config.d.ts +8 -31
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +26 -64
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +22 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +55 -4
- package/dist/errors.js.map +1 -1
- package/dist/gemini/gemini-client.d.ts +1 -0
- package/dist/gemini/gemini-client.d.ts.map +1 -1
- package/dist/gemini/gemini-client.js +50 -49
- package/dist/gemini/gemini-client.js.map +1 -1
- package/dist/gemini/types.d.ts +3 -1
- package/dist/gemini/types.d.ts.map +1 -1
- package/dist/gemini/types.js.map +1 -1
- package/dist/index.d.ts +52 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +412 -89
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +2 -1
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/logging/query-logger.d.ts +13 -1
- package/dist/logging/query-logger.d.ts.map +1 -1
- package/dist/logging/query-logger.js +62 -10
- package/dist/logging/query-logger.js.map +1 -1
- package/dist/notebook-creation/audio-manager.d.ts.map +1 -1
- package/dist/notebook-creation/audio-manager.js +19 -24
- package/dist/notebook-creation/audio-manager.js.map +1 -1
- package/dist/notebook-creation/browser-options.d.ts +28 -0
- package/dist/notebook-creation/browser-options.d.ts.map +1 -0
- package/dist/notebook-creation/browser-options.js +75 -0
- package/dist/notebook-creation/browser-options.js.map +1 -0
- package/dist/notebook-creation/data-table-manager.d.ts.map +1 -1
- package/dist/notebook-creation/data-table-manager.js +20 -21
- package/dist/notebook-creation/data-table-manager.js.map +1 -1
- package/dist/notebook-creation/discover-creation-flow.d.ts +0 -6
- package/dist/notebook-creation/discover-creation-flow.d.ts.map +1 -1
- package/dist/notebook-creation/discover-creation-flow.js +10 -10
- package/dist/notebook-creation/discover-creation-flow.js.map +1 -1
- package/dist/notebook-creation/discover-quota.d.ts +0 -6
- package/dist/notebook-creation/discover-quota.d.ts.map +1 -1
- package/dist/notebook-creation/discover-quota.js +12 -13
- package/dist/notebook-creation/discover-quota.js.map +1 -1
- package/dist/notebook-creation/discover-sources.js +15 -16
- package/dist/notebook-creation/discover-sources.js.map +1 -1
- package/dist/notebook-creation/dom-scripts.d.ts +10 -0
- package/dist/notebook-creation/dom-scripts.d.ts.map +1 -0
- package/dist/notebook-creation/dom-scripts.js +58 -0
- package/dist/notebook-creation/dom-scripts.js.map +1 -0
- package/dist/notebook-creation/errors.d.ts +18 -0
- package/dist/notebook-creation/errors.d.ts.map +1 -0
- package/dist/notebook-creation/errors.js +20 -0
- package/dist/notebook-creation/errors.js.map +1 -0
- package/dist/notebook-creation/index.d.ts +2 -1
- package/dist/notebook-creation/index.d.ts.map +1 -1
- package/dist/notebook-creation/index.js +2 -1
- package/dist/notebook-creation/index.js.map +1 -1
- package/dist/notebook-creation/notebook-creator.d.ts +6 -82
- package/dist/notebook-creation/notebook-creator.d.ts.map +1 -1
- package/dist/notebook-creation/notebook-creator.js +49 -835
- package/dist/notebook-creation/notebook-creator.js.map +1 -1
- package/dist/notebook-creation/notebook-nav.d.ts +19 -0
- package/dist/notebook-creation/notebook-nav.d.ts.map +1 -0
- package/dist/notebook-creation/notebook-nav.js +240 -0
- package/dist/notebook-creation/notebook-nav.js.map +1 -0
- package/dist/notebook-creation/notebook-sync.d.ts.map +1 -1
- package/dist/notebook-creation/notebook-sync.js +36 -38
- package/dist/notebook-creation/notebook-sync.js.map +1 -1
- package/dist/notebook-creation/selector-discovery.d.ts.map +1 -1
- package/dist/notebook-creation/selector-discovery.js +17 -24
- package/dist/notebook-creation/selector-discovery.js.map +1 -1
- package/dist/notebook-creation/selectors.d.ts +23 -37
- package/dist/notebook-creation/selectors.d.ts.map +1 -1
- package/dist/notebook-creation/selectors.js +56 -60
- package/dist/notebook-creation/selectors.js.map +1 -1
- package/dist/notebook-creation/source-manager.d.ts +25 -0
- package/dist/notebook-creation/source-manager.d.ts.map +1 -1
- package/dist/notebook-creation/source-manager.js +689 -50
- package/dist/notebook-creation/source-manager.js.map +1 -1
- package/dist/notebook-creation/types.d.ts +4 -0
- package/dist/notebook-creation/types.d.ts.map +1 -1
- package/dist/notebook-creation/video-manager.d.ts.map +1 -1
- package/dist/notebook-creation/video-manager.js +33 -35
- package/dist/notebook-creation/video-manager.js.map +1 -1
- package/dist/observability/metrics.d.ts +19 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/metrics.js +35 -0
- package/dist/observability/metrics.js.map +1 -0
- package/dist/quota/quota-manager.d.ts +11 -3
- package/dist/quota/quota-manager.d.ts.map +1 -1
- package/dist/quota/quota-manager.js +139 -47
- package/dist/quota/quota-manager.js.map +1 -1
- package/dist/resources/resource-handlers.d.ts.map +1 -1
- package/dist/resources/resource-handlers.js +39 -17
- package/dist/resources/resource-handlers.js.map +1 -1
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +22 -22
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-timeout.d.ts.map +1 -1
- package/dist/session/session-timeout.js +4 -2
- package/dist/session/session-timeout.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +31 -30
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/tools/annotations.d.ts.map +1 -1
- package/dist/tools/annotations.js +9 -56
- package/dist/tools/annotations.js.map +1 -1
- package/dist/tools/definitions/ask-question.d.ts.map +1 -1
- package/dist/tools/definitions/ask-question.js +35 -100
- package/dist/tools/definitions/ask-question.js.map +1 -1
- package/dist/tools/definitions/chat-history.d.ts +47 -1
- package/dist/tools/definitions/chat-history.d.ts.map +1 -1
- package/dist/tools/definitions/chat-history.js +10 -1
- package/dist/tools/definitions/chat-history.js.map +1 -1
- package/dist/tools/definitions/data-tables.d.ts.map +1 -1
- package/dist/tools/definitions/data-tables.js +2 -0
- package/dist/tools/definitions/data-tables.js.map +1 -1
- package/dist/tools/definitions/gemini.d.ts.map +1 -1
- package/dist/tools/definitions/gemini.js +54 -11
- package/dist/tools/definitions/gemini.js.map +1 -1
- package/dist/tools/definitions/notebook-management.d.ts.map +1 -1
- package/dist/tools/definitions/notebook-management.js +100 -70
- package/dist/tools/definitions/notebook-management.js.map +1 -1
- package/dist/tools/definitions/query-history.d.ts +47 -1
- package/dist/tools/definitions/query-history.d.ts.map +1 -1
- package/dist/tools/definitions/query-history.js +7 -0
- package/dist/tools/definitions/query-history.js.map +1 -1
- package/dist/tools/definitions/session-management.d.ts.map +1 -1
- package/dist/tools/definitions/session-management.js +5 -0
- package/dist/tools/definitions/session-management.js.map +1 -1
- package/dist/tools/definitions/system.d.ts.map +1 -1
- package/dist/tools/definitions/system.js +71 -100
- package/dist/tools/definitions/system.js.map +1 -1
- package/dist/tools/definitions/video.d.ts.map +1 -1
- package/dist/tools/definitions/video.js +4 -1
- package/dist/tools/definitions/video.js.map +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +4 -0
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers/ask-question.d.ts +1 -1
- package/dist/tools/handlers/ask-question.d.ts.map +1 -1
- package/dist/tools/handlers/ask-question.js +57 -13
- package/dist/tools/handlers/ask-question.js.map +1 -1
- package/dist/tools/handlers/audio-video.d.ts.map +1 -1
- package/dist/tools/handlers/audio-video.js +22 -161
- package/dist/tools/handlers/audio-video.js.map +1 -1
- package/dist/tools/handlers/auth.d.ts +14 -19
- package/dist/tools/handlers/auth.d.ts.map +1 -1
- package/dist/tools/handlers/auth.js +77 -121
- package/dist/tools/handlers/auth.js.map +1 -1
- package/dist/tools/handlers/error-utils.d.ts +16 -0
- package/dist/tools/handlers/error-utils.d.ts.map +1 -0
- package/dist/tools/handlers/error-utils.js +39 -0
- package/dist/tools/handlers/error-utils.js.map +1 -0
- package/dist/tools/handlers/gemini.d.ts +2 -0
- package/dist/tools/handlers/gemini.d.ts.map +1 -1
- package/dist/tools/handlers/gemini.js +88 -51
- package/dist/tools/handlers/gemini.js.map +1 -1
- package/dist/tools/handlers/index.d.ts +39 -47
- package/dist/tools/handlers/index.d.ts.map +1 -1
- package/dist/tools/handlers/index.js +15 -4
- package/dist/tools/handlers/index.js.map +1 -1
- package/dist/tools/handlers/notebook-creation.d.ts.map +1 -1
- package/dist/tools/handlers/notebook-creation.js +102 -86
- package/dist/tools/handlers/notebook-creation.js.map +1 -1
- package/dist/tools/handlers/notebook-management.d.ts +8 -8
- package/dist/tools/handlers/notebook-management.d.ts.map +1 -1
- package/dist/tools/handlers/notebook-management.js +34 -80
- package/dist/tools/handlers/notebook-management.js.map +1 -1
- package/dist/tools/handlers/session-management.d.ts +8 -10
- package/dist/tools/handlers/session-management.d.ts.map +1 -1
- package/dist/tools/handlers/session-management.js +34 -63
- package/dist/tools/handlers/session-management.js.map +1 -1
- package/dist/tools/handlers/system.d.ts.map +1 -1
- package/dist/tools/handlers/system.js +45 -10
- package/dist/tools/handlers/system.js.map +1 -1
- package/dist/tools/handlers/types.d.ts +1 -1
- package/dist/tools/handlers/types.d.ts.map +1 -1
- package/dist/tools/handlers/webhooks.d.ts.map +1 -1
- package/dist/tools/handlers/webhooks.js +15 -13
- package/dist/tools/handlers/webhooks.js.map +1 -1
- package/dist/types.d.ts +7 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/audit-logger.d.ts +19 -1
- package/dist/utils/audit-logger.d.ts.map +1 -1
- package/dist/utils/audit-logger.js +198 -30
- package/dist/utils/audit-logger.js.map +1 -1
- package/dist/utils/cleanup-manager.d.ts.map +1 -1
- package/dist/utils/cleanup-manager.js +6 -3
- package/dist/utils/cleanup-manager.js.map +1 -1
- package/dist/utils/crypto.d.ts +4 -1
- package/dist/utils/crypto.d.ts.map +1 -1
- package/dist/utils/crypto.js +32 -21
- package/dist/utils/crypto.js.map +1 -1
- package/dist/utils/file-lock.d.ts.map +1 -1
- package/dist/utils/file-lock.js +87 -16
- package/dist/utils/file-lock.js.map +1 -1
- package/dist/utils/file-permissions.d.ts +2 -0
- package/dist/utils/file-permissions.d.ts.map +1 -1
- package/dist/utils/file-permissions.js +2 -1
- package/dist/utils/file-permissions.js.map +1 -1
- package/dist/utils/logger.d.ts +4 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +16 -0
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/page-utils.d.ts +13 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +61 -39
- package/dist/utils/page-utils.js.map +1 -1
- package/dist/utils/response-validator.d.ts.map +1 -1
- package/dist/utils/response-validator.js +27 -22
- package/dist/utils/response-validator.js.map +1 -1
- package/dist/utils/secrets-scanner.d.ts +11 -0
- package/dist/utils/secrets-scanner.d.ts.map +1 -1
- package/dist/utils/secrets-scanner.js +65 -17
- package/dist/utils/secrets-scanner.js.map +1 -1
- package/dist/utils/secure-memory.d.ts +9 -31
- package/dist/utils/secure-memory.d.ts.map +1 -1
- package/dist/utils/secure-memory.js +17 -102
- package/dist/utils/secure-memory.js.map +1 -1
- package/dist/utils/security.d.ts +4 -3
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +43 -13
- package/dist/utils/security.js.map +1 -1
- package/dist/utils/stealth-utils.d.ts.map +1 -1
- package/dist/utils/stealth-utils.js +4 -4
- package/dist/utils/stealth-utils.js.map +1 -1
- package/dist/webhooks/types.d.ts +4 -0
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/webhooks/webhook-dispatcher.d.ts +80 -12
- package/dist/webhooks/webhook-dispatcher.d.ts.map +1 -1
- package/dist/webhooks/webhook-dispatcher.js +497 -74
- package/dist/webhooks/webhook-dispatcher.js.map +1 -1
- package/docs/archive/ISSUES-legacy-2026-04-24.md +644 -0
- package/docs/dependency-risk.md +25 -0
- package/docs/testing-runbook.md +166 -0
- package/docs/usage-guide.md +2 -1
- package/package.json +34 -16
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Dependency Risk Notes
|
|
2
|
+
|
|
3
|
+
## Patchright
|
|
4
|
+
|
|
5
|
+
This project uses `patchright` for browser automation because NotebookLM flows
|
|
6
|
+
depend on Playwright-compatible browser control with stealth-oriented behavior.
|
|
7
|
+
Treat it as a higher-risk dependency than ordinary runtime libraries:
|
|
8
|
+
|
|
9
|
+
- It is a Playwright fork, so upstream security fixes may not land at the same
|
|
10
|
+
time as Playwright releases.
|
|
11
|
+
- Browser automation packages can run install scripts that fetch browser
|
|
12
|
+
binaries or drivers.
|
|
13
|
+
- Keep it exact-pinned in `package.json` and review updates manually.
|
|
14
|
+
- CI installs dependencies with `npm ci --ignore-scripts`; browser binaries
|
|
15
|
+
should be provisioned explicitly in controlled environments.
|
|
16
|
+
- Production deployments should run the MCP server in a least-privilege
|
|
17
|
+
container or sandbox with a dedicated browser profile directory and no access
|
|
18
|
+
to unrelated host files.
|
|
19
|
+
|
|
20
|
+
When upgrading `patchright`, verify:
|
|
21
|
+
|
|
22
|
+
1. The package tarball integrity in `package-lock.json` changes only as expected.
|
|
23
|
+
2. Notebook creation, source upload, auth setup, and session reuse tests pass.
|
|
24
|
+
3. Any browser installation step is run explicitly, not via automatic package
|
|
25
|
+
lifecycle scripts in CI.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Authenticated Testing Runbook
|
|
2
|
+
|
|
3
|
+
This runbook is the baseline sequence for future NotebookLM MCP testing in a real authenticated browser session.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Use a visible Chrome session to capture valid NotebookLM auth, verify the local repo is healthy, and run a minimal smoke test flow before broader manual or agent-driven testing.
|
|
8
|
+
|
|
9
|
+
## 1. Local Repo Preflight
|
|
10
|
+
|
|
11
|
+
Run these from the repo root:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx tsc --noEmit
|
|
15
|
+
npx vitest run
|
|
16
|
+
npx stryker run --dryRunOnly
|
|
17
|
+
npm audit --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Expected result:
|
|
21
|
+
- TypeScript passes
|
|
22
|
+
- Vitest passes
|
|
23
|
+
- Stryker dry-run passes
|
|
24
|
+
- `npm audit` reports 0 vulnerabilities
|
|
25
|
+
|
|
26
|
+
## 2. Start Visible Chrome Auth
|
|
27
|
+
|
|
28
|
+
Use the standalone auth flow from the repo root:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node auth-now.mjs
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
What it does:
|
|
35
|
+
- Opens visible Chrome using the persistent NotebookLM profile
|
|
36
|
+
- Waits for manual Google login
|
|
37
|
+
- Saves encrypted browser state to the local auth store
|
|
38
|
+
|
|
39
|
+
Expected success signal in the terminal:
|
|
40
|
+
- `NotebookLM detected`
|
|
41
|
+
- `Saved encrypted state.json.pqenc`
|
|
42
|
+
- `Auth complete`
|
|
43
|
+
|
|
44
|
+
Expected saved file on Linux:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
~/.local/share/notebooklm-mcp/browser_state/state.json.pqenc
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 3. Verify Auth Artifact
|
|
51
|
+
|
|
52
|
+
Confirm the encrypted state file exists and is freshly updated:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
stat ~/.local/share/notebooklm-mcp/browser_state/state.json.pqenc
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Expected result:
|
|
59
|
+
- File exists
|
|
60
|
+
- Permissions are `0600`
|
|
61
|
+
- Modify time matches the recent auth session
|
|
62
|
+
|
|
63
|
+
## 4. MCP Health Check
|
|
64
|
+
|
|
65
|
+
After auth is saved, verify the MCP server can use it.
|
|
66
|
+
|
|
67
|
+
Important:
|
|
68
|
+
- Browser auth and MCP auth are separate.
|
|
69
|
+
- If you are testing through a direct stdio harness instead of your normal MCP client, you must also provide a valid `NLMCP_AUTH_TOKEN`.
|
|
70
|
+
- For ad hoc local smoke tests, prefer a temporary in-process token over rotating the persisted token.
|
|
71
|
+
|
|
72
|
+
Recommended prompt:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
Run get_health with deep_check enabled and report auth status, chat_ui_accessible, and any warnings.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Expected result:
|
|
79
|
+
- `authenticated: true`
|
|
80
|
+
- `chat_ui_accessible: true`
|
|
81
|
+
|
|
82
|
+
If this fails, do not continue to notebook smoke tests until auth is repaired.
|
|
83
|
+
|
|
84
|
+
## 5. Notebook Smoke Test Sequence
|
|
85
|
+
|
|
86
|
+
Run this exact sequence in the MCP client:
|
|
87
|
+
|
|
88
|
+
1. `get_health(deep_check=true)`
|
|
89
|
+
2. `list_notebooks`
|
|
90
|
+
3. `select_notebook` on a known safe test notebook
|
|
91
|
+
4. `ask_question` with a low-risk prompt such as:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
Summarize the main topics covered in this notebook in 3 bullets.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
5. `get_quota(sync=true)` if quota behavior matters for the session
|
|
98
|
+
|
|
99
|
+
Success criteria:
|
|
100
|
+
- Notebook list loads
|
|
101
|
+
- Notebook selection succeeds
|
|
102
|
+
- `ask_question` returns a grounded answer
|
|
103
|
+
- No auth-expired or browser-closed errors occur
|
|
104
|
+
|
|
105
|
+
For direct test harnesses:
|
|
106
|
+
- Inject a temporary `NLMCP_AUTH_TOKEN` into the server process
|
|
107
|
+
- Pass the same token in MCP request metadata
|
|
108
|
+
- Do not rotate the saved token unless you actually need to replace your client configuration
|
|
109
|
+
|
|
110
|
+
## 6. Optional Creation Flow Test
|
|
111
|
+
|
|
112
|
+
Only run this when creation is in scope for the session:
|
|
113
|
+
|
|
114
|
+
1. `create_notebook` with a disposable test name
|
|
115
|
+
2. `add_source` or `add_folder` with a safe local fixture
|
|
116
|
+
3. `list_sources`
|
|
117
|
+
4. Optional: `generate_audio_overview`, `generate_video_overview`, or `generate_data_table`
|
|
118
|
+
|
|
119
|
+
Cleanup:
|
|
120
|
+
- Remove disposable test notebooks or clearly label them as temporary
|
|
121
|
+
|
|
122
|
+
## 7. Recovery Paths
|
|
123
|
+
|
|
124
|
+
If auth is stale or broken:
|
|
125
|
+
|
|
126
|
+
1. Close all Chrome/Chromium windows
|
|
127
|
+
2. Re-run visible auth:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
node auth-now.mjs
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If persistent profile/session issues remain:
|
|
134
|
+
|
|
135
|
+
1. Close all Chrome/Chromium windows
|
|
136
|
+
2. Preview cleanup with library preservation
|
|
137
|
+
3. Confirm cleanup
|
|
138
|
+
4. Re-run auth
|
|
139
|
+
5. Re-run `get_health(deep_check=true)`
|
|
140
|
+
|
|
141
|
+
Recommended agent prompt:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
Repair NotebookLM auth without deleting my library, then verify with get_health deep_check.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 8. Session Notes Template
|
|
148
|
+
|
|
149
|
+
Record these for each authenticated test pass:
|
|
150
|
+
|
|
151
|
+
- Date:
|
|
152
|
+
- Branch/commit:
|
|
153
|
+
- Auth method: `node auth-now.mjs`
|
|
154
|
+
- Auth artifact updated: yes/no
|
|
155
|
+
- `get_health(deep_check=true)`: pass/fail
|
|
156
|
+
- Notebook smoke test: pass/fail
|
|
157
|
+
- Creation flow test: pass/fail/not run
|
|
158
|
+
- Quota check: pass/fail/not run
|
|
159
|
+
- Issues found:
|
|
160
|
+
|
|
161
|
+
## Notes
|
|
162
|
+
|
|
163
|
+
- Prefer visible auth for all interactive login work.
|
|
164
|
+
- Do not use headless auth flows.
|
|
165
|
+
- `cleanup_data` is a recovery tool, not a default auth step.
|
|
166
|
+
- Keep at least one safe disposable notebook available for smoke testing.
|
package/docs/usage-guide.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
This guide covers advanced usage patterns, best practices, and detailed examples for the NotebookLM MCP server.
|
|
4
4
|
|
|
5
5
|
> ๐ For installation and quick start, see the main [README](../README.md).
|
|
6
|
+
> ๐งช For repeatable authenticated validation, use the [Authenticated Testing Runbook](./testing-runbook.md).
|
|
6
7
|
|
|
7
8
|
## Research Patterns
|
|
8
9
|
|
|
@@ -242,4 +243,4 @@ Agent: "According to our architecture guidelines..."
|
|
|
242
243
|
|
|
243
244
|
---
|
|
244
245
|
|
|
245
|
-
Remember: The power of this integration lies in letting your agent **ask multiple questions** โ gathering context and building comprehensive understanding before responding. Don't rush the research phase!
|
|
246
|
+
Remember: The power of this integration lies in letting your agent **ask multiple questions** โ gathering context and building comprehensive understanding before responding. Don't rush the research phase!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pan-sec/notebooklm-mcp",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.3.1",
|
|
4
4
|
"mcpName": "io.github.Pantheon-Security/notebooklm-mcp-secure",
|
|
5
5
|
"description": "Security-hardened MCP server for NotebookLM API with compliance-ready architecture (GDPR, SOC2, CSSF controls implemented)",
|
|
6
6
|
"type": "module",
|
|
@@ -13,10 +13,16 @@
|
|
|
13
13
|
"watch": "tsc --watch",
|
|
14
14
|
"dev": "tsx watch src/index.ts",
|
|
15
15
|
"prepare": "npm run build",
|
|
16
|
+
"ci:install": "npm ci --ignore-scripts",
|
|
16
17
|
"test": "npx vitest run",
|
|
18
|
+
"test:integration": "npx vitest run tests/mcp-server.integration.test.ts",
|
|
19
|
+
"test:property": "npx vitest run tests/property-based.test.ts",
|
|
20
|
+
"test:mutation": "npx stryker run --dryRunOnly",
|
|
17
21
|
"test:watch": "npx vitest",
|
|
22
|
+
"test:coverage": "npx vitest run --coverage",
|
|
18
23
|
"security-check": "npm audit",
|
|
19
|
-
"security-scan": "medusa scan . --fail-on high"
|
|
24
|
+
"security-scan": "medusa scan . --fail-on high",
|
|
25
|
+
"discover-selectors": "npx tsx scripts/run-discovery.ts"
|
|
20
26
|
},
|
|
21
27
|
"keywords": [
|
|
22
28
|
"mcp",
|
|
@@ -55,20 +61,33 @@
|
|
|
55
61
|
"docs"
|
|
56
62
|
],
|
|
57
63
|
"dependencies": {
|
|
58
|
-
"@google/genai": "
|
|
59
|
-
"@modelcontextprotocol/sdk": "
|
|
60
|
-
"@noble/post-quantum": "
|
|
61
|
-
"dotenv": "
|
|
62
|
-
"env-paths": "
|
|
63
|
-
"globby": "
|
|
64
|
-
"patchright": "
|
|
65
|
-
"pdf-lib": "
|
|
66
|
-
|
|
64
|
+
"@google/genai": "1.41.0",
|
|
65
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
66
|
+
"@noble/post-quantum": "0.5.4",
|
|
67
|
+
"dotenv": "17.2.3",
|
|
68
|
+
"env-paths": "4.0.0",
|
|
69
|
+
"globby": "16.1.0",
|
|
70
|
+
"patchright": "1.57.0",
|
|
71
|
+
"pdf-lib": "1.17.1"
|
|
72
|
+
},
|
|
73
|
+
"overrides": {
|
|
74
|
+
"@google/genai": {
|
|
75
|
+
"protobufjs": "7.5.5"
|
|
76
|
+
},
|
|
77
|
+
"glob": {
|
|
78
|
+
"minimatch": "9.0.7"
|
|
79
|
+
},
|
|
80
|
+
"micromatch": {
|
|
81
|
+
"picomatch": "2.3.2"
|
|
82
|
+
}
|
|
67
83
|
},
|
|
68
84
|
"devDependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"
|
|
71
|
-
"
|
|
85
|
+
"@stryker-mutator/core": "9.6.1",
|
|
86
|
+
"@types/node": "20.19.30",
|
|
87
|
+
"@vitest/coverage-v8": "4.1.4",
|
|
88
|
+
"fast-check": "4.7.0",
|
|
89
|
+
"tsx": "4.21.0",
|
|
90
|
+
"typescript": "5.3.3"
|
|
72
91
|
},
|
|
73
92
|
"engines": {
|
|
74
93
|
"node": ">=18.0.0"
|
|
@@ -85,8 +104,7 @@
|
|
|
85
104
|
"responseValidation": true,
|
|
86
105
|
"postQuantumEncryption": true,
|
|
87
106
|
"secretsScanning": true,
|
|
88
|
-
"
|
|
89
|
-
"memoryScubbing": true,
|
|
107
|
+
"memoryScrubbing": true,
|
|
90
108
|
"medusaIntegration": true,
|
|
91
109
|
"secureByDefaultAuth": true,
|
|
92
110
|
"exponentialBackoffLockout": true,
|