@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.
Files changed (284) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +71 -34
  3. package/deployment/INDEX.md +292 -0
  4. package/deployment/PACKAGE-FILES.txt +180 -0
  5. package/deployment/QUICK-START.md +100 -0
  6. package/deployment/docs/01-INSTALL.md +611 -0
  7. package/deployment/docs/02-CONFIGURATION.md +404 -0
  8. package/deployment/docs/03-API.md +1691 -0
  9. package/deployment/docs/04-N8N-INTEGRATION.md +373 -0
  10. package/deployment/docs/05-TROUBLESHOOTING.md +429 -0
  11. package/deployment/docs/06-NOTEBOOK-LIBRARY.md +692 -0
  12. package/deployment/docs/07-AUTO-DISCOVERY.md +236 -0
  13. package/deployment/docs/08-WSL-USAGE.md +363 -0
  14. package/deployment/docs/09-MULTI-INTERFACE.md +293 -0
  15. package/deployment/docs/10-CONTENT-MANAGEMENT.md +421 -0
  16. package/deployment/docs/11-MULTI-ACCOUNT.md +295 -0
  17. package/deployment/docs/README.md +207 -0
  18. package/deployment/scripts/README.md +564 -0
  19. package/deployment/scripts/install.ps1 +114 -0
  20. package/deployment/scripts/setup-auth.ps1 +217 -0
  21. package/deployment/scripts/start-server.ps1 +72 -0
  22. package/deployment/scripts/stop-server.ps1 +51 -0
  23. package/deployment/scripts/test-api.ps1 +651 -0
  24. package/deployment/scripts/test-auth.ps1 +323 -0
  25. package/deployment/scripts/test-auto-discovery.ps1 +295 -0
  26. package/deployment/scripts/test-cors.ps1 +398 -0
  27. package/deployment/scripts/test-errors.ps1 +581 -0
  28. package/deployment/scripts/test-server.ps1 +140 -0
  29. package/deployment/scripts/test-sessions.ps1 +426 -0
  30. package/deployment/scripts/test-validation.ps1 +299 -0
  31. package/dist/accounts/account-manager.d.ts +163 -0
  32. package/dist/accounts/account-manager.d.ts.map +1 -0
  33. package/dist/accounts/account-manager.js +614 -0
  34. package/dist/accounts/account-manager.js.map +1 -0
  35. package/dist/accounts/auto-login-manager.d.ts +62 -0
  36. package/dist/accounts/auto-login-manager.d.ts.map +1 -0
  37. package/dist/accounts/auto-login-manager.js +537 -0
  38. package/dist/accounts/auto-login-manager.js.map +1 -0
  39. package/dist/accounts/crypto.d.ts +45 -0
  40. package/dist/accounts/crypto.d.ts.map +1 -0
  41. package/dist/accounts/crypto.js +138 -0
  42. package/dist/accounts/crypto.js.map +1 -0
  43. package/dist/accounts/index.d.ts +14 -0
  44. package/dist/accounts/index.d.ts.map +1 -0
  45. package/dist/accounts/index.js +14 -0
  46. package/dist/accounts/index.js.map +1 -0
  47. package/dist/accounts/types.d.ts +103 -0
  48. package/dist/accounts/types.d.ts.map +1 -0
  49. package/dist/accounts/types.js +7 -0
  50. package/dist/accounts/types.js.map +1 -0
  51. package/dist/auth/auth-manager.d.ts +9 -2
  52. package/dist/auth/auth-manager.d.ts.map +1 -1
  53. package/dist/auth/auth-manager.js +60 -6
  54. package/dist/auth/auth-manager.js.map +1 -1
  55. package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
  56. package/dist/auto-discovery/auto-discovery.js +2 -1
  57. package/dist/auto-discovery/auto-discovery.js.map +1 -1
  58. package/dist/cli/accounts.d.ts +13 -0
  59. package/dist/cli/accounts.d.ts.map +1 -0
  60. package/dist/cli/accounts.js +195 -0
  61. package/dist/cli/accounts.js.map +1 -0
  62. package/dist/config.d.ts +1 -0
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +24 -0
  65. package/dist/config.js.map +1 -1
  66. package/dist/content/content-generator.d.ts +153 -0
  67. package/dist/content/content-generator.d.ts.map +1 -0
  68. package/dist/content/content-generator.js +637 -0
  69. package/dist/content/content-generator.js.map +1 -0
  70. package/dist/content/content-manager.d.ts +364 -0
  71. package/dist/content/content-manager.d.ts.map +1 -0
  72. package/dist/content/content-manager.js +3841 -0
  73. package/dist/content/content-manager.js.map +1 -0
  74. package/dist/content/content-templates.d.ts +183 -0
  75. package/dist/content/content-templates.d.ts.map +1 -0
  76. package/dist/content/content-templates.js +719 -0
  77. package/dist/content/content-templates.js.map +1 -0
  78. package/dist/content/index.d.ts +14 -0
  79. package/dist/content/index.d.ts.map +1 -0
  80. package/dist/content/index.js +14 -0
  81. package/dist/content/index.js.map +1 -0
  82. package/dist/content/types.d.ts +285 -0
  83. package/dist/content/types.d.ts.map +1 -0
  84. package/dist/content/types.js +10 -0
  85. package/dist/content/types.js.map +1 -0
  86. package/dist/errors.d.ts +1 -1
  87. package/dist/errors.d.ts.map +1 -1
  88. package/dist/errors.js.map +1 -1
  89. package/dist/http-wrapper.d.ts +7 -0
  90. package/dist/http-wrapper.d.ts.map +1 -1
  91. package/dist/http-wrapper.js +449 -29
  92. package/dist/http-wrapper.js.map +1 -1
  93. package/dist/i18n/en.json +120 -0
  94. package/dist/i18n/fr.json +120 -0
  95. package/dist/i18n/index.d.ts +168 -0
  96. package/dist/i18n/index.d.ts.map +1 -0
  97. package/dist/i18n/index.js +213 -0
  98. package/dist/i18n/index.js.map +1 -0
  99. package/dist/index.js +26 -2
  100. package/dist/index.js.map +1 -1
  101. package/dist/library/notebook-library.d.ts +4 -0
  102. package/dist/library/notebook-library.d.ts.map +1 -1
  103. package/dist/library/notebook-library.js +20 -3
  104. package/dist/library/notebook-library.js.map +1 -1
  105. package/dist/session/browser-session.d.ts +35 -8
  106. package/dist/session/browser-session.d.ts.map +1 -1
  107. package/dist/session/browser-session.js +243 -28
  108. package/dist/session/browser-session.js.map +1 -1
  109. package/dist/session/session-manager.d.ts +6 -0
  110. package/dist/session/session-manager.d.ts.map +1 -1
  111. package/dist/session/session-manager.js +46 -14
  112. package/dist/session/session-manager.js.map +1 -1
  113. package/dist/session/shared-context-manager.d.ts +3 -3
  114. package/dist/session/shared-context-manager.d.ts.map +1 -1
  115. package/dist/session/shared-context-manager.js +10 -7
  116. package/dist/session/shared-context-manager.js.map +1 -1
  117. package/dist/stdio-http-proxy.d.ts +24 -0
  118. package/dist/stdio-http-proxy.d.ts.map +1 -0
  119. package/dist/stdio-http-proxy.js +592 -0
  120. package/dist/stdio-http-proxy.js.map +1 -0
  121. package/dist/tools/index.d.ts +106 -1
  122. package/dist/tools/index.d.ts.map +1 -1
  123. package/dist/tools/index.js +1028 -7
  124. package/dist/tools/index.js.map +1 -1
  125. package/dist/types.d.ts +81 -17
  126. package/dist/types.d.ts.map +1 -1
  127. package/dist/utils/citation-extractor.d.ts +66 -0
  128. package/dist/utils/citation-extractor.d.ts.map +1 -0
  129. package/dist/utils/citation-extractor.js +492 -0
  130. package/dist/utils/citation-extractor.js.map +1 -0
  131. package/dist/utils/page-utils.d.ts +8 -0
  132. package/dist/utils/page-utils.d.ts.map +1 -1
  133. package/dist/utils/page-utils.js +112 -8
  134. package/dist/utils/page-utils.js.map +1 -1
  135. package/docs/ADDING_A_LANGUAGE.md +209 -0
  136. package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
  137. package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
  138. package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
  139. package/package.json +15 -12
  140. package/scripts/archive/add-and-activate-notebook.ps1 +31 -0
  141. package/scripts/archive/add-new-notebook.ps1 +25 -0
  142. package/scripts/archive/add-rom1pey.ps1 +2 -0
  143. package/scripts/archive/add-rpmonster.ps1 +2 -0
  144. package/scripts/archive/add-source-debug.ps1 +11 -0
  145. package/scripts/archive/add-source-e2e.ps1 +28 -0
  146. package/scripts/archive/add-source-visible.ps1 +11 -0
  147. package/scripts/archive/add-test-notebook.ps1 +13 -0
  148. package/scripts/archive/add-test-source.ps1 +50 -0
  149. package/scripts/archive/capture-screen.ps1 +11 -0
  150. package/scripts/archive/change-language.mjs +45 -0
  151. package/scripts/archive/change-language.ts +44 -0
  152. package/scripts/archive/check-account.ps1 +19 -0
  153. package/scripts/archive/check-notebook-2.ps1 +8 -0
  154. package/scripts/archive/check-test-notebook.ps1 +11 -0
  155. package/scripts/archive/create-notebook-auto.ps1 +31 -0
  156. package/scripts/archive/create-notebook.ps1 +8 -0
  157. package/scripts/archive/create-rom1pey-notebook.ps1 +19 -0
  158. package/scripts/archive/create-rom1pey.ps1 +8 -0
  159. package/scripts/archive/create-test-notebook-fresh.ps1 +21 -0
  160. package/scripts/archive/create-test-notebook.ps1 +16 -0
  161. package/scripts/archive/debug-add-source-auto.ps1 +29 -0
  162. package/scripts/archive/debug-add-source.ps1 +19 -0
  163. package/scripts/archive/debug-add-text-source.ps1 +47 -0
  164. package/scripts/archive/debug-home.ps1 +10 -0
  165. package/scripts/archive/debug-selectors.ps1 +55 -0
  166. package/scripts/archive/debug-sources-panel.ps1 +22 -0
  167. package/scripts/archive/debug-ui.ps1 +17 -0
  168. package/scripts/archive/discover-home.ps1 +26 -0
  169. package/scripts/archive/kill-automation-chrome.ps1 +37 -0
  170. package/scripts/archive/list-my-notebooks.ps1 +27 -0
  171. package/scripts/archive/navigate-home-visible.ps1 +23 -0
  172. package/scripts/archive/navigate-home.ps1 +15 -0
  173. package/scripts/archive/run-e2e-english.ps1 +111 -0
  174. package/scripts/archive/run-e2e-rom1pey-v2.ps1 +122 -0
  175. package/scripts/archive/run-e2e-rom1pey.ps1 +117 -0
  176. package/scripts/archive/setup-english-test.ps1 +36 -0
  177. package/scripts/archive/setup-test-notebook.ps1 +71 -0
  178. package/scripts/archive/simple-add-source.ps1 +14 -0
  179. package/scripts/archive/t10.ps1 +2 -0
  180. package/scripts/archive/t20.ps1 +4 -0
  181. package/scripts/archive/t30.ps1 +9 -0
  182. package/scripts/archive/t31.ps1 +11 -0
  183. package/scripts/archive/t32.ps1 +6 -0
  184. package/scripts/archive/t39.ps1 +5 -0
  185. package/scripts/archive/t40.ps1 +5 -0
  186. package/scripts/archive/t53.ps1 +12 -0
  187. package/scripts/archive/t54.ps1 +12 -0
  188. package/scripts/archive/t55.ps1 +11 -0
  189. package/scripts/archive/t9.ps1 +1 -0
  190. package/scripts/archive/test-access.ps1 +28 -0
  191. package/scripts/archive/test-add-delete-source.ps1 +64 -0
  192. package/scripts/archive/test-add-source-visible.ps1 +16 -0
  193. package/scripts/archive/test-add-source.ps1 +19 -0
  194. package/scripts/archive/test-add-text-debug.ps1 +28 -0
  195. package/scripts/archive/test-add-text-source.ps1 +8 -0
  196. package/scripts/archive/test-add-url-source.ps1 +7 -0
  197. package/scripts/archive/test-ask-ascii.ps1 +20 -0
  198. package/scripts/archive/test-ask-cnv.ps1 +20 -0
  199. package/scripts/archive/test-ask-headed.ps1 +51 -0
  200. package/scripts/archive/test-ask-ifs.ps1 +16 -0
  201. package/scripts/archive/test-ask-now.ps1 +24 -0
  202. package/scripts/archive/test-ask-real.ps1 +19 -0
  203. package/scripts/archive/test-ask-visible.ps1 +20 -0
  204. package/scripts/archive/test-create-notebook.ps1 +8 -0
  205. package/scripts/archive/test-create-then-add.ps1 +17 -0
  206. package/scripts/archive/test-delete-source.ps1 +41 -0
  207. package/scripts/archive/test-e2e-notebook.ps1 +21 -0
  208. package/scripts/archive/test-english-notebook.ps1 +20 -0
  209. package/scripts/archive/test-english.ps1 +7 -0
  210. package/scripts/archive/test-full-custom-instructions.ps1 +40 -0
  211. package/scripts/archive/test-full-infographic.ps1 +34 -0
  212. package/scripts/archive/test-full-language.ps1 +21 -0
  213. package/scripts/archive/test-full-presentation.ps1 +85 -0
  214. package/scripts/archive/test-full-report.ps1 +34 -0
  215. package/scripts/archive/test-full-source-selection.ps1 +35 -0
  216. package/scripts/archive/test-full-video-brief.ps1 +22 -0
  217. package/scripts/archive/test-full-video-explainer.ps1 +22 -0
  218. package/scripts/archive/test-full-video-styles.ps1 +37 -0
  219. package/scripts/archive/test-generate-report.ps1 +15 -0
  220. package/scripts/archive/test-generate-study-guide.ps1 +11 -0
  221. package/scripts/archive/test-headed-ask.ps1 +13 -0
  222. package/scripts/archive/test-headed-now.ps1 +9 -0
  223. package/scripts/archive/test-headed.ps1 +9 -0
  224. package/scripts/archive/test-hello.ps1 +7 -0
  225. package/scripts/archive/test-i18n-studio.ps1 +8 -0
  226. package/scripts/archive/test-i18n.ps1 +7 -0
  227. package/scripts/archive/test-manual-headed.ps1 +26 -0
  228. package/scripts/archive/test-mathieu-quota.ps1 +8 -0
  229. package/scripts/archive/test-notebook-1.ps1 +10 -0
  230. package/scripts/archive/test-notebook-2-sources.ps1 +12 -0
  231. package/scripts/archive/test-notebook1.ps1 +14 -0
  232. package/scripts/archive/test-personal-notebook.ps1 +14 -0
  233. package/scripts/archive/test-rate-limit.ps1 +19 -0
  234. package/scripts/archive/test-real-ask.ps1 +50 -0
  235. package/scripts/archive/test-real-ask2.ps1 +30 -0
  236. package/scripts/archive/test-rom1pey.ps1 +7 -0
  237. package/scripts/archive/test-rotation-complete.ps1 +14 -0
  238. package/scripts/archive/test-rotation.ps1 +8 -0
  239. package/scripts/archive/test-show-browser.ps1 +39 -0
  240. package/scripts/archive/test-update-notebook.ps1 +4 -0
  241. package/scripts/archive/verify-language-slow.ps1 +21 -0
  242. package/scripts/archive/verify-language.ps1 +15 -0
  243. package/scripts/check-server.ps1 +46 -0
  244. package/scripts/mcp-wsl-helper.sh +146 -0
  245. package/scripts/start-server.ps1 +94 -0
  246. package/scripts/stop-server.ps1 +30 -0
  247. package/scripts/switch-account-language.sh +191 -0
  248. package/scripts/test-account.ps1 +58 -0
  249. package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
  250. package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
  251. package/dist/__tests__/cleanup-manager.test.js +0 -341
  252. package/dist/__tests__/cleanup-manager.test.js.map +0 -1
  253. package/dist/__tests__/config-parsing.test.d.ts +0 -2
  254. package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
  255. package/dist/__tests__/config-parsing.test.js +0 -338
  256. package/dist/__tests__/config-parsing.test.js.map +0 -1
  257. package/dist/__tests__/config.test.d.ts +0 -2
  258. package/dist/__tests__/config.test.d.ts.map +0 -1
  259. package/dist/__tests__/config.test.js +0 -267
  260. package/dist/__tests__/config.test.js.map +0 -1
  261. package/dist/__tests__/errors.test.d.ts +0 -2
  262. package/dist/__tests__/errors.test.d.ts.map +0 -1
  263. package/dist/__tests__/errors.test.js +0 -166
  264. package/dist/__tests__/errors.test.js.map +0 -1
  265. package/dist/__tests__/logger.test.d.ts +0 -2
  266. package/dist/__tests__/logger.test.d.ts.map +0 -1
  267. package/dist/__tests__/logger.test.js +0 -324
  268. package/dist/__tests__/logger.test.js.map +0 -1
  269. package/dist/__tests__/page-utils.test.d.ts +0 -2
  270. package/dist/__tests__/page-utils.test.d.ts.map +0 -1
  271. package/dist/__tests__/page-utils.test.js +0 -349
  272. package/dist/__tests__/page-utils.test.js.map +0 -1
  273. package/dist/__tests__/setup-verification.test.d.ts +0 -2
  274. package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
  275. package/dist/__tests__/setup-verification.test.js +0 -15
  276. package/dist/__tests__/setup-verification.test.js.map +0 -1
  277. package/dist/__tests__/stealth-utils.test.d.ts +0 -2
  278. package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
  279. package/dist/__tests__/stealth-utils.test.js +0 -413
  280. package/dist/__tests__/stealth-utils.test.js.map +0 -1
  281. package/dist/__tests__/types.test.d.ts +0 -2
  282. package/dist/__tests__/types.test.d.ts.map +0 -1
  283. package/dist/__tests__/types.test.js +0 -461
  284. package/dist/__tests__/types.test.js.map +0 -1
@@ -0,0 +1,11 @@
1
+ # Test /content/generate with study_guide
2
+ $body = @{
3
+ notebook_id = "notebook-2"
4
+ content_type = "study_guide"
5
+ } | ConvertTo-Json
6
+
7
+ Write-Host "Generating study guide from IFS sources..."
8
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
9
+
10
+ Write-Host "`nResponse:"
11
+ $response | ConvertTo-Json -Depth 5
@@ -0,0 +1,13 @@
1
+ # Test /ask avec navigateur visible
2
+ $body = @{
3
+ question = "What is IFS therapy?"
4
+ notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
5
+ show_browser = $true
6
+ } | ConvertTo-Json
7
+
8
+ Write-Host "Envoi requete /ask avec navigateur visible..."
9
+ Write-Host "Regardez le navigateur qui va s'ouvrir!"
10
+ Write-Host ""
11
+
12
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
13
+ Write-Host "Reponse: $($response.data.answer)"
@@ -0,0 +1,9 @@
1
+ $body = @{
2
+ question = "Quel est le theme principal?"
3
+ notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
4
+ show_browser = $true
5
+ } | ConvertTo-Json
6
+
7
+ Write-Host "Lancement test HEADED avec mathieudumont31..."
8
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
9
+ $response | ConvertTo-Json -Depth 3
@@ -0,0 +1,9 @@
1
+ $body = @{
2
+ question = "Quel est le theme principal?"
3
+ notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
4
+ headless = $false
5
+ } | ConvertTo-Json
6
+
7
+ Write-Host "Testing HEADED with mathieudumont31..."
8
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
9
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,7 @@
1
+ $body = @{
2
+ question = "Hello, what is this notebook about?"
3
+ notebook_url = "https://notebooklm.google.com/notebook/74912e55-34a4-4027-bdcc-8e89badd0efd"
4
+ } | ConvertTo-Json
5
+
6
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
7
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,8 @@
1
+ $body = @{
2
+ notebook_id = "notebook-1"
3
+ content_type = "report"
4
+ } | ConvertTo-Json
5
+
6
+ Write-Host "Testing Studio tab with English UI..."
7
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body
8
+ $response | ConvertTo-Json -Depth 5
@@ -0,0 +1,7 @@
1
+ $body = @{
2
+ question = "Qu'est-ce que la CNV en une phrase?"
3
+ notebook_id = "notebook-1"
4
+ } | ConvertTo-Json
5
+
6
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body
7
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,26 @@
1
+ # Test in headed mode to see what happens
2
+ # Stop existing server
3
+ taskkill /F /IM node.exe 2>$null
4
+ Start-Sleep -Seconds 2
5
+
6
+ # Set headed mode and start server
7
+ $env:HEADLESS = "false"
8
+ Write-Host "Starting server in HEADED mode (you'll see the browser)..."
9
+ Start-Process -FilePath "cmd.exe" -ArgumentList "/c cd /d D:\Claude\notebooklm-mcp-http && set HEADLESS=false && node dist/http-wrapper.js" -NoNewWindow
10
+
11
+ Write-Host "Waiting for server..."
12
+ Start-Sleep -Seconds 6
13
+
14
+ # Ask question
15
+ Write-Host "Sending question - WATCH THE BROWSER!"
16
+ $body = @{
17
+ notebook_id = "notebook-2"
18
+ question = "What is IFS?"
19
+ } | ConvertTo-Json
20
+
21
+ try {
22
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 180
23
+ Write-Host "Response: $($response.data.answer)"
24
+ } catch {
25
+ Write-Host "Error: $_"
26
+ }
@@ -0,0 +1,8 @@
1
+ $body = @{
2
+ question = "Bonjour, test quota"
3
+ show_browser = $true
4
+ } | ConvertTo-Json
5
+
6
+ Write-Host "Testing with mathieudumont (should hit rate limit)..."
7
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
8
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,10 @@
1
+ # Activate notebook-1 and check content
2
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/notebook-1/activate" -Method PUT
3
+ Write-Host "Activate response:"
4
+ $response | ConvertTo-Json -Depth 5
5
+
6
+ Start-Sleep -Seconds 3
7
+
8
+ $content = Invoke-RestMethod -Uri "http://localhost:3000/content" -Method GET
9
+ Write-Host "`nContent response:"
10
+ $content | ConvertTo-Json -Depth 5
@@ -0,0 +1,12 @@
1
+ # Activate notebook-2 (Test Notebook) and check sources
2
+ Write-Host "Activating notebook-2..."
3
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/notebook-2/activate" -Method PUT
4
+ Write-Host "Activated: $($response.data.notebook.name)"
5
+
6
+ Start-Sleep -Seconds 3
7
+
8
+ Write-Host "`nGetting content..."
9
+ $content = Invoke-RestMethod -Uri "http://localhost:3000/content" -Method GET
10
+ Write-Host "Source count: $($content.data.sourceCount)"
11
+ Write-Host "Sources:"
12
+ $content.data.sources | ForEach-Object { Write-Host " - $($_.name)" }
@@ -0,0 +1,14 @@
1
+ # Test with notebook-1 (CNV) to see if issue is notebook-specific
2
+ $body = @{
3
+ notebook_id = "notebook-1"
4
+ question = "What is CNV?"
5
+ } | ConvertTo-Json
6
+
7
+ Write-Host "Asking question to notebook-1 (CNV)..."
8
+ try {
9
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 180
10
+ Write-Host "Success: $($response.success)"
11
+ Write-Host "Answer: $($response.data.answer.Substring(0, [Math]::Min(200, $response.data.answer.Length)))..."
12
+ } catch {
13
+ Write-Host "Error: $_"
14
+ }
@@ -0,0 +1,14 @@
1
+ # Test access to personal notebook on port 3001
2
+ $body = @{
3
+ url = "https://notebooklm.google.com/notebook/ce42b898-330e-45cc-96ad-ff748c1576d8"
4
+ name = "Mon Notebook Perso"
5
+ description = "Test notebook personnel"
6
+ topics = @("test")
7
+ } | ConvertTo-Json
8
+
9
+ Write-Host "Adding your personal notebook..."
10
+ $response = Invoke-RestMethod -Uri "http://localhost:3001/notebooks" -Method POST -ContentType "application/json" -Body $body
11
+ Write-Host "Result: $($response.success)"
12
+ if ($response.success) {
13
+ Write-Host "Notebook added! ID: $($response.data.notebook.id)"
14
+ }
@@ -0,0 +1,19 @@
1
+ $body = @{
2
+ question = "What is IFS therapy?"
3
+ notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
4
+ show_browser = $true
5
+ } | ConvertTo-Json
6
+
7
+ Write-Host "Testing /ask with headed browser..."
8
+ Write-Host "Watch for rate limit detection in the input field!"
9
+ Write-Host ""
10
+
11
+ try {
12
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
13
+ Write-Host "Response: $($response | ConvertTo-Json -Depth 5)"
14
+ } catch {
15
+ Write-Host "Error: $($_.Exception.Message)"
16
+ if ($_.ErrorDetails) {
17
+ Write-Host "Details: $($_.ErrorDetails.Message)"
18
+ }
19
+ }
@@ -0,0 +1,50 @@
1
+ # Test if authentication actually works by making a real /ask request
2
+ # First add a notebook, then ask a question
3
+
4
+ Write-Host "=== Testing if port 3000 is REALLY authenticated ==="
5
+ Write-Host ""
6
+
7
+ # Add a test notebook
8
+ $notebook = @{
9
+ url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
10
+ name = "Test E2E"
11
+ description = "Notebook pour tests E2E"
12
+ topics = @("test", "e2e")
13
+ } | ConvertTo-Json
14
+
15
+ Write-Host "1. Adding notebook..."
16
+ try {
17
+ $resp = Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method POST -ContentType "application/json" -Body $notebook
18
+ Write-Host " Notebook added: $($resp.data.notebook.id)"
19
+ } catch {
20
+ Write-Host " Failed to add notebook: $_"
21
+ }
22
+
23
+ # Activate it
24
+ Write-Host "2. Activating notebook..."
25
+ try {
26
+ $resp = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/test-e2e/activate" -Method PUT
27
+ Write-Host " Activated: $($resp.success)"
28
+ } catch {
29
+ Write-Host " Failed to activate: $_"
30
+ }
31
+
32
+ # Ask a question - THIS will tell us if auth really works
33
+ Write-Host "3. Asking question (this tests real auth)..."
34
+ $question = @{
35
+ question = "What is this notebook about?"
36
+ } | ConvertTo-Json
37
+
38
+ try {
39
+ $resp = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $question -TimeoutSec 120
40
+ Write-Host ""
41
+ Write-Host "=== RESULT ==="
42
+ if ($resp.success) {
43
+ Write-Host "SUCCESS! Authentication WORKS!"
44
+ Write-Host "Answer: $($resp.data.answer.Substring(0, [Math]::Min(200, $resp.data.answer.Length)))..."
45
+ } else {
46
+ Write-Host "Failed: $($resp.error)"
47
+ }
48
+ } catch {
49
+ Write-Host "Request failed: $_"
50
+ }
@@ -0,0 +1,30 @@
1
+ # Test auth by asking directly with notebook_url
2
+ Write-Host "=== Testing REAL authentication on port 3000 ==="
3
+ Write-Host ""
4
+
5
+ $body = @{
6
+ question = "What is this notebook about?"
7
+ notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
8
+ } | ConvertTo-Json
9
+
10
+ Write-Host "Asking question with direct notebook URL..."
11
+ Write-Host "This will PROVE if authentication works or not"
12
+ Write-Host ""
13
+
14
+ try {
15
+ $resp = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
16
+ Write-Host "=== RESULT ==="
17
+ if ($resp.success) {
18
+ $answer = $resp.data.answer
19
+ if ($answer -eq "Le système n'a pas pu répondre.") {
20
+ Write-Host "Auth works but NotebookLM returned error (known issue)"
21
+ } else {
22
+ Write-Host "SUCCESS! Got real answer:"
23
+ Write-Host $answer.Substring(0, [Math]::Min(300, $answer.Length))
24
+ }
25
+ } else {
26
+ Write-Host "Failed: $($resp.error)"
27
+ }
28
+ } catch {
29
+ Write-Host "Exception: $_"
30
+ }
@@ -0,0 +1,7 @@
1
+ $body = @{
2
+ question = "Hello"
3
+ notebook_url = "https://notebooklm.google.com/notebook/725d28e1-4284-4f36-99a2-b6693c2ebf13"
4
+ } | ConvertTo-Json
5
+
6
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
7
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,14 @@
1
+ $body = @{
2
+ question = "Test rotation automatique"
3
+ show_browser = $true
4
+ } | ConvertTo-Json
5
+
6
+ Write-Host "=== TEST ROTATION COMPLETE ===" -ForegroundColor Cyan
7
+ Write-Host "1. Demarrage avec mathieudumont (quota 50/50)"
8
+ Write-Host "2. Attend erreur 'Le systeme n'a pas pu repondre'"
9
+ Write-Host "3. Detection rate limit -> switch compte"
10
+ Write-Host "4. Retry avec nouveau compte"
11
+ Write-Host ""
12
+
13
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
14
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,8 @@
1
+ $body = @{
2
+ question = "Bonjour, quel est le sujet principal de ce notebook?"
3
+ notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
4
+ } | ConvertTo-Json
5
+
6
+ Write-Host "Testing account rotation with rate-limited mathieudumont31..."
7
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
8
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,39 @@
1
+ # Test show_browser parameter
2
+ # This tests whether show_browser=true makes the browser visible
3
+
4
+ $baseUrl = "http://localhost:3000"
5
+ $notebookUrl = "https://notebooklm.google.com/notebook/abd21688-02a6-4459-953b-30f0612a984e"
6
+
7
+ Write-Host "=== Testing show_browser parameter ===" -ForegroundColor Cyan
8
+
9
+ # Test 1: Health check
10
+ Write-Host "`n[1] Health check..." -ForegroundColor Yellow
11
+ $health = Invoke-RestMethod -Uri "$baseUrl/health" -Method GET
12
+ Write-Host "Server OK, authenticated: $($health.data.authenticated)"
13
+
14
+ # Test 2: Add source with show_browser=true
15
+ Write-Host "`n[2] Adding text source with show_browser=true..." -ForegroundColor Yellow
16
+ Write-Host " EXPECTED: Browser window should appear (VISIBLE mode)" -ForegroundColor Green
17
+
18
+ $body = @{
19
+ source_type = "text"
20
+ text = "Debug test content - checking show_browser parameter"
21
+ title = "Debug Test"
22
+ notebook_url = $notebookUrl
23
+ show_browser = $true
24
+ } | ConvertTo-Json
25
+
26
+ Write-Host "`nRequest body:"
27
+ Write-Host $body
28
+
29
+ try {
30
+ $response = Invoke-RestMethod -Uri "$baseUrl/content/sources" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
31
+ Write-Host "`nResponse:"
32
+ $response | ConvertTo-Json -Depth 5
33
+ } catch {
34
+ Write-Host "Error: $_" -ForegroundColor Red
35
+ Write-Host $_.Exception.Response
36
+ }
37
+
38
+ Write-Host "`n=== Test complete ===" -ForegroundColor Cyan
39
+ Write-Host "Did a browser window appear? (Y/N)"
@@ -0,0 +1,4 @@
1
+ $body = @{
2
+ description = "Updated by E2E test at $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
3
+ } | ConvertTo-Json
4
+ Invoke-RestMethod -Uri "http://localhost:3000/notebooks/e2e-rom1pey-test" -Method PUT -ContentType "application/json" -Body $body
@@ -0,0 +1,21 @@
1
+ # Verify NotebookLM Language - Slow version
2
+ # Opens browser and waits so you can check the UI language
3
+
4
+ $body = @{
5
+ notebook_url = "https://notebooklm.google.com/notebook/725d28e1-4284-4f36-99a2-b6693c2ebf13"
6
+ question = "Hello, what language is the UI in?"
7
+ show_browser = $true
8
+ browser_options = @{
9
+ headless = $false
10
+ slowMo = 2000
11
+ }
12
+ } | ConvertTo-Json -Depth 3
13
+
14
+ Write-Host "==========================================="
15
+ Write-Host " REGARDE LE NAVIGATEUR QUI VA S'OUVRIR"
16
+ Write-Host " Verifie que l'UI est en ANGLAIS"
17
+ Write-Host "==========================================="
18
+ Write-Host ""
19
+
20
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
21
+ Write-Host "Reponse recue."
@@ -0,0 +1,15 @@
1
+ # Verify NotebookLM Language
2
+ # Opens browser to check if UI is in English
3
+
4
+ $body = @{
5
+ notebook_url = "https://notebooklm.google.com/notebook/725d28e1-4284-4f36-99a2-b6693c2ebf13"
6
+ question = "What is this notebook about?"
7
+ show_browser = $true
8
+ } | ConvertTo-Json
9
+
10
+ Write-Host "Opening NotebookLM to verify language..."
11
+ Write-Host "Check if the UI is in ENGLISH (buttons, menus, etc.)"
12
+ Write-Host ""
13
+
14
+ $response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body
15
+ $response | ConvertTo-Json -Depth 10
@@ -0,0 +1,46 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Check NotebookLM MCP HTTP Server status
4
+
5
+ .DESCRIPTION
6
+ Checks if the server is running and displays health information.
7
+ #>
8
+
9
+ param(
10
+ [int]$Port = 3000
11
+ )
12
+
13
+ Write-Host "Checking NotebookLM MCP HTTP Server..." -ForegroundColor Cyan
14
+ Write-Host ""
15
+
16
+ # Check if something is listening on the port
17
+ $listener = Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue
18
+
19
+ if ($listener) {
20
+ $pid = $listener.OwningProcess | Select-Object -First 1
21
+ $proc = Get-Process -Id $pid -ErrorAction SilentlyContinue
22
+
23
+ Write-Host "Server Status: RUNNING" -ForegroundColor Green
24
+ Write-Host " PID: $pid"
25
+ Write-Host " Process: $($proc.ProcessName)"
26
+ Write-Host " Port: $Port"
27
+ Write-Host ""
28
+
29
+ # Try to get health info
30
+ try {
31
+ $health = Invoke-RestMethod -Uri "http://localhost:$Port/health" -Method Get -TimeoutSec 5
32
+ Write-Host "Health Check:" -ForegroundColor Cyan
33
+ Write-Host " Status: $($health.data.status)"
34
+ Write-Host " Authenticated: $($health.data.authenticated)"
35
+ Write-Host " Active Sessions: $($health.data.active_sessions)/$($health.data.max_sessions)"
36
+ Write-Host " Total Messages: $($health.data.total_messages)"
37
+ }
38
+ catch {
39
+ Write-Host "Could not get health info: $_" -ForegroundColor Yellow
40
+ }
41
+ } else {
42
+ Write-Host "Server Status: NOT RUNNING" -ForegroundColor Red
43
+ Write-Host ""
44
+ Write-Host "To start the server:" -ForegroundColor Yellow
45
+ Write-Host " .\scripts\start-server.ps1" -ForegroundColor Yellow
46
+ }
@@ -0,0 +1,146 @@
1
+ #!/bin/bash
2
+ # NotebookLM MCP HTTP Server - WSL Helper Script
3
+ # This script helps interact with the Windows-hosted MCP server from WSL
4
+ #
5
+ # Usage:
6
+ # ./mcp-wsl-helper.sh start Start the server (Windows)
7
+ # ./mcp-wsl-helper.sh stop Stop the server
8
+ # ./mcp-wsl-helper.sh status Check if server is running
9
+ # ./mcp-wsl-helper.sh health Get health status
10
+ # ./mcp-wsl-helper.sh ask "question" Ask a question to the active notebook
11
+ # ./mcp-wsl-helper.sh auth Launch authentication (opens Chrome)
12
+
13
+ set -e
14
+
15
+ MCP_PORT=3000
16
+ MCP_DIR="D:/Claude/notebooklm-mcp-http"
17
+
18
+ # Helper function to call the API via PowerShell (bypasses WSL network issues)
19
+ call_api() {
20
+ local method="$1"
21
+ local endpoint="$2"
22
+ local body="$3"
23
+
24
+ if [ -n "$body" ]; then
25
+ powershell.exe -Command "Invoke-RestMethod -Uri 'http://localhost:${MCP_PORT}${endpoint}' -Method ${method} -ContentType 'application/json' -Body '${body}' | ConvertTo-Json -Depth 10" 2>&1
26
+ else
27
+ powershell.exe -Command "Invoke-RestMethod -Uri 'http://localhost:${MCP_PORT}${endpoint}' -Method ${method} | ConvertTo-Json -Depth 10" 2>&1
28
+ fi
29
+ }
30
+
31
+ # Check if server is running
32
+ is_running() {
33
+ cmd.exe /c "netstat -ano | findstr :${MCP_PORT} | findstr LISTENING" >/dev/null 2>&1
34
+ }
35
+
36
+ # Get server PID
37
+ get_pid() {
38
+ cmd.exe /c "netstat -ano | findstr :${MCP_PORT} | findstr LISTENING" 2>/dev/null | awk '{print $5}' | tr -d '\r'
39
+ }
40
+
41
+ case "$1" in
42
+ start)
43
+ if is_running; then
44
+ echo "Server already running (PID: $(get_pid))"
45
+ exit 0
46
+ fi
47
+ echo "Starting NotebookLM MCP HTTP Server..."
48
+ powershell.exe -Command "Start-Process -NoNewWindow -FilePath 'node' -ArgumentList '${MCP_DIR}/dist/http-wrapper.js' -WorkingDirectory '${MCP_DIR}'" 2>&1
49
+ sleep 3
50
+ if is_running; then
51
+ echo "Server started successfully (PID: $(get_pid))"
52
+ echo "Health: http://localhost:${MCP_PORT}/health"
53
+ else
54
+ echo "Failed to start server"
55
+ exit 1
56
+ fi
57
+ ;;
58
+
59
+ stop)
60
+ if ! is_running; then
61
+ echo "Server not running"
62
+ exit 0
63
+ fi
64
+ PID=$(get_pid)
65
+ echo "Stopping server (PID: ${PID})..."
66
+ cmd.exe /c "taskkill /PID ${PID} /F" 2>&1
67
+ echo "Server stopped"
68
+ ;;
69
+
70
+ status)
71
+ if is_running; then
72
+ echo "Server is RUNNING (PID: $(get_pid))"
73
+ echo ""
74
+ call_api "GET" "/health"
75
+ else
76
+ echo "Server is STOPPED"
77
+ exit 1
78
+ fi
79
+ ;;
80
+
81
+ health)
82
+ if ! is_running; then
83
+ echo '{"success":false,"error":"Server not running"}'
84
+ exit 1
85
+ fi
86
+ call_api "GET" "/health"
87
+ ;;
88
+
89
+ auth)
90
+ if ! is_running; then
91
+ echo "Server not running. Start it first with: $0 start"
92
+ exit 1
93
+ fi
94
+ echo "Launching authentication (Chrome will open)..."
95
+ call_api "POST" "/setup-auth" '{"show_browser": true}'
96
+ ;;
97
+
98
+ ask)
99
+ if [ -z "$2" ]; then
100
+ echo "Usage: $0 ask \"your question here\" [notebook_id]"
101
+ exit 1
102
+ fi
103
+ if ! is_running; then
104
+ echo '{"success":false,"error":"Server not running"}'
105
+ exit 1
106
+ fi
107
+ QUESTION="$2"
108
+ NOTEBOOK_ID="${3:-}"
109
+
110
+ if [ -n "$NOTEBOOK_ID" ]; then
111
+ BODY="{\"question\": \"${QUESTION}\", \"notebook_id\": \"${NOTEBOOK_ID}\"}"
112
+ else
113
+ BODY="{\"question\": \"${QUESTION}\"}"
114
+ fi
115
+
116
+ call_api "POST" "/ask" "$BODY"
117
+ ;;
118
+
119
+ notebooks)
120
+ if ! is_running; then
121
+ echo '{"success":false,"error":"Server not running"}'
122
+ exit 1
123
+ fi
124
+ call_api "GET" "/notebooks"
125
+ ;;
126
+
127
+ *)
128
+ echo "NotebookLM MCP HTTP Server - WSL Helper"
129
+ echo ""
130
+ echo "Usage: $0 <command> [args]"
131
+ echo ""
132
+ echo "Commands:"
133
+ echo " start Start the server (Windows background process)"
134
+ echo " stop Stop the server"
135
+ echo " status Check server status and health"
136
+ echo " health Get health status (JSON)"
137
+ echo " auth Launch authentication (opens Chrome)"
138
+ echo " ask \"question\" Ask a question to the active notebook"
139
+ echo " notebooks List available notebooks"
140
+ echo ""
141
+ echo "Examples:"
142
+ echo " $0 start"
143
+ echo " $0 ask \"What is the main topic?\" my-notebook"
144
+ echo " $0 status"
145
+ ;;
146
+ esac