@roomi-fields/notebooklm-mcp 1.3.6 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +71 -34
- package/deployment/INDEX.md +292 -0
- package/deployment/PACKAGE-FILES.txt +180 -0
- package/deployment/QUICK-START.md +100 -0
- package/deployment/docs/01-INSTALL.md +611 -0
- package/deployment/docs/02-CONFIGURATION.md +404 -0
- package/deployment/docs/03-API.md +1691 -0
- package/deployment/docs/04-N8N-INTEGRATION.md +373 -0
- package/deployment/docs/05-TROUBLESHOOTING.md +429 -0
- package/deployment/docs/06-NOTEBOOK-LIBRARY.md +692 -0
- package/deployment/docs/07-AUTO-DISCOVERY.md +236 -0
- package/deployment/docs/08-WSL-USAGE.md +363 -0
- package/deployment/docs/09-MULTI-INTERFACE.md +293 -0
- package/deployment/docs/10-CONTENT-MANAGEMENT.md +421 -0
- package/deployment/docs/11-MULTI-ACCOUNT.md +295 -0
- package/deployment/docs/README.md +207 -0
- package/deployment/scripts/README.md +564 -0
- package/deployment/scripts/install.ps1 +114 -0
- package/deployment/scripts/setup-auth.ps1 +217 -0
- package/deployment/scripts/start-server.ps1 +72 -0
- package/deployment/scripts/stop-server.ps1 +51 -0
- package/deployment/scripts/test-api.ps1 +651 -0
- package/deployment/scripts/test-auth.ps1 +323 -0
- package/deployment/scripts/test-auto-discovery.ps1 +295 -0
- package/deployment/scripts/test-cors.ps1 +398 -0
- package/deployment/scripts/test-errors.ps1 +581 -0
- package/deployment/scripts/test-server.ps1 +140 -0
- package/deployment/scripts/test-sessions.ps1 +426 -0
- package/deployment/scripts/test-validation.ps1 +299 -0
- package/dist/accounts/account-manager.d.ts +163 -0
- package/dist/accounts/account-manager.d.ts.map +1 -0
- package/dist/accounts/account-manager.js +614 -0
- package/dist/accounts/account-manager.js.map +1 -0
- package/dist/accounts/auto-login-manager.d.ts +62 -0
- package/dist/accounts/auto-login-manager.d.ts.map +1 -0
- package/dist/accounts/auto-login-manager.js +537 -0
- package/dist/accounts/auto-login-manager.js.map +1 -0
- package/dist/accounts/crypto.d.ts +45 -0
- package/dist/accounts/crypto.d.ts.map +1 -0
- package/dist/accounts/crypto.js +138 -0
- package/dist/accounts/crypto.js.map +1 -0
- package/dist/accounts/index.d.ts +14 -0
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/accounts/index.js +14 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/types.d.ts +103 -0
- package/dist/accounts/types.d.ts.map +1 -0
- package/dist/accounts/types.js +7 -0
- package/dist/accounts/types.js.map +1 -0
- package/dist/auth/auth-manager.d.ts +9 -2
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +60 -6
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
- package/dist/auto-discovery/auto-discovery.js +2 -1
- package/dist/auto-discovery/auto-discovery.js.map +1 -1
- package/dist/cli/accounts.d.ts +13 -0
- package/dist/cli/accounts.d.ts.map +1 -0
- package/dist/cli/accounts.js +195 -0
- package/dist/cli/accounts.js.map +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-generator.d.ts +153 -0
- package/dist/content/content-generator.d.ts.map +1 -0
- package/dist/content/content-generator.js +637 -0
- package/dist/content/content-generator.js.map +1 -0
- package/dist/content/content-manager.d.ts +364 -0
- package/dist/content/content-manager.d.ts.map +1 -0
- package/dist/content/content-manager.js +3841 -0
- package/dist/content/content-manager.js.map +1 -0
- package/dist/content/content-templates.d.ts +183 -0
- package/dist/content/content-templates.d.ts.map +1 -0
- package/dist/content/content-templates.js +719 -0
- package/dist/content/content-templates.js.map +1 -0
- package/dist/content/index.d.ts +14 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +14 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/types.d.ts +285 -0
- package/dist/content/types.d.ts.map +1 -0
- package/dist/content/types.js +10 -0
- package/dist/content/types.js.map +1 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http-wrapper.d.ts +7 -0
- package/dist/http-wrapper.d.ts.map +1 -1
- package/dist/http-wrapper.js +449 -29
- package/dist/http-wrapper.js.map +1 -1
- package/dist/i18n/en.json +120 -0
- package/dist/i18n/fr.json +120 -0
- package/dist/i18n/index.d.ts +168 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +213 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts +4 -0
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +20 -3
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/session/browser-session.d.ts +35 -8
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +243 -28
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +6 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +46 -14
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts +3 -3
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +10 -7
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/stdio-http-proxy.d.ts +24 -0
- package/dist/stdio-http-proxy.d.ts.map +1 -0
- package/dist/stdio-http-proxy.js +592 -0
- package/dist/stdio-http-proxy.js.map +1 -0
- package/dist/tools/index.d.ts +106 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1028 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +81 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/citation-extractor.d.ts +66 -0
- package/dist/utils/citation-extractor.d.ts.map +1 -0
- package/dist/utils/citation-extractor.js +492 -0
- package/dist/utils/citation-extractor.js.map +1 -0
- package/dist/utils/page-utils.d.ts +8 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +112 -8
- package/dist/utils/page-utils.js.map +1 -1
- package/docs/ADDING_A_LANGUAGE.md +209 -0
- package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
- package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
- package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
- package/package.json +15 -12
- package/scripts/archive/add-and-activate-notebook.ps1 +31 -0
- package/scripts/archive/add-new-notebook.ps1 +25 -0
- package/scripts/archive/add-rom1pey.ps1 +2 -0
- package/scripts/archive/add-rpmonster.ps1 +2 -0
- package/scripts/archive/add-source-debug.ps1 +11 -0
- package/scripts/archive/add-source-e2e.ps1 +28 -0
- package/scripts/archive/add-source-visible.ps1 +11 -0
- package/scripts/archive/add-test-notebook.ps1 +13 -0
- package/scripts/archive/add-test-source.ps1 +50 -0
- package/scripts/archive/capture-screen.ps1 +11 -0
- package/scripts/archive/change-language.mjs +45 -0
- package/scripts/archive/change-language.ts +44 -0
- package/scripts/archive/check-account.ps1 +19 -0
- package/scripts/archive/check-notebook-2.ps1 +8 -0
- package/scripts/archive/check-test-notebook.ps1 +11 -0
- package/scripts/archive/create-notebook-auto.ps1 +31 -0
- package/scripts/archive/create-notebook.ps1 +8 -0
- package/scripts/archive/create-rom1pey-notebook.ps1 +19 -0
- package/scripts/archive/create-rom1pey.ps1 +8 -0
- package/scripts/archive/create-test-notebook-fresh.ps1 +21 -0
- package/scripts/archive/create-test-notebook.ps1 +16 -0
- package/scripts/archive/debug-add-source-auto.ps1 +29 -0
- package/scripts/archive/debug-add-source.ps1 +19 -0
- package/scripts/archive/debug-add-text-source.ps1 +47 -0
- package/scripts/archive/debug-home.ps1 +10 -0
- package/scripts/archive/debug-selectors.ps1 +55 -0
- package/scripts/archive/debug-sources-panel.ps1 +22 -0
- package/scripts/archive/debug-ui.ps1 +17 -0
- package/scripts/archive/discover-home.ps1 +26 -0
- package/scripts/archive/kill-automation-chrome.ps1 +37 -0
- package/scripts/archive/list-my-notebooks.ps1 +27 -0
- package/scripts/archive/navigate-home-visible.ps1 +23 -0
- package/scripts/archive/navigate-home.ps1 +15 -0
- package/scripts/archive/run-e2e-english.ps1 +111 -0
- package/scripts/archive/run-e2e-rom1pey-v2.ps1 +122 -0
- package/scripts/archive/run-e2e-rom1pey.ps1 +117 -0
- package/scripts/archive/setup-english-test.ps1 +36 -0
- package/scripts/archive/setup-test-notebook.ps1 +71 -0
- package/scripts/archive/simple-add-source.ps1 +14 -0
- package/scripts/archive/t10.ps1 +2 -0
- package/scripts/archive/t20.ps1 +4 -0
- package/scripts/archive/t30.ps1 +9 -0
- package/scripts/archive/t31.ps1 +11 -0
- package/scripts/archive/t32.ps1 +6 -0
- package/scripts/archive/t39.ps1 +5 -0
- package/scripts/archive/t40.ps1 +5 -0
- package/scripts/archive/t53.ps1 +12 -0
- package/scripts/archive/t54.ps1 +12 -0
- package/scripts/archive/t55.ps1 +11 -0
- package/scripts/archive/t9.ps1 +1 -0
- package/scripts/archive/test-access.ps1 +28 -0
- package/scripts/archive/test-add-delete-source.ps1 +64 -0
- package/scripts/archive/test-add-source-visible.ps1 +16 -0
- package/scripts/archive/test-add-source.ps1 +19 -0
- package/scripts/archive/test-add-text-debug.ps1 +28 -0
- package/scripts/archive/test-add-text-source.ps1 +8 -0
- package/scripts/archive/test-add-url-source.ps1 +7 -0
- package/scripts/archive/test-ask-ascii.ps1 +20 -0
- package/scripts/archive/test-ask-cnv.ps1 +20 -0
- package/scripts/archive/test-ask-headed.ps1 +51 -0
- package/scripts/archive/test-ask-ifs.ps1 +16 -0
- package/scripts/archive/test-ask-now.ps1 +24 -0
- package/scripts/archive/test-ask-real.ps1 +19 -0
- package/scripts/archive/test-ask-visible.ps1 +20 -0
- package/scripts/archive/test-create-notebook.ps1 +8 -0
- package/scripts/archive/test-create-then-add.ps1 +17 -0
- package/scripts/archive/test-delete-source.ps1 +41 -0
- package/scripts/archive/test-e2e-notebook.ps1 +21 -0
- package/scripts/archive/test-english-notebook.ps1 +20 -0
- package/scripts/archive/test-english.ps1 +7 -0
- package/scripts/archive/test-full-custom-instructions.ps1 +40 -0
- package/scripts/archive/test-full-infographic.ps1 +34 -0
- package/scripts/archive/test-full-language.ps1 +21 -0
- package/scripts/archive/test-full-presentation.ps1 +85 -0
- package/scripts/archive/test-full-report.ps1 +34 -0
- package/scripts/archive/test-full-source-selection.ps1 +35 -0
- package/scripts/archive/test-full-video-brief.ps1 +22 -0
- package/scripts/archive/test-full-video-explainer.ps1 +22 -0
- package/scripts/archive/test-full-video-styles.ps1 +37 -0
- package/scripts/archive/test-generate-report.ps1 +15 -0
- package/scripts/archive/test-generate-study-guide.ps1 +11 -0
- package/scripts/archive/test-headed-ask.ps1 +13 -0
- package/scripts/archive/test-headed-now.ps1 +9 -0
- package/scripts/archive/test-headed.ps1 +9 -0
- package/scripts/archive/test-hello.ps1 +7 -0
- package/scripts/archive/test-i18n-studio.ps1 +8 -0
- package/scripts/archive/test-i18n.ps1 +7 -0
- package/scripts/archive/test-manual-headed.ps1 +26 -0
- package/scripts/archive/test-mathieu-quota.ps1 +8 -0
- package/scripts/archive/test-notebook-1.ps1 +10 -0
- package/scripts/archive/test-notebook-2-sources.ps1 +12 -0
- package/scripts/archive/test-notebook1.ps1 +14 -0
- package/scripts/archive/test-personal-notebook.ps1 +14 -0
- package/scripts/archive/test-rate-limit.ps1 +19 -0
- package/scripts/archive/test-real-ask.ps1 +50 -0
- package/scripts/archive/test-real-ask2.ps1 +30 -0
- package/scripts/archive/test-rom1pey.ps1 +7 -0
- package/scripts/archive/test-rotation-complete.ps1 +14 -0
- package/scripts/archive/test-rotation.ps1 +8 -0
- package/scripts/archive/test-show-browser.ps1 +39 -0
- package/scripts/archive/test-update-notebook.ps1 +4 -0
- package/scripts/archive/verify-language-slow.ps1 +21 -0
- package/scripts/archive/verify-language.ps1 +15 -0
- package/scripts/check-server.ps1 +46 -0
- package/scripts/mcp-wsl-helper.sh +146 -0
- package/scripts/start-server.ps1 +94 -0
- package/scripts/stop-server.ps1 +30 -0
- package/scripts/switch-account-language.sh +191 -0
- package/scripts/test-account.ps1 +58 -0
- package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
- package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
- package/dist/__tests__/cleanup-manager.test.js +0 -341
- package/dist/__tests__/cleanup-manager.test.js.map +0 -1
- package/dist/__tests__/config-parsing.test.d.ts +0 -2
- package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
- package/dist/__tests__/config-parsing.test.js +0 -338
- package/dist/__tests__/config-parsing.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -267
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -166
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/logger.test.d.ts +0 -2
- package/dist/__tests__/logger.test.d.ts.map +0 -1
- package/dist/__tests__/logger.test.js +0 -324
- package/dist/__tests__/logger.test.js.map +0 -1
- package/dist/__tests__/page-utils.test.d.ts +0 -2
- package/dist/__tests__/page-utils.test.d.ts.map +0 -1
- package/dist/__tests__/page-utils.test.js +0 -349
- package/dist/__tests__/page-utils.test.js.map +0 -1
- package/dist/__tests__/setup-verification.test.d.ts +0 -2
- package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
- package/dist/__tests__/setup-verification.test.js +0 -15
- package/dist/__tests__/setup-verification.test.js.map +0 -1
- package/dist/__tests__/stealth-utils.test.d.ts +0 -2
- package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
- package/dist/__tests__/stealth-utils.test.js +0 -413
- package/dist/__tests__/stealth-utils.test.js.map +0 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -461
- package/dist/__tests__/types.test.js.map +0 -1
|
@@ -0,0 +1,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,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
|