@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,217 @@
1
+ #!/usr/bin/env pwsh
2
+ <#
3
+ .SYNOPSIS
4
+ Configure Google authentication for NotebookLM MCP Server
5
+
6
+ .DESCRIPTION
7
+ This script:
8
+ 1. Checks if authentication already exists
9
+ 2. Asks for confirmation to reset if necessary
10
+ 3. Launches the interactive authentication process
11
+ 4. Verifies that files are properly created
12
+
13
+ .EXAMPLE
14
+ .\setup-auth.ps1
15
+ #>
16
+
17
+ # Colors
18
+ function Write-Success { Write-Host $args -ForegroundColor Green }
19
+ function Write-Info { Write-Host $args -ForegroundColor Cyan }
20
+ function Write-Warning { Write-Host $args -ForegroundColor Yellow }
21
+ function Write-Error { Write-Host $args -ForegroundColor Red }
22
+
23
+ Write-Info ""
24
+ Write-Info "=========================================="
25
+ Write-Info " NotebookLM MCP - Authentication Setup"
26
+ Write-Info "=========================================="
27
+ Write-Info ""
28
+
29
+ # Check that we're in the right directory
30
+ if (-not (Test-Path "package.json")) {
31
+ Write-Error "❌ Error: package.json not found"
32
+ Write-Error " Run this script from the project root:"
33
+ Write-Error " cd D:\notebooklm-http"
34
+ Write-Error " .\deployment\scripts\setup-auth.ps1"
35
+ exit 1
36
+ }
37
+
38
+ # Check that the build exists
39
+ if (-not (Test-Path "dist\index.js")) {
40
+ Write-Error "❌ Error: The project is not compiled"
41
+ Write-Error " Run first: npm run build"
42
+ exit 1
43
+ }
44
+
45
+ # Authentication data path
46
+ # IMPORTANT: env-paths uses LOCALAPPDATA for .data, not APPDATA!
47
+ $authDataDir = "$env:LOCALAPPDATA\notebooklm-mcp\Data"
48
+ $chromeProfileDir = "$authDataDir\chrome_profile"
49
+ $browserStateDir = "$authDataDir\browser_state"
50
+ $stateFile = "$browserStateDir\state.json"
51
+ $cookiesFile = "$chromeProfileDir\Default\Network\Cookies"
52
+
53
+ Write-Info "📁 Checking authentication files..."
54
+ Write-Info " Path: $authDataDir"
55
+ Write-Info ""
56
+
57
+ # Check if authentication already exists
58
+ $authExists = $false
59
+ if (Test-Path $stateFile) {
60
+ $authExists = $true
61
+ Write-Warning "âš ī¸ Existing authentication detected!"
62
+ Write-Info ""
63
+ Write-Info " Files found:"
64
+
65
+ if (Test-Path $cookiesFile) {
66
+ $cookiesSize = (Get-Item $cookiesFile).Length / 1KB
67
+ Write-Info " ✅ Cookies: $([math]::Round($cookiesSize, 2)) KB"
68
+ }
69
+
70
+ if (Test-Path $stateFile) {
71
+ $stateSize = (Get-Item $stateFile).Length / 1KB
72
+ Write-Info " ✅ State: $([math]::Round($stateSize, 2)) KB"
73
+ }
74
+
75
+ Write-Info ""
76
+ Write-Warning " Do you want to RESET the authentication?"
77
+ Write-Info " (This will delete the current files)"
78
+ Write-Info ""
79
+
80
+ $response = Read-Host " Continue? (Y/N)"
81
+
82
+ if ($response -notmatch '^[OoYy]') {
83
+ Write-Info ""
84
+ Write-Info "✅ Cancelled. Existing authentication preserved."
85
+ exit 0
86
+ }
87
+
88
+ Write-Info ""
89
+ Write-Warning "đŸ—‘ī¸ Deleting existing files..."
90
+
91
+ try {
92
+ if (Test-Path $authDataDir) {
93
+ Remove-Item -Path $authDataDir -Recurse -Force
94
+ Write-Success " ✅ Files deleted"
95
+ }
96
+ } catch {
97
+ Write-Error "❌ Error during deletion: $_"
98
+ exit 1
99
+ }
100
+ } else {
101
+ Write-Success "✅ No authentication files found"
102
+ Write-Info " First authentication setup"
103
+ Write-Info ""
104
+ }
105
+
106
+ Write-Info ""
107
+ Write-Info "🚀 Starting interactive authentication..."
108
+ Write-Info ""
109
+ Write-Info "📋 Instructions:"
110
+ Write-Info " 1. Chrome will open (visible window)"
111
+ Write-Info " 2. Log in to your Google account"
112
+ Write-Info " 3. Go to https://notebooklm.google.com"
113
+ Write-Info " 4. Wait for the page to load completely"
114
+ Write-Info " 5. Close Chrome manually (red X)"
115
+ Write-Info ""
116
+ Write-Warning "âŗ Press Enter when you're ready..."
117
+ Read-Host
118
+
119
+ Write-Info ""
120
+ Write-Info "🌐 Opening Chrome for authentication..."
121
+ Write-Info ""
122
+ Write-Info "âŗ Please wait while Chrome opens..."
123
+ Write-Info " 1. Chrome will open in VISIBLE mode"
124
+ Write-Info " 2. Log in to Google"
125
+ Write-Info " 3. Go to notebooklm.google.com"
126
+ Write-Info " 4. Close Chrome when you're done"
127
+ Write-Info ""
128
+
129
+ # Create temporary MCP command file
130
+ $mcpCommand = '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"setup_auth","arguments":{"show_browser":true}}}'
131
+ $tempFile = [System.IO.Path]::GetTempFileName()
132
+ $mcpCommand | Out-File -FilePath $tempFile -Encoding utf8 -NoNewline
133
+
134
+ try {
135
+ # Launch MCP server with setup_auth command
136
+ # NOTE: We use Get-Content | node to send the command via stdin
137
+ # This allows Chrome to display properly
138
+ Write-Info "Starting authentication process..."
139
+ Write-Info ""
140
+
141
+ Get-Content $tempFile | node dist/index.js
142
+
143
+ Write-Info ""
144
+ Write-Success "✅ Authentication process completed!"
145
+
146
+ } catch {
147
+ Write-Error "❌ Error during authentication: $_"
148
+ exit 1
149
+ } finally {
150
+ # Clean up temporary file
151
+ if (Test-Path $tempFile) {
152
+ Remove-Item $tempFile -ErrorAction SilentlyContinue
153
+ }
154
+ }
155
+
156
+ Write-Info ""
157
+ Write-Info "🔍 Verifying created files..."
158
+ Write-Info ""
159
+
160
+ # Wait a bit for files to be written
161
+ Start-Sleep -Seconds 2
162
+
163
+ $allOk = $true
164
+
165
+ # Check state.json
166
+ if (Test-Path $stateFile) {
167
+ $stateSize = (Get-Item $stateFile).Length / 1KB
168
+ Write-Success " ✅ state.json created ($([math]::Round($stateSize, 2)) KB)"
169
+ } else {
170
+ Write-Error " ❌ state.json missing!"
171
+ $allOk = $false
172
+ }
173
+
174
+ # Check Cookies
175
+ if (Test-Path $cookiesFile) {
176
+ $cookiesSize = (Get-Item $cookiesFile).Length / 1KB
177
+ if ($cookiesSize -gt 10) {
178
+ Write-Success " ✅ Cookies created ($([math]::Round($cookiesSize, 2)) KB)"
179
+ } else {
180
+ Write-Warning " âš ī¸ Cookies too small ($([math]::Round($cookiesSize, 2)) KB) - expected >10 KB"
181
+ Write-Warning " Authentication might not be complete"
182
+ $allOk = $false
183
+ }
184
+ } else {
185
+ Write-Error " ❌ Cookies missing!"
186
+ $allOk = $false
187
+ }
188
+
189
+ Write-Info ""
190
+ Write-Info "📁 Full file path:"
191
+ Write-Info " $authDataDir"
192
+ Write-Info ""
193
+
194
+ if ($allOk) {
195
+ Write-Success "=========================================="
196
+ Write-Success " ✅ Authentication configured successfully!"
197
+ Write-Success "=========================================="
198
+ Write-Info ""
199
+ Write-Info "💡 Google session valid for ~399 days"
200
+ Write-Info ""
201
+ Write-Info "🚀 Next step:"
202
+ Write-Info " .\deployment\scripts\start-server.ps1"
203
+ Write-Info ""
204
+ exit 0
205
+ } else {
206
+ Write-Error ""
207
+ Write-Error "=========================================="
208
+ Write-Error " ❌ Problem with authentication"
209
+ Write-Error "=========================================="
210
+ Write-Info ""
211
+ Write-Info "🔧 Possible solutions:"
212
+ Write-Info " 1. Rerun: .\deployment\scripts\setup-auth.ps1"
213
+ Write-Info " 2. Verify that Chrome has closed properly"
214
+ Write-Info " 3. Consult: .\deployment\docs\05-TROUBLESHOOTING.md"
215
+ Write-Info ""
216
+ exit 1
217
+ }
@@ -0,0 +1,72 @@
1
+ # Startup script - NotebookLM MCP HTTP Server
2
+ # Version: 1.3.0
3
+
4
+ Write-Host "╔══════════════════════════════════════════════════════════╗" -ForegroundColor Cyan
5
+ Write-Host "║ NotebookLM MCP - HTTP Server Startup ║" -ForegroundColor Cyan
6
+ Write-Host "╚══════════════════════════════════════════════════════════╝" -ForegroundColor Cyan
7
+ Write-Host ""
8
+
9
+ # Check that we are in the correct directory
10
+ if (-not (Test-Path "..\..\package.json")) {
11
+ Write-Host "❌ Error: This script must be run from deployment\scripts\" -ForegroundColor Red
12
+ Write-Host " Use: cd deployment\scripts then .\start-server.ps1" -ForegroundColor Yellow
13
+ exit 1
14
+ }
15
+
16
+ # Return to project root
17
+ Push-Location ..\..\
18
+
19
+ # Check that the project is compiled
20
+ if (-not (Test-Path "dist\http-wrapper.js")) {
21
+ Write-Host "❌ Project not compiled!" -ForegroundColor Red
22
+ Write-Host " Run first: npm run build" -ForegroundColor Yellow
23
+ Pop-Location
24
+ exit 1
25
+ }
26
+
27
+ # Check that authentication is configured
28
+ if (-not (Test-Path "Data\browser_state\state.json")) {
29
+ Write-Host "âš ī¸ Authentication not configured!" -ForegroundColor Yellow
30
+ Write-Host ""
31
+ Write-Host " You must first configure Google authentication:" -ForegroundColor White
32
+ Write-Host " .\deployment\scripts\setup-auth.ps1" -ForegroundColor Gray
33
+ Write-Host ""
34
+ $response = Read-Host " Do you want to continue anyway? (y/N)"
35
+ if ($response -ne "y" -and $response -ne "Y") {
36
+ Pop-Location
37
+ exit 0
38
+ }
39
+ }
40
+
41
+ # Check that port 3000 is available
42
+ $portInUse = netstat -ano | Select-String ":3000" | Select-String "LISTENING"
43
+ if ($portInUse) {
44
+ Write-Host "âš ī¸ Port 3000 is already in use!" -ForegroundColor Yellow
45
+ Write-Host ""
46
+ Write-Host " A server may already be running." -ForegroundColor White
47
+ Write-Host " To stop it: .\deployment\scripts\stop-server.ps1" -ForegroundColor Gray
48
+ Write-Host ""
49
+ $response = Read-Host " Do you want to continue anyway? (y/N)"
50
+ if ($response -ne "y" -and $response -ne "Y") {
51
+ Pop-Location
52
+ exit 0
53
+ }
54
+ }
55
+
56
+ Write-Host "🚀 Starting HTTP server..." -ForegroundColor Green
57
+ Write-Host ""
58
+ Write-Host "📊 Information:" -ForegroundColor Cyan
59
+ Write-Host " URL: http://0.0.0.0:3000" -ForegroundColor White
60
+ Write-Host " Health check: http://localhost:3000/health" -ForegroundColor White
61
+ Write-Host " API docs: .\deployment\docs\03-API.md" -ForegroundColor White
62
+ Write-Host ""
63
+ Write-Host "âšī¸ To stop: Press Ctrl+C" -ForegroundColor Yellow
64
+ Write-Host ""
65
+ Write-Host "════════════════════════════════════════════════════════════" -ForegroundColor Gray
66
+ Write-Host ""
67
+
68
+ # Start the server
69
+ node dist\http-wrapper.js
70
+
71
+ # Return to initial directory
72
+ Pop-Location
@@ -0,0 +1,51 @@
1
+ # Shutdown Script - NotebookLM MCP HTTP Server
2
+ # Version: 1.3.0
3
+
4
+ Write-Host "╔══════════════════════════════════════════════════════════╗" -ForegroundColor Cyan
5
+ Write-Host "║ NotebookLM MCP - HTTP Server Shutdown ║" -ForegroundColor Cyan
6
+ Write-Host "╚══════════════════════════════════════════════════════════╝" -ForegroundColor Cyan
7
+ Write-Host ""
8
+
9
+ # Find node processes listening on port 3000
10
+ $portInfo = netstat -ano | Select-String ":3000" | Select-String "LISTENING"
11
+
12
+ if (-not $portInfo) {
13
+ Write-Host "â„šī¸ No active server on port 3000" -ForegroundColor Yellow
14
+ Write-Host ""
15
+ exit 0
16
+ }
17
+
18
+ # Extract the PID
19
+ $pid = ($portInfo -split '\s+')[-1]
20
+
21
+ Write-Host "🔍 Process found: PID $pid" -ForegroundColor Yellow
22
+
23
+ # Verify it's actually node.exe
24
+ $process = Get-Process -Id $pid -ErrorAction SilentlyContinue
25
+ if (-not $process) {
26
+ Write-Host "❌ Unable to find the process" -ForegroundColor Red
27
+ exit 1
28
+ }
29
+
30
+ Write-Host " Process: $($process.ProcessName)" -ForegroundColor Gray
31
+ Write-Host ""
32
+
33
+ # Ask for confirmation
34
+ $response = Read-Host "Do you want to stop this process? (Y/n)"
35
+ if ($response -eq "n" -or $response -eq "N") {
36
+ Write-Host "❌ Cancelled" -ForegroundColor Yellow
37
+ exit 0
38
+ }
39
+
40
+ # Stop the process
41
+ Write-Host "âšī¸ Stopping server..." -ForegroundColor Yellow
42
+ try {
43
+ Stop-Process -Id $pid -Force
44
+ Start-Sleep -Seconds 1
45
+ Write-Host "✅ Server stopped successfully!" -ForegroundColor Green
46
+ } catch {
47
+ Write-Host "❌ Error during shutdown: $_" -ForegroundColor Red
48
+ exit 1
49
+ }
50
+
51
+ Write-Host ""