@roomi-fields/notebooklm-mcp 1.5.0 → 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 +2 -0
- 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/cli/accounts.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-manager.d.ts.map +1 -1
- package/dist/content/content-manager.js +113 -118
- package/dist/content/content-manager.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/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +1 -0
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +2 -0
- package/dist/session/shared-context-manager.js.map +1 -1
- package/docs/ADDING_A_LANGUAGE.md +209 -0
- package/package.json +6 -3
- 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
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
# Installation Guide - NotebookLM MCP HTTP Server
|
|
2
|
+
|
|
3
|
+
> Complete installation from scratch on Windows 10/11
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📋 Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [Prerequisites](#-prerequisites)
|
|
10
|
+
2. [Node.js Installation](#-nodejs-installation)
|
|
11
|
+
3. [Project Cloning](#-project-cloning)
|
|
12
|
+
4. [Dependencies Installation](#-dependencies-installation)
|
|
13
|
+
5. [Compilation](#-compilation)
|
|
14
|
+
6. [Authentication Configuration](#-authentication-configuration)
|
|
15
|
+
7. [Notebooks Configuration](#-notebooks-configuration)
|
|
16
|
+
8. [Verification](#-verification)
|
|
17
|
+
9. [Startup](#-startup)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 📌 Prerequisites
|
|
22
|
+
|
|
23
|
+
Before starting, you need:
|
|
24
|
+
|
|
25
|
+
### Hardware
|
|
26
|
+
|
|
27
|
+
- **RAM:** 2 GB minimum (4 GB recommended)
|
|
28
|
+
- **Disk:** 500 MB free space
|
|
29
|
+
- **Network:** Stable Internet connection
|
|
30
|
+
|
|
31
|
+
### Software
|
|
32
|
+
|
|
33
|
+
- **Windows 10/11** (64-bit)
|
|
34
|
+
- **PowerShell 5.1+** (included in Windows)
|
|
35
|
+
- **Browser:** Chrome installed (Playwright will use it)
|
|
36
|
+
|
|
37
|
+
### Accounts
|
|
38
|
+
|
|
39
|
+
- **Google Account** with access to https://notebooklm.google.com
|
|
40
|
+
- At least **1 NotebookLM notebook** already created
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 📥 Node.js Installation
|
|
45
|
+
|
|
46
|
+
### Check if Node.js is already installed
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
node --version
|
|
50
|
+
npm --version
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If you see version numbers (e.g., `v20.9.0` and `10.1.0`), Node.js is installed. ✅
|
|
54
|
+
If not, continue below. ⬇️
|
|
55
|
+
|
|
56
|
+
### Download Node.js
|
|
57
|
+
|
|
58
|
+
1. Go to https://nodejs.org/
|
|
59
|
+
2. Download the **LTS** (Long Term Support) version for Windows
|
|
60
|
+
3. Run the `.msi` installer
|
|
61
|
+
4. Follow the installation wizard:
|
|
62
|
+
- ✅ Accept the license
|
|
63
|
+
- ✅ Standard installation (default path: `C:\Program Files\nodejs\`)
|
|
64
|
+
- ✅ Check "Automatically install the necessary tools" if offered
|
|
65
|
+
|
|
66
|
+
5. Restart PowerShell and verify:
|
|
67
|
+
|
|
68
|
+
```powershell
|
|
69
|
+
node --version # Should display: v20.x.x or higher
|
|
70
|
+
npm --version # Should display: 10.x.x or higher
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 📂 Project Cloning
|
|
76
|
+
|
|
77
|
+
### Method 1: With Git
|
|
78
|
+
|
|
79
|
+
```powershell
|
|
80
|
+
# Install Git if not already done: https://git-scm.com/download/win
|
|
81
|
+
|
|
82
|
+
# Clone the repository
|
|
83
|
+
cd D:\
|
|
84
|
+
git clone https://github.com/PleasePrompto/notebooklm-mcp.git notebooklm-http
|
|
85
|
+
cd notebooklm-http
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Method 2: ZIP Download
|
|
89
|
+
|
|
90
|
+
1. Download the ZIP from GitHub
|
|
91
|
+
2. Extract to `D:\notebooklm-http\`
|
|
92
|
+
3. Open PowerShell in this folder
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 📦 Dependencies Installation
|
|
97
|
+
|
|
98
|
+
```powershell
|
|
99
|
+
# Make sure you're in the right directory
|
|
100
|
+
cd D:\notebooklm-http
|
|
101
|
+
|
|
102
|
+
# Install all npm dependencies
|
|
103
|
+
npm install
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**What gets installed:**
|
|
107
|
+
|
|
108
|
+
- `express` - HTTP server
|
|
109
|
+
- `patchright` - Stealth Playwright to automate Chrome
|
|
110
|
+
- `@anthropic-ai/sdk` - MCP SDK
|
|
111
|
+
- And ~50 other necessary packages
|
|
112
|
+
|
|
113
|
+
**Duration:** 2-5 minutes depending on your Internet connection
|
|
114
|
+
|
|
115
|
+
**Expected result:**
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
added 150 packages in 3m
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 🔨 Compilation
|
|
124
|
+
|
|
125
|
+
The project is written in TypeScript and must be compiled to JavaScript:
|
|
126
|
+
|
|
127
|
+
```powershell
|
|
128
|
+
npm run build
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Expected result:**
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
> notebooklm-mcp@1.1.2 build
|
|
135
|
+
> tsc
|
|
136
|
+
|
|
137
|
+
> notebooklm-mcp@1.1.2 postbuild
|
|
138
|
+
> chmod +x dist/index.js
|
|
139
|
+
|
|
140
|
+
✓ Compilation successful
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Verification:**
|
|
144
|
+
|
|
145
|
+
```powershell
|
|
146
|
+
ls dist\http-wrapper.js
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
If the file exists, compilation is OK! ✅
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 🔐 Authentication Configuration
|
|
154
|
+
|
|
155
|
+
**IMPORTANT:** This step is done **ONLY ONCE**.
|
|
156
|
+
Authentication will be saved and valid for ~399 days.
|
|
157
|
+
|
|
158
|
+
### PowerShell Script (Recommended)
|
|
159
|
+
|
|
160
|
+
**Note:** The path depends on your current directory.
|
|
161
|
+
|
|
162
|
+
**If you're at the project root:**
|
|
163
|
+
|
|
164
|
+
```powershell
|
|
165
|
+
.\deployment\scripts\setup-auth.ps1
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**If you're in the deployment folder:**
|
|
169
|
+
|
|
170
|
+
```powershell
|
|
171
|
+
.\scripts\setup-auth.ps1
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Or use npm (works everywhere):**
|
|
175
|
+
|
|
176
|
+
```powershell
|
|
177
|
+
npm run setup-auth
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**What will happen:**
|
|
181
|
+
|
|
182
|
+
1. The script checks if authentication already exists
|
|
183
|
+
- If yes: asks for confirmation to reset
|
|
184
|
+
- If no: continues directly
|
|
185
|
+
|
|
186
|
+
2. Chrome opens (visible window)
|
|
187
|
+
|
|
188
|
+
3. **Actions to do in Chrome:**
|
|
189
|
+
- Sign in to your Google account
|
|
190
|
+
- Go to https://notebooklm.google.com
|
|
191
|
+
- Wait for the page to load completely
|
|
192
|
+
- You should see your notebooks
|
|
193
|
+
- **Close Chrome** (click the red X)
|
|
194
|
+
|
|
195
|
+
4. The script verifies that files are correctly created
|
|
196
|
+
|
|
197
|
+
**Expected result:**
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
✅ Authentication configured successfully!
|
|
201
|
+
💡 Google session valid for ~399 days
|
|
202
|
+
|
|
203
|
+
Files created:
|
|
204
|
+
✅ state.json created (X KB)
|
|
205
|
+
✅ Cookies created (XXX KB)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### 📁 Authentication Files Location
|
|
209
|
+
|
|
210
|
+
**IMPORTANT:** Authentication files are NOT stored in the project directory, but in the Windows user directory:
|
|
211
|
+
|
|
212
|
+
**Full path:**
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
C:\Users\<YOUR_NAME>\AppData\Local\notebooklm-mcp\Data\
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**File structure:**
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
C:\Users\<YOUR_NAME>\AppData\Local\notebooklm-mcp\Data\
|
|
222
|
+
├── chrome_profile\ ← Complete Chrome profile (Google cookies)
|
|
223
|
+
│ └── Default\
|
|
224
|
+
│ └── Cookies ← Cookies file (must be >10KB)
|
|
225
|
+
│
|
|
226
|
+
├── browser_state\
|
|
227
|
+
│ └── state.json ← Authentication state (16 critical cookies)
|
|
228
|
+
│
|
|
229
|
+
└── library.json ← Library of configured notebooks
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**To verify on your PC:**
|
|
233
|
+
|
|
234
|
+
```powershell
|
|
235
|
+
# Display the path
|
|
236
|
+
echo $env:LOCALAPPDATA\notebooklm-mcp\Data
|
|
237
|
+
|
|
238
|
+
# List files
|
|
239
|
+
dir $env:LOCALAPPDATA\notebooklm-mcp\Data
|
|
240
|
+
dir $env:LOCALAPPDATA\notebooklm-mcp\Data\chrome_profile\Default\Cookies
|
|
241
|
+
dir $env:LOCALAPPDATA\notebooklm-mcp\Data\browser_state\state.json
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Expected files:**
|
|
245
|
+
|
|
246
|
+
- `Cookies` - SQLite database (>10 KB) - **Contains your Google cookies**
|
|
247
|
+
- `state.json` - JSON file with 16 critical cookies - **Valid for 399 days**
|
|
248
|
+
- `library.json` - Library of your NotebookLM notebooks (created automatically)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 📚 Notebooks Configuration
|
|
253
|
+
|
|
254
|
+
Once authentication is configured, you must add at least one notebook to your library.
|
|
255
|
+
|
|
256
|
+
### Option 1: Via HTTP API (Recommended)
|
|
257
|
+
|
|
258
|
+
**Prerequisite:** Start the HTTP server first
|
|
259
|
+
|
|
260
|
+
```powershell
|
|
261
|
+
# In a first terminal
|
|
262
|
+
npm run start:http
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**In a second PowerShell terminal:**
|
|
266
|
+
|
|
267
|
+
```powershell
|
|
268
|
+
# Prepare notebook data
|
|
269
|
+
$body = @{
|
|
270
|
+
url = "https://notebooklm.google.com/notebook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
271
|
+
name = "My Notebook"
|
|
272
|
+
description = "A sample notebook"
|
|
273
|
+
topics = @("topic1", "topic2", "topic3")
|
|
274
|
+
} | ConvertTo-Json
|
|
275
|
+
|
|
276
|
+
# Add the notebook (automatic validation)
|
|
277
|
+
Invoke-RestMethod -Uri "http://localhost:3000/notebooks" `
|
|
278
|
+
-Method Post `
|
|
279
|
+
-Body $body `
|
|
280
|
+
-ContentType "application/json"
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**⏱️ Note:** Adding takes 15-30 seconds because the server validates that the notebook actually exists.
|
|
284
|
+
|
|
285
|
+
**Automatic validations:**
|
|
286
|
+
|
|
287
|
+
- ✅ NotebookLM URL format
|
|
288
|
+
- ✅ Notebook actually accessible (live check)
|
|
289
|
+
- ✅ No duplicate name
|
|
290
|
+
- ✅ Valid Google session
|
|
291
|
+
|
|
292
|
+
**How to get a notebook URL:**
|
|
293
|
+
|
|
294
|
+
1. Go to https://notebooklm.google.com
|
|
295
|
+
2. Open your notebook
|
|
296
|
+
3. Copy the URL from the address bar
|
|
297
|
+
|
|
298
|
+
Expected format: `https://notebooklm.google.com/notebook/[id]`
|
|
299
|
+
|
|
300
|
+
### Option 2: Manual Modification (Advanced)
|
|
301
|
+
|
|
302
|
+
Edit `library.json` directly:
|
|
303
|
+
|
|
304
|
+
```powershell
|
|
305
|
+
# Open the file
|
|
306
|
+
code "$env:LOCALAPPDATA\notebooklm-mcp\Data\library.json"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**⚠️ Warning:** This method bypasses automatic validations.
|
|
310
|
+
|
|
311
|
+
**Example structure:**
|
|
312
|
+
|
|
313
|
+
```json
|
|
314
|
+
{
|
|
315
|
+
"notebooks": [
|
|
316
|
+
{
|
|
317
|
+
"id": "my-notebook",
|
|
318
|
+
"url": "https://notebooklm.google.com/notebook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
319
|
+
"name": "My Notebook",
|
|
320
|
+
"description": "A sample notebook",
|
|
321
|
+
"topics": ["topic1", "topic2", "topic3"],
|
|
322
|
+
"content_types": ["documentation", "examples"],
|
|
323
|
+
"use_cases": ["Learning about the topic"],
|
|
324
|
+
"added_at": "2025-11-22T08:49:16.735Z",
|
|
325
|
+
"last_used": "2025-11-22T08:49:16.735Z",
|
|
326
|
+
"use_count": 0,
|
|
327
|
+
"tags": []
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"active_notebook_id": "my-notebook",
|
|
331
|
+
"last_modified": "2025-11-22T08:49:16.735Z",
|
|
332
|
+
"version": "1.0.0"
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Restart the server after manual modification.**
|
|
337
|
+
|
|
338
|
+
### Verify Configuration
|
|
339
|
+
|
|
340
|
+
```powershell
|
|
341
|
+
# List configured notebooks
|
|
342
|
+
Invoke-RestMethod -Uri "http://localhost:3000/notebooks"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Expected result:**
|
|
346
|
+
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"success": true,
|
|
350
|
+
"data": {
|
|
351
|
+
"notebooks": [
|
|
352
|
+
{
|
|
353
|
+
"id": "my-notebook",
|
|
354
|
+
"name": "My Notebook",
|
|
355
|
+
"url": "https://notebooklm.google.com/notebook/xxx",
|
|
356
|
+
"active": true
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"count": 1
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**📖 For more details on notebook management, see [06-NOTEBOOK-LIBRARY.md](./06-NOTEBOOK-LIBRARY.md)**
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
### ⚠️ AUTHENTICATION FILES SECURITY
|
|
369
|
+
|
|
370
|
+
- These files contain your **authenticated Google cookies**
|
|
371
|
+
- **NEVER** share these files
|
|
372
|
+
- **NEVER** commit them to Git (already protected by .gitignore)
|
|
373
|
+
- To reset auth: delete the `Data\` folder and run `npm run setup-auth` again
|
|
374
|
+
|
|
375
|
+
If all files are present and not empty, authentication is configured! ✅
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## ✅ Verification
|
|
380
|
+
|
|
381
|
+
Before starting the server, let's verify that everything is OK:
|
|
382
|
+
|
|
383
|
+
### Complete Checklist
|
|
384
|
+
|
|
385
|
+
```powershell
|
|
386
|
+
# 1. Node.js installed
|
|
387
|
+
node --version
|
|
388
|
+
# ✅ Should display v20.x.x or higher
|
|
389
|
+
|
|
390
|
+
# 2. Dependencies installed
|
|
391
|
+
ls node_modules\express
|
|
392
|
+
# ✅ The folder must exist
|
|
393
|
+
|
|
394
|
+
# 3. Code compiled
|
|
395
|
+
ls dist\http-wrapper.js
|
|
396
|
+
# ✅ The file must exist
|
|
397
|
+
|
|
398
|
+
# 4. Authentication configured
|
|
399
|
+
ls Data\chrome_profile\Default\Cookies
|
|
400
|
+
ls Data\browser_state\state.json
|
|
401
|
+
# ✅ Both files must exist and not be empty
|
|
402
|
+
|
|
403
|
+
# 5. Port 3000 free
|
|
404
|
+
netstat -ano | findstr :3000
|
|
405
|
+
# ✅ No result = port free
|
|
406
|
+
# ❌ A result = port occupied (see TROUBLESHOOTING.md)
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
If all checks are ✅, you're ready! 🎉
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## ▶️ Startup
|
|
414
|
+
|
|
415
|
+
### Method 1: Foreground Mode (Development)
|
|
416
|
+
|
|
417
|
+
```powershell
|
|
418
|
+
npm run start:http
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Expected result:**
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
✅ [14:30:15] 🌐 HTTP Wrapper listening on 0.0.0.0:3000
|
|
425
|
+
ℹ️ [14:30:15] Health check: http://localhost:3000/health
|
|
426
|
+
ℹ️ [14:30:15] Ask question: POST http://localhost:3000/ask
|
|
427
|
+
ℹ️ [14:30:15] List notebooks: GET http://localhost:3000/notebooks
|
|
428
|
+
|
|
429
|
+
ℹ️ [14:30:15] 📖 API Documentation:
|
|
430
|
+
ℹ️ [14:30:15] POST /ask - Ask a question to NotebookLM
|
|
431
|
+
ℹ️ [14:30:15] GET /health - Check server health
|
|
432
|
+
ℹ️ [14:30:15] GET /notebooks - List all notebooks
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
**The server is started!** 🚀
|
|
436
|
+
|
|
437
|
+
⚠️ **Note:** The terminal must stay open. Press `Ctrl+C` to stop.
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
### Method 2: Background Daemon Mode (Production) ⭐
|
|
442
|
+
|
|
443
|
+
**For production use, run the server in background without keeping the terminal open:**
|
|
444
|
+
|
|
445
|
+
```powershell
|
|
446
|
+
# Start server in background
|
|
447
|
+
npm run daemon:start
|
|
448
|
+
|
|
449
|
+
# Check status
|
|
450
|
+
npm run daemon:status
|
|
451
|
+
|
|
452
|
+
# View logs in real-time
|
|
453
|
+
npm run daemon:logs
|
|
454
|
+
|
|
455
|
+
# Stop server
|
|
456
|
+
npm run daemon:stop
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Expected result:**
|
|
460
|
+
|
|
461
|
+
```
|
|
462
|
+
[PM2] App [notebooklm-mcp] launched (1 instances)
|
|
463
|
+
┌────┬────────────────┬──────┬─────────┬────────┐
|
|
464
|
+
│ id │ name │ mode │ status │ uptime │
|
|
465
|
+
├────┼────────────────┼──────┼─────────┼────────┤
|
|
466
|
+
│ 0 │ notebooklm-mcp │ fork │ online │ 0s │
|
|
467
|
+
└────┴────────────────┴──────┴─────────┴────────┘
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Advantages of daemon mode:**
|
|
471
|
+
|
|
472
|
+
- ✅ Runs in background (no terminal window)
|
|
473
|
+
- ✅ Auto-restart on crash
|
|
474
|
+
- ✅ Logs saved to `logs/pm2-*.log`
|
|
475
|
+
- ✅ Survives terminal close
|
|
476
|
+
|
|
477
|
+
**Daemon management commands:**
|
|
478
|
+
|
|
479
|
+
```powershell
|
|
480
|
+
npm run daemon:start # Start server
|
|
481
|
+
npm run daemon:stop # Stop server
|
|
482
|
+
npm run daemon:restart # Restart server
|
|
483
|
+
npm run daemon:logs # View logs (Ctrl+C to exit)
|
|
484
|
+
npm run daemon:status # Check status
|
|
485
|
+
npm run daemon:delete # Remove from PM2 list
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### Health Test
|
|
489
|
+
|
|
490
|
+
Open a **new PowerShell terminal** and test:
|
|
491
|
+
|
|
492
|
+
```powershell
|
|
493
|
+
curl http://localhost:3000/health
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Expected response:**
|
|
497
|
+
|
|
498
|
+
```json
|
|
499
|
+
{
|
|
500
|
+
"success": true,
|
|
501
|
+
"data": {
|
|
502
|
+
"authenticated": true,
|
|
503
|
+
"sessions": 0,
|
|
504
|
+
"library_notebooks": 1,
|
|
505
|
+
"context_age_hours": 0.0
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
If `"authenticated": true`, everything works! ✅
|
|
511
|
+
|
|
512
|
+
### Complete Test with Question
|
|
513
|
+
|
|
514
|
+
```powershell
|
|
515
|
+
curl -X POST http://localhost:3000/ask `
|
|
516
|
+
-H "Content-Type: application/json" `
|
|
517
|
+
-d '{"question":"What is the main topic?","notebook_id":"my-notebook"}'
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
**Wait 30-60 seconds** (NotebookLM generation time).
|
|
521
|
+
|
|
522
|
+
**Expected response:**
|
|
523
|
+
|
|
524
|
+
```json
|
|
525
|
+
{
|
|
526
|
+
"success": true,
|
|
527
|
+
"data": {
|
|
528
|
+
"status": "success",
|
|
529
|
+
"question": "What is the main topic?",
|
|
530
|
+
"answer": "Based on the sources, the main topic is...",
|
|
531
|
+
"session_id": "abc123",
|
|
532
|
+
"notebook_url": "https://notebooklm.google.com/notebook/...",
|
|
533
|
+
"session_info": {
|
|
534
|
+
"age_seconds": 35,
|
|
535
|
+
"message_count": 1
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
If you receive a JSON response with `"success": true` and an `"answer"`, **congratulations!** 🎉
|
|
542
|
+
Your NotebookLM HTTP server is operational!
|
|
543
|
+
|
|
544
|
+
### Automated Tests (Recommended)
|
|
545
|
+
|
|
546
|
+
For complete validation, use the test scripts:
|
|
547
|
+
|
|
548
|
+
```powershell
|
|
549
|
+
# Quick test (30 seconds)
|
|
550
|
+
.\deployment\scripts\test-server.ps1
|
|
551
|
+
|
|
552
|
+
# Complete tests (5-10 minutes)
|
|
553
|
+
.\deployment\scripts\test-api.ps1
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
**Expected result:**
|
|
557
|
+
|
|
558
|
+
```
|
|
559
|
+
✅ ALL TESTS PASSED!
|
|
560
|
+
|
|
561
|
+
Total tests: 10
|
|
562
|
+
Successful tests: 10
|
|
563
|
+
Failed tests: 0
|
|
564
|
+
Success rate: 100%
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
**👉 Complete test documentation:** [Test Scripts](../scripts/README.md)
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## 🚪 Stop the Server
|
|
572
|
+
|
|
573
|
+
In the terminal where the server is running, press:
|
|
574
|
+
|
|
575
|
+
```
|
|
576
|
+
Ctrl + C
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
The server stops gracefully with:
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
SIGINT received, shutting down gracefully...
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
## ➡️ Next Steps
|
|
588
|
+
|
|
589
|
+
✅ Installation complete!
|
|
590
|
+
|
|
591
|
+
**Now you can:**
|
|
592
|
+
|
|
593
|
+
1. **[Advanced Configuration](./02-CONFIGURATION.md)** - Environment variables, firewall, security
|
|
594
|
+
2. **[API Documentation](./03-API.md)** - All available endpoints
|
|
595
|
+
3. **[n8n Integration](./04-N8N-INTEGRATION.md)** - Connect with n8n step-by-step
|
|
596
|
+
4. **[Troubleshooting](./05-TROUBLESHOOTING.md)** - Solutions to common problems
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
## 🆘 Problems?
|
|
601
|
+
|
|
602
|
+
If something doesn't work:
|
|
603
|
+
|
|
604
|
+
1. Consult **[05-TROUBLESHOOTING.md](./05-TROUBLESHOOTING.md)**
|
|
605
|
+
2. Check server logs
|
|
606
|
+
3. Test with `npm run setup-auth` again
|
|
607
|
+
4. Open a GitHub issue with the logs
|
|
608
|
+
|
|
609
|
+
---
|
|
610
|
+
|
|
611
|
+
**Congratulations! Your NotebookLM HTTP server is installed and operational! 🎉**
|