@roomi-fields/notebooklm-mcp 1.3.6 → 1.5.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/LICENSE +22 -22
- package/README.md +71 -34
- package/deployment/INDEX.md +292 -0
- package/deployment/PACKAGE-FILES.txt +180 -0
- package/deployment/QUICK-START.md +100 -0
- package/deployment/docs/01-INSTALL.md +611 -0
- package/deployment/docs/02-CONFIGURATION.md +404 -0
- package/deployment/docs/03-API.md +1691 -0
- package/deployment/docs/04-N8N-INTEGRATION.md +373 -0
- package/deployment/docs/05-TROUBLESHOOTING.md +429 -0
- package/deployment/docs/06-NOTEBOOK-LIBRARY.md +692 -0
- package/deployment/docs/07-AUTO-DISCOVERY.md +236 -0
- package/deployment/docs/08-WSL-USAGE.md +363 -0
- package/deployment/docs/09-MULTI-INTERFACE.md +293 -0
- package/deployment/docs/10-CONTENT-MANAGEMENT.md +421 -0
- package/deployment/docs/11-MULTI-ACCOUNT.md +295 -0
- package/deployment/docs/README.md +207 -0
- package/deployment/scripts/README.md +564 -0
- package/deployment/scripts/install.ps1 +114 -0
- package/deployment/scripts/setup-auth.ps1 +217 -0
- package/deployment/scripts/start-server.ps1 +72 -0
- package/deployment/scripts/stop-server.ps1 +51 -0
- package/deployment/scripts/test-api.ps1 +651 -0
- package/deployment/scripts/test-auth.ps1 +323 -0
- package/deployment/scripts/test-auto-discovery.ps1 +295 -0
- package/deployment/scripts/test-cors.ps1 +398 -0
- package/deployment/scripts/test-errors.ps1 +581 -0
- package/deployment/scripts/test-server.ps1 +140 -0
- package/deployment/scripts/test-sessions.ps1 +426 -0
- package/deployment/scripts/test-validation.ps1 +299 -0
- package/dist/accounts/account-manager.d.ts +163 -0
- package/dist/accounts/account-manager.d.ts.map +1 -0
- package/dist/accounts/account-manager.js +614 -0
- package/dist/accounts/account-manager.js.map +1 -0
- package/dist/accounts/auto-login-manager.d.ts +62 -0
- package/dist/accounts/auto-login-manager.d.ts.map +1 -0
- package/dist/accounts/auto-login-manager.js +537 -0
- package/dist/accounts/auto-login-manager.js.map +1 -0
- package/dist/accounts/crypto.d.ts +45 -0
- package/dist/accounts/crypto.d.ts.map +1 -0
- package/dist/accounts/crypto.js +138 -0
- package/dist/accounts/crypto.js.map +1 -0
- package/dist/accounts/index.d.ts +14 -0
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/accounts/index.js +14 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/types.d.ts +103 -0
- package/dist/accounts/types.d.ts.map +1 -0
- package/dist/accounts/types.js +7 -0
- package/dist/accounts/types.js.map +1 -0
- package/dist/auth/auth-manager.d.ts +9 -2
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +60 -6
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
- package/dist/auto-discovery/auto-discovery.js +2 -1
- package/dist/auto-discovery/auto-discovery.js.map +1 -1
- package/dist/cli/accounts.d.ts +13 -0
- package/dist/cli/accounts.d.ts.map +1 -0
- package/dist/cli/accounts.js +195 -0
- package/dist/cli/accounts.js.map +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-generator.d.ts +153 -0
- package/dist/content/content-generator.d.ts.map +1 -0
- package/dist/content/content-generator.js +637 -0
- package/dist/content/content-generator.js.map +1 -0
- package/dist/content/content-manager.d.ts +364 -0
- package/dist/content/content-manager.d.ts.map +1 -0
- package/dist/content/content-manager.js +3841 -0
- package/dist/content/content-manager.js.map +1 -0
- package/dist/content/content-templates.d.ts +183 -0
- package/dist/content/content-templates.d.ts.map +1 -0
- package/dist/content/content-templates.js +719 -0
- package/dist/content/content-templates.js.map +1 -0
- package/dist/content/index.d.ts +14 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +14 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/types.d.ts +285 -0
- package/dist/content/types.d.ts.map +1 -0
- package/dist/content/types.js +10 -0
- package/dist/content/types.js.map +1 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http-wrapper.d.ts +7 -0
- package/dist/http-wrapper.d.ts.map +1 -1
- package/dist/http-wrapper.js +449 -29
- package/dist/http-wrapper.js.map +1 -1
- package/dist/i18n/en.json +120 -0
- package/dist/i18n/fr.json +120 -0
- package/dist/i18n/index.d.ts +168 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +213 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts +4 -0
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +20 -3
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/session/browser-session.d.ts +35 -8
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +243 -28
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +6 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +46 -14
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts +3 -3
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +10 -7
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/stdio-http-proxy.d.ts +24 -0
- package/dist/stdio-http-proxy.d.ts.map +1 -0
- package/dist/stdio-http-proxy.js +592 -0
- package/dist/stdio-http-proxy.js.map +1 -0
- package/dist/tools/index.d.ts +106 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1028 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +81 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/citation-extractor.d.ts +66 -0
- package/dist/utils/citation-extractor.d.ts.map +1 -0
- package/dist/utils/citation-extractor.js +492 -0
- package/dist/utils/citation-extractor.js.map +1 -0
- package/dist/utils/page-utils.d.ts +8 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +112 -8
- package/dist/utils/page-utils.js.map +1 -1
- package/docs/ADDING_A_LANGUAGE.md +209 -0
- package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
- package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
- package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
- package/package.json +15 -12
- package/scripts/archive/add-and-activate-notebook.ps1 +31 -0
- package/scripts/archive/add-new-notebook.ps1 +25 -0
- package/scripts/archive/add-rom1pey.ps1 +2 -0
- package/scripts/archive/add-rpmonster.ps1 +2 -0
- package/scripts/archive/add-source-debug.ps1 +11 -0
- package/scripts/archive/add-source-e2e.ps1 +28 -0
- package/scripts/archive/add-source-visible.ps1 +11 -0
- package/scripts/archive/add-test-notebook.ps1 +13 -0
- package/scripts/archive/add-test-source.ps1 +50 -0
- package/scripts/archive/capture-screen.ps1 +11 -0
- package/scripts/archive/change-language.mjs +45 -0
- package/scripts/archive/change-language.ts +44 -0
- package/scripts/archive/check-account.ps1 +19 -0
- package/scripts/archive/check-notebook-2.ps1 +8 -0
- package/scripts/archive/check-test-notebook.ps1 +11 -0
- package/scripts/archive/create-notebook-auto.ps1 +31 -0
- package/scripts/archive/create-notebook.ps1 +8 -0
- package/scripts/archive/create-rom1pey-notebook.ps1 +19 -0
- package/scripts/archive/create-rom1pey.ps1 +8 -0
- package/scripts/archive/create-test-notebook-fresh.ps1 +21 -0
- package/scripts/archive/create-test-notebook.ps1 +16 -0
- package/scripts/archive/debug-add-source-auto.ps1 +29 -0
- package/scripts/archive/debug-add-source.ps1 +19 -0
- package/scripts/archive/debug-add-text-source.ps1 +47 -0
- package/scripts/archive/debug-home.ps1 +10 -0
- package/scripts/archive/debug-selectors.ps1 +55 -0
- package/scripts/archive/debug-sources-panel.ps1 +22 -0
- package/scripts/archive/debug-ui.ps1 +17 -0
- package/scripts/archive/discover-home.ps1 +26 -0
- package/scripts/archive/kill-automation-chrome.ps1 +37 -0
- package/scripts/archive/list-my-notebooks.ps1 +27 -0
- package/scripts/archive/navigate-home-visible.ps1 +23 -0
- package/scripts/archive/navigate-home.ps1 +15 -0
- package/scripts/archive/run-e2e-english.ps1 +111 -0
- package/scripts/archive/run-e2e-rom1pey-v2.ps1 +122 -0
- package/scripts/archive/run-e2e-rom1pey.ps1 +117 -0
- package/scripts/archive/setup-english-test.ps1 +36 -0
- package/scripts/archive/setup-test-notebook.ps1 +71 -0
- package/scripts/archive/simple-add-source.ps1 +14 -0
- package/scripts/archive/t10.ps1 +2 -0
- package/scripts/archive/t20.ps1 +4 -0
- package/scripts/archive/t30.ps1 +9 -0
- package/scripts/archive/t31.ps1 +11 -0
- package/scripts/archive/t32.ps1 +6 -0
- package/scripts/archive/t39.ps1 +5 -0
- package/scripts/archive/t40.ps1 +5 -0
- package/scripts/archive/t53.ps1 +12 -0
- package/scripts/archive/t54.ps1 +12 -0
- package/scripts/archive/t55.ps1 +11 -0
- package/scripts/archive/t9.ps1 +1 -0
- package/scripts/archive/test-access.ps1 +28 -0
- package/scripts/archive/test-add-delete-source.ps1 +64 -0
- package/scripts/archive/test-add-source-visible.ps1 +16 -0
- package/scripts/archive/test-add-source.ps1 +19 -0
- package/scripts/archive/test-add-text-debug.ps1 +28 -0
- package/scripts/archive/test-add-text-source.ps1 +8 -0
- package/scripts/archive/test-add-url-source.ps1 +7 -0
- package/scripts/archive/test-ask-ascii.ps1 +20 -0
- package/scripts/archive/test-ask-cnv.ps1 +20 -0
- package/scripts/archive/test-ask-headed.ps1 +51 -0
- package/scripts/archive/test-ask-ifs.ps1 +16 -0
- package/scripts/archive/test-ask-now.ps1 +24 -0
- package/scripts/archive/test-ask-real.ps1 +19 -0
- package/scripts/archive/test-ask-visible.ps1 +20 -0
- package/scripts/archive/test-create-notebook.ps1 +8 -0
- package/scripts/archive/test-create-then-add.ps1 +17 -0
- package/scripts/archive/test-delete-source.ps1 +41 -0
- package/scripts/archive/test-e2e-notebook.ps1 +21 -0
- package/scripts/archive/test-english-notebook.ps1 +20 -0
- package/scripts/archive/test-english.ps1 +7 -0
- package/scripts/archive/test-full-custom-instructions.ps1 +40 -0
- package/scripts/archive/test-full-infographic.ps1 +34 -0
- package/scripts/archive/test-full-language.ps1 +21 -0
- package/scripts/archive/test-full-presentation.ps1 +85 -0
- package/scripts/archive/test-full-report.ps1 +34 -0
- package/scripts/archive/test-full-source-selection.ps1 +35 -0
- package/scripts/archive/test-full-video-brief.ps1 +22 -0
- package/scripts/archive/test-full-video-explainer.ps1 +22 -0
- package/scripts/archive/test-full-video-styles.ps1 +37 -0
- package/scripts/archive/test-generate-report.ps1 +15 -0
- package/scripts/archive/test-generate-study-guide.ps1 +11 -0
- package/scripts/archive/test-headed-ask.ps1 +13 -0
- package/scripts/archive/test-headed-now.ps1 +9 -0
- package/scripts/archive/test-headed.ps1 +9 -0
- package/scripts/archive/test-hello.ps1 +7 -0
- package/scripts/archive/test-i18n-studio.ps1 +8 -0
- package/scripts/archive/test-i18n.ps1 +7 -0
- package/scripts/archive/test-manual-headed.ps1 +26 -0
- package/scripts/archive/test-mathieu-quota.ps1 +8 -0
- package/scripts/archive/test-notebook-1.ps1 +10 -0
- package/scripts/archive/test-notebook-2-sources.ps1 +12 -0
- package/scripts/archive/test-notebook1.ps1 +14 -0
- package/scripts/archive/test-personal-notebook.ps1 +14 -0
- package/scripts/archive/test-rate-limit.ps1 +19 -0
- package/scripts/archive/test-real-ask.ps1 +50 -0
- package/scripts/archive/test-real-ask2.ps1 +30 -0
- package/scripts/archive/test-rom1pey.ps1 +7 -0
- package/scripts/archive/test-rotation-complete.ps1 +14 -0
- package/scripts/archive/test-rotation.ps1 +8 -0
- package/scripts/archive/test-show-browser.ps1 +39 -0
- package/scripts/archive/test-update-notebook.ps1 +4 -0
- package/scripts/archive/verify-language-slow.ps1 +21 -0
- package/scripts/archive/verify-language.ps1 +15 -0
- package/scripts/check-server.ps1 +46 -0
- package/scripts/mcp-wsl-helper.sh +146 -0
- package/scripts/start-server.ps1 +94 -0
- package/scripts/stop-server.ps1 +30 -0
- package/scripts/switch-account-language.sh +191 -0
- package/scripts/test-account.ps1 +58 -0
- package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
- package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
- package/dist/__tests__/cleanup-manager.test.js +0 -341
- package/dist/__tests__/cleanup-manager.test.js.map +0 -1
- package/dist/__tests__/config-parsing.test.d.ts +0 -2
- package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
- package/dist/__tests__/config-parsing.test.js +0 -338
- package/dist/__tests__/config-parsing.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -267
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -166
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/logger.test.d.ts +0 -2
- package/dist/__tests__/logger.test.d.ts.map +0 -1
- package/dist/__tests__/logger.test.js +0 -324
- package/dist/__tests__/logger.test.js.map +0 -1
- package/dist/__tests__/page-utils.test.d.ts +0 -2
- package/dist/__tests__/page-utils.test.d.ts.map +0 -1
- package/dist/__tests__/page-utils.test.js +0 -349
- package/dist/__tests__/page-utils.test.js.map +0 -1
- package/dist/__tests__/setup-verification.test.d.ts +0 -2
- package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
- package/dist/__tests__/setup-verification.test.js +0 -15
- package/dist/__tests__/setup-verification.test.js.map +0 -1
- package/dist/__tests__/stealth-utils.test.d.ts +0 -2
- package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
- package/dist/__tests__/stealth-utils.test.js +0 -413
- package/dist/__tests__/stealth-utils.test.js.map +0 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -461
- package/dist/__tests__/types.test.js.map +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# Multi-Account Management
|
|
2
|
+
|
|
3
|
+
The NotebookLM MCP server supports multiple Google accounts with automatic rotation when rate limits are hit.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
NotebookLM has a **50 queries per day limit** per Google account (free tier). With multi-account support, the server can automatically switch to another account when the limit is reached, giving you up to **150 queries/day** with 3 accounts.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
13
|
+
│ Account Manager │
|
|
14
|
+
├─────────────────────────────────────────────────────────────┤
|
|
15
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
16
|
+
│ │ Account 1 │ │ Account 2 │ │ Account 3 │ │
|
|
17
|
+
│ │ (Primary) │ │ (Secondary) │ │ (Tertiary) │ │
|
|
18
|
+
│ │ 50/day │ │ 50/day │ │ 50/day │ │
|
|
19
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
20
|
+
│ │
|
|
21
|
+
│ Rotation Strategy: least_used | round_robin | failover │
|
|
22
|
+
└─────────────────────────────────────────────────────────────┘
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Configuration
|
|
26
|
+
|
|
27
|
+
### Account Directory Structure
|
|
28
|
+
|
|
29
|
+
Each account has its own directory under `DATA_DIR/accounts/`:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
DATA_DIR/
|
|
33
|
+
├── accounts/
|
|
34
|
+
│ ├── account-{timestamp1}/
|
|
35
|
+
│ │ ├── config.json # Account configuration
|
|
36
|
+
│ │ ├── quota.json # Usage tracking
|
|
37
|
+
│ │ ├── state.json # Account state
|
|
38
|
+
│ │ ├── browser_state/
|
|
39
|
+
│ │ │ └── state.json # Playwright storage state
|
|
40
|
+
│ │ └── profile/ # Chrome profile directory
|
|
41
|
+
│ │
|
|
42
|
+
│ ├── account-{timestamp2}/
|
|
43
|
+
│ │ └── ...
|
|
44
|
+
│ │
|
|
45
|
+
│ └── config.json # Global accounts config
|
|
46
|
+
│
|
|
47
|
+
├── browser_state/
|
|
48
|
+
│ └── state.json # Active account's state
|
|
49
|
+
│
|
|
50
|
+
└── chrome_profile/ # Active account's Chrome profile
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Account Config File
|
|
54
|
+
|
|
55
|
+
`accounts/account-{id}/config.json`:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"id": "account-1766565732376",
|
|
60
|
+
"email": "user@gmail.com",
|
|
61
|
+
"enabled": true,
|
|
62
|
+
"priority": 1,
|
|
63
|
+
"totp_secret": "BASE32SECRET..." // Optional for 2FA
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Quota Tracking
|
|
68
|
+
|
|
69
|
+
`accounts/account-{id}/quota.json`:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"used": 15,
|
|
74
|
+
"limit": 50,
|
|
75
|
+
"resetAt": "2025-12-31T00:00:00.000Z",
|
|
76
|
+
"lastUpdated": "2025-12-30T10:00:00.000Z"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Global Config
|
|
81
|
+
|
|
82
|
+
`accounts/config.json`:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"rotationStrategy": "least_used",
|
|
87
|
+
"autoRotateOnRateLimit": true,
|
|
88
|
+
"maxConsecutiveFailures": 3
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Rotation Strategies
|
|
93
|
+
|
|
94
|
+
### `least_used` (Default)
|
|
95
|
+
|
|
96
|
+
Selects the account with the most remaining quota. Best for maximizing throughput.
|
|
97
|
+
|
|
98
|
+
### `round_robin`
|
|
99
|
+
|
|
100
|
+
Cycles through accounts in order. Best for even distribution.
|
|
101
|
+
|
|
102
|
+
### `failover`
|
|
103
|
+
|
|
104
|
+
Uses accounts in priority order. Only switches when current account fails.
|
|
105
|
+
|
|
106
|
+
## Rate Limit Detection
|
|
107
|
+
|
|
108
|
+
The server detects rate limits via:
|
|
109
|
+
|
|
110
|
+
1. **Response text**: "Le système n'a pas pu répondre" (general error)
|
|
111
|
+
2. **Input field**: "Vous avez atteint la limite quotidienne de discussions"
|
|
112
|
+
3. **Page body**: Rate limit keywords in French/English
|
|
113
|
+
|
|
114
|
+
### Detection Keywords
|
|
115
|
+
|
|
116
|
+
French:
|
|
117
|
+
|
|
118
|
+
- "limite quotidienne de discussions"
|
|
119
|
+
- "atteint la limite quotidienne"
|
|
120
|
+
- "vous avez atteint la limite"
|
|
121
|
+
- "revenez plus tard"
|
|
122
|
+
|
|
123
|
+
English:
|
|
124
|
+
|
|
125
|
+
- "daily limit reached"
|
|
126
|
+
- "rate limit exceeded"
|
|
127
|
+
- "quota exhausted"
|
|
128
|
+
- "too many requests"
|
|
129
|
+
|
|
130
|
+
## Automatic Rotation Flow
|
|
131
|
+
|
|
132
|
+
When a rate limit is detected:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
1. Rate limit detected
|
|
136
|
+
↓
|
|
137
|
+
2. Mark current account as quota exhausted
|
|
138
|
+
↓
|
|
139
|
+
3. Close browser sessions (releases profile lock)
|
|
140
|
+
↓
|
|
141
|
+
4. Wait 2 seconds for Chrome to release files
|
|
142
|
+
↓
|
|
143
|
+
5. Select next available account (based on strategy)
|
|
144
|
+
↓
|
|
145
|
+
6. Sync new account's profile to main profile:
|
|
146
|
+
- Copy state.json → browser_state/
|
|
147
|
+
- Copy profile/ → chrome_profile/
|
|
148
|
+
↓
|
|
149
|
+
7. Retry the request with new account
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Adding a New Account
|
|
153
|
+
|
|
154
|
+
### Via CLI
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
npm run accounts add
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Follow the interactive prompts to:
|
|
161
|
+
|
|
162
|
+
1. Enter email address
|
|
163
|
+
2. Enter password
|
|
164
|
+
3. Optionally enter TOTP secret for 2FA
|
|
165
|
+
|
|
166
|
+
### Manually
|
|
167
|
+
|
|
168
|
+
1. Create account directory:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
mkdir -p DATA_DIR/accounts/account-$(date +%s)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
2. Create `config.json`:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"id": "account-...",
|
|
179
|
+
"email": "newaccount@gmail.com",
|
|
180
|
+
"enabled": true,
|
|
181
|
+
"priority": 2
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
3. Run auto-login to authenticate:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
npm run accounts test account-... -- --show
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
4. Sync to main profile if this should be the active account.
|
|
192
|
+
|
|
193
|
+
## CLI Commands
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# List all accounts
|
|
197
|
+
npm run accounts list
|
|
198
|
+
|
|
199
|
+
# Add new account
|
|
200
|
+
npm run accounts add
|
|
201
|
+
|
|
202
|
+
# Test account authentication
|
|
203
|
+
npm run accounts test <account-id> -- --show
|
|
204
|
+
|
|
205
|
+
# Remove account
|
|
206
|
+
npm run accounts remove <account-id>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Troubleshooting
|
|
210
|
+
|
|
211
|
+
### All Accounts Exhausted
|
|
212
|
+
|
|
213
|
+
If all accounts hit their daily limit:
|
|
214
|
+
|
|
215
|
+
1. **Wait** until midnight UTC for quotas to reset
|
|
216
|
+
2. **Manually reset** quotas for testing:
|
|
217
|
+
```bash
|
|
218
|
+
echo '{"used": 0, "limit": 50, ...}' > accounts/account-xxx/quota.json
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Account Won't Switch
|
|
222
|
+
|
|
223
|
+
Check if:
|
|
224
|
+
|
|
225
|
+
1. Profile lock is released (close all Chrome instances)
|
|
226
|
+
2. Account has quota remaining
|
|
227
|
+
3. Account is enabled in config.json
|
|
228
|
+
4. Account hasn't exceeded failure threshold
|
|
229
|
+
|
|
230
|
+
### Authentication Expired
|
|
231
|
+
|
|
232
|
+
Re-authenticate the account:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
npm run accounts test <account-id> -- --show
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Then sync to main profile if needed.
|
|
239
|
+
|
|
240
|
+
## API Integration
|
|
241
|
+
|
|
242
|
+
The `/ask` endpoint automatically handles account rotation. No changes needed to API calls.
|
|
243
|
+
|
|
244
|
+
If rotation fails, the response includes:
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"success": false,
|
|
249
|
+
"error": "NotebookLM rate limit reached... Automatic account rotation failed..."
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Language Switching
|
|
254
|
+
|
|
255
|
+
Each account may have a different Google Account language setting. The server uses UI selectors that must match the NotebookLM language.
|
|
256
|
+
|
|
257
|
+
### Automated Language Switch
|
|
258
|
+
|
|
259
|
+
Use the provided script to switch an account's language:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
./scripts/switch-account-language.sh --account=mathieu --lang=fr --show
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**What it does:**
|
|
266
|
+
|
|
267
|
+
1. Stops the server and Chrome
|
|
268
|
+
2. Deletes the Chrome profile cache for the account
|
|
269
|
+
3. Re-authenticates (opens browser for login)
|
|
270
|
+
4. Syncs the new profile to main
|
|
271
|
+
5. Restarts server with the correct `NOTEBOOKLM_UI_LOCALE`
|
|
272
|
+
|
|
273
|
+
**Important:** The Google Account's language setting must match. Change it at:
|
|
274
|
+
https://myaccount.google.com/language
|
|
275
|
+
|
|
276
|
+
### Environment Variable
|
|
277
|
+
|
|
278
|
+
Set the UI locale when starting the server:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
NOTEBOOKLM_UI_LOCALE=en node dist/http-wrapper.js
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
See [Adding a Language](../../docs/ADDING_A_LANGUAGE.md) for details on the i18n system.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Best Practices
|
|
289
|
+
|
|
290
|
+
1. **Use 3+ accounts** for production workloads
|
|
291
|
+
2. **Enable TOTP** for unattended authentication
|
|
292
|
+
3. **Monitor quotas** via logs or quota.json files
|
|
293
|
+
4. **Stagger usage** across accounts to avoid hitting limits simultaneously
|
|
294
|
+
5. **Test rotation** before deploying to production
|
|
295
|
+
6. **Match UI locale** with each account's Google language setting
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# NotebookLM MCP HTTP Server Documentation
|
|
2
|
+
|
|
3
|
+
> Complete documentation for the NotebookLM HTTP server
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚀 Quick Start
|
|
8
|
+
|
|
9
|
+
**New to the project?** Start with the installation guide:
|
|
10
|
+
|
|
11
|
+
👉 [**01-INSTALL.md**](./01-INSTALL.md) — Complete installation from scratch (Windows)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📚 Complete Documentation
|
|
16
|
+
|
|
17
|
+
| Document | Description | For whom? |
|
|
18
|
+
| ------------------------------------------------------ | ------------------------------------------- | ----------------------- |
|
|
19
|
+
| [**01-INSTALL.md**](./01-INSTALL.md) | Complete installation guide from scratch | First installation |
|
|
20
|
+
| [**02-CONFIGURATION.md**](./02-CONFIGURATION.md) | Environment variables, security, deployment | Advanced configuration |
|
|
21
|
+
| [**03-API.md**](./03-API.md) | Complete REST API reference | Developers, integration |
|
|
22
|
+
| [**04-N8N-INTEGRATION.md**](./04-N8N-INTEGRATION.md) | Integration guide with n8n | n8n users |
|
|
23
|
+
| [**05-TROUBLESHOOTING.md**](./05-TROUBLESHOOTING.md) | Solutions to common problems | Debugging, errors |
|
|
24
|
+
| [**06-NOTEBOOK-LIBRARY.md**](./06-NOTEBOOK-LIBRARY.md) | Multi-notebook library management | Notebook management |
|
|
25
|
+
| [**07-AUTO-DISCOVERY.md**](./07-AUTO-DISCOVERY.md) | Autonomous resource discovery pattern | Auto-discovery feature |
|
|
26
|
+
| [**11-MULTI-ACCOUNT.md**](./11-MULTI-ACCOUNT.md) | Multi-account management and rotation | Rate limit handling |
|
|
27
|
+
| [**Test Scripts**](../scripts/README.md) | PowerShell validation scripts | Testing, CI/CD |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🎯 Guides by Use Case
|
|
32
|
+
|
|
33
|
+
### I'm getting started
|
|
34
|
+
|
|
35
|
+
1. [Installation](./01-INSTALL.md) — Install Node.js, compile, authenticate
|
|
36
|
+
2. [Notebook configuration](./06-NOTEBOOK-LIBRARY.md#-guide-de-d%C3%A9marrage) — Add your first notebook
|
|
37
|
+
3. [Testing](./01-INSTALL.md#-v%C3%A9rification) — Verify everything works
|
|
38
|
+
|
|
39
|
+
### I'm integrating with n8n
|
|
40
|
+
|
|
41
|
+
1. [Installation](./01-INSTALL.md)
|
|
42
|
+
2. [Network configuration](./02-CONFIGURATION.md#-s%C3%A9curit%C3%A9)
|
|
43
|
+
3. [n8n integration](./04-N8N-INTEGRATION.md)
|
|
44
|
+
|
|
45
|
+
### I have a problem
|
|
46
|
+
|
|
47
|
+
1. [Troubleshooting](./05-TROUBLESHOOTING.md) — Common problems and solutions
|
|
48
|
+
2. [Configuration](./02-CONFIGURATION.md#-troubleshooting-configuration) — Configuration issues
|
|
49
|
+
|
|
50
|
+
### I want to manage multiple notebooks
|
|
51
|
+
|
|
52
|
+
1. [Notebook library](./06-NOTEBOOK-LIBRARY.md) — Complete guide
|
|
53
|
+
2. [Notebooks API](./03-API.md#5-add-notebook) — Management endpoints
|
|
54
|
+
|
|
55
|
+
### I want to test my installation
|
|
56
|
+
|
|
57
|
+
1. [Test scripts](../scripts/README.md) — Automated tests
|
|
58
|
+
2. [Quick test](../scripts/README.md#-test-serverps1) — Validation in 30 seconds
|
|
59
|
+
3. [Complete tests](../scripts/README.md#-test-apips1) — Full suite (10 tests)
|
|
60
|
+
|
|
61
|
+
### I'm hitting rate limits
|
|
62
|
+
|
|
63
|
+
1. [Multi-account setup](./11-MULTI-ACCOUNT.md) — Configure multiple accounts
|
|
64
|
+
2. [Automatic rotation](./11-MULTI-ACCOUNT.md#automatic-rotation-flow) — How rotation works
|
|
65
|
+
3. [Quota management](./11-MULTI-ACCOUNT.md#troubleshooting) — Reset and monitor quotas
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 📖 Quick Reference
|
|
70
|
+
|
|
71
|
+
### Main Endpoints
|
|
72
|
+
|
|
73
|
+
| Endpoint | Method | Description |
|
|
74
|
+
| -------------------------- | ------ | ------------------------------------- |
|
|
75
|
+
| `/health` | GET | Check server status |
|
|
76
|
+
| `/ask` | POST | Ask a question to NotebookLM |
|
|
77
|
+
| `/notebooks` | GET | List notebooks |
|
|
78
|
+
| `/notebooks` | POST | Add a notebook (with validation) |
|
|
79
|
+
| `/notebooks/auto-discover` | POST | Auto-generate notebook metadata |
|
|
80
|
+
| `/notebooks/:id` | DELETE | Delete a notebook |
|
|
81
|
+
| `/notebooks/:id/activate` | PUT | Activate a notebook |
|
|
82
|
+
| `/content/sources` | POST | Add source to notebook |
|
|
83
|
+
| `/content/generate` | POST | Generate content (audio, video, etc.) |
|
|
84
|
+
| `/content/download` | GET | Download/export generated content |
|
|
85
|
+
|
|
86
|
+
**👉 [Complete API reference](./03-API.md)**
|
|
87
|
+
|
|
88
|
+
### Useful Scripts
|
|
89
|
+
|
|
90
|
+
| Command | Description |
|
|
91
|
+
| -------------------------------------- | ---------------------------------------- |
|
|
92
|
+
| `npm run build` | Compile TypeScript |
|
|
93
|
+
| `npm run start:http` | Start HTTP server (foreground) |
|
|
94
|
+
| `npm run daemon:start` | Start server in background (daemon mode) |
|
|
95
|
+
| `npm run daemon:stop` | Stop background server |
|
|
96
|
+
| `npm run daemon:logs` | View background server logs |
|
|
97
|
+
| `npm run daemon:status` | Check daemon status |
|
|
98
|
+
| `npm run dev:http` | Development mode (auto-reload) |
|
|
99
|
+
| `npm run setup-auth` | Configure Google authentication |
|
|
100
|
+
| `.\deployment\scripts\setup-auth.ps1` | PowerShell authentication script |
|
|
101
|
+
| `.\deployment\scripts\test-server.ps1` | Quick tests (3 tests, 30s) |
|
|
102
|
+
| `.\deployment\scripts\test-api.ps1` | Complete tests (10 tests, 5-10min) |
|
|
103
|
+
| `.\deployment\scripts\test-errors.ps1` | Error case tests (12 tests) |
|
|
104
|
+
|
|
105
|
+
### Important Files
|
|
106
|
+
|
|
107
|
+
| File | Location | Description |
|
|
108
|
+
| -------------- | ------------------------------------------------------------ | -------------------- |
|
|
109
|
+
| `state.json` | `%LOCALAPPDATA%\notebooklm-mcp\Data\browser_state\` | Authentication state |
|
|
110
|
+
| `Cookies` | `%LOCALAPPDATA%\notebooklm-mcp\Data\chrome_profile\Default\` | Google cookies |
|
|
111
|
+
| `library.json` | `%LOCALAPPDATA%\notebooklm-mcp\Data\` | Notebook library |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 🆘 Need Help?
|
|
116
|
+
|
|
117
|
+
### Common Problems
|
|
118
|
+
|
|
119
|
+
**Server won't start**
|
|
120
|
+
→ [Troubleshooting - EADDRINUSE](./05-TROUBLESHOOTING.md#probl%C3%A8me-eaddrinuse-address-already-in-use)
|
|
121
|
+
|
|
122
|
+
**Authentication fails**
|
|
123
|
+
→ [Troubleshooting - Authentication](./05-TROUBLESHOOTING.md#probl%C3%A8me-authentication-failed)
|
|
124
|
+
|
|
125
|
+
**Invalid notebook**
|
|
126
|
+
→ [Notebook Library - Validation](./06-NOTEBOOK-LIBRARY.md#-validations-automatiques)
|
|
127
|
+
|
|
128
|
+
**n8n cannot connect**
|
|
129
|
+
→ [Configuration - Firewall](./02-CONFIGURATION.md#2-firewall-windows)
|
|
130
|
+
|
|
131
|
+
### External Documentation
|
|
132
|
+
|
|
133
|
+
- [NotebookLM](https://notebooklm.google.com) — Official Google service
|
|
134
|
+
- [n8n](https://n8n.io) — Automation platform
|
|
135
|
+
- [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) — Stealth browser automation
|
|
136
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/) — MCP specification
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Changelog
|
|
141
|
+
|
|
142
|
+
### v1.4.2 (2025-12-29)
|
|
143
|
+
|
|
144
|
+
**Removed fake content generation:**
|
|
145
|
+
|
|
146
|
+
- Removed `generate_content` endpoint for FAQ, Study Guide, Briefing Doc, Timeline, TOC
|
|
147
|
+
- These were NOT real NotebookLM features - just chat prompts
|
|
148
|
+
- Only REAL content generation: Audio Overview (podcast)
|
|
149
|
+
- Updated all documentation for honesty
|
|
150
|
+
|
|
151
|
+
### v1.4.0 (2025-12-24)
|
|
152
|
+
|
|
153
|
+
**Content Management:**
|
|
154
|
+
|
|
155
|
+
- Audio Overview generation (podcast) - REAL NotebookLM feature
|
|
156
|
+
- Audio download
|
|
157
|
+
- Source management (files, URLs, text, YouTube)
|
|
158
|
+
|
|
159
|
+
### v1.3.1 (2025-01-24)
|
|
160
|
+
|
|
161
|
+
**New features:**
|
|
162
|
+
|
|
163
|
+
- MCP Auto-Discovery Tool: `auto_discover_notebook` for Claude Desktop/Cursor
|
|
164
|
+
- Parity with HTTP API: MCP clients now have auto-discovery capability
|
|
165
|
+
- Zero-friction notebook addition: just URL, metadata auto-generated
|
|
166
|
+
|
|
167
|
+
**Critical Fixes:**
|
|
168
|
+
|
|
169
|
+
- Claude Desktop compatibility: Disabled `CompleteRequestSchema` handler
|
|
170
|
+
- Fixed "Server does not support completions" error on connection
|
|
171
|
+
|
|
172
|
+
### v1.1.2 (2025-11-22)
|
|
173
|
+
|
|
174
|
+
**New features:**
|
|
175
|
+
|
|
176
|
+
- ✅ Multi-notebook library system
|
|
177
|
+
- ✅ Live validation of notebooks when adding
|
|
178
|
+
- ✅ Protection against duplicate names
|
|
179
|
+
- ✅ DELETE and PUT endpoints for notebooks
|
|
180
|
+
- ✅ Detailed and contextualized error messages
|
|
181
|
+
|
|
182
|
+
**Fixes:**
|
|
183
|
+
|
|
184
|
+
- ✅ Fixed Cookies path (Default/Network/Cookies)
|
|
185
|
+
- ✅ Cookies threshold lowered to 10KB
|
|
186
|
+
- ✅ Better temporary session management
|
|
187
|
+
|
|
188
|
+
**Documentation:**
|
|
189
|
+
|
|
190
|
+
- ✅ New guide [06-NOTEBOOK-LIBRARY.md](./06-NOTEBOOK-LIBRARY.md)
|
|
191
|
+
- ✅ "Notebook Configuration" section in [01-INSTALL.md](./01-INSTALL.md)
|
|
192
|
+
- ✅ Enhanced API in [03-API.md](./03-API.md)
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 📝 Contributing
|
|
197
|
+
|
|
198
|
+
Found an error in the documentation? An unclear section?
|
|
199
|
+
|
|
200
|
+
**Open an issue:** [GitHub Issues](https://github.com/roomi-fields/notebooklm-mcp/issues)
|
|
201
|
+
|
|
202
|
+
Or directly propose a PR to improve the documentation!
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
**Documentation updated:** 2025-12-29
|
|
207
|
+
**Version:** 1.4.2
|