@roomi-fields/notebooklm-mcp 1.5.2 → 1.5.7
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 +219 -201
- package/deployment/INDEX.md +0 -0
- package/deployment/PACKAGE-FILES.txt +180 -180
- package/deployment/QUICK-START.md +0 -0
- package/deployment/docs/01-INSTALL.md +0 -0
- package/deployment/docs/02-CONFIGURATION.md +0 -0
- package/deployment/docs/03-API.md +99 -13
- package/deployment/docs/04-N8N-INTEGRATION.md +0 -0
- package/deployment/docs/05-TROUBLESHOOTING.md +0 -0
- package/deployment/docs/06-NOTEBOOK-LIBRARY.md +0 -0
- package/deployment/docs/07-AUTO-DISCOVERY.md +0 -0
- package/deployment/docs/08-DOCKER.md +303 -0
- package/deployment/docs/08-WSL-USAGE.md +0 -0
- package/deployment/docs/09-MULTI-INTERFACE.md +0 -0
- package/deployment/docs/10-CONTENT-MANAGEMENT.md +0 -0
- package/deployment/docs/11-MULTI-ACCOUNT.md +0 -0
- package/deployment/docs/README.md +9 -2
- package/deployment/scripts/README.md +0 -0
- package/deployment/scripts/install.ps1 +114 -114
- package/deployment/scripts/setup-auth.ps1 +217 -217
- package/deployment/scripts/start-server.ps1 +72 -72
- package/deployment/scripts/stop-server.ps1 +51 -51
- package/deployment/scripts/test-api.ps1 +651 -651
- package/deployment/scripts/test-auth.ps1 +0 -0
- package/deployment/scripts/test-auto-discovery.ps1 +295 -295
- package/deployment/scripts/test-cors.ps1 +398 -398
- package/deployment/scripts/test-errors.ps1 +581 -581
- package/deployment/scripts/test-server.ps1 +140 -140
- package/deployment/scripts/test-sessions.ps1 +426 -426
- package/deployment/scripts/test-validation.ps1 +299 -299
- package/dist/accounts/account-manager.d.ts +15 -0
- package/dist/accounts/account-manager.d.ts.map +1 -1
- package/dist/accounts/account-manager.js +104 -0
- package/dist/accounts/account-manager.js.map +1 -1
- package/dist/accounts/auto-login-manager.d.ts +0 -0
- package/dist/accounts/auto-login-manager.d.ts.map +1 -1
- package/dist/accounts/auto-login-manager.js +45 -28
- package/dist/accounts/auto-login-manager.js.map +1 -1
- package/dist/accounts/crypto.d.ts +0 -0
- package/dist/accounts/crypto.d.ts.map +0 -0
- package/dist/accounts/crypto.js +0 -0
- package/dist/accounts/crypto.js.map +0 -0
- package/dist/accounts/index.d.ts +0 -0
- package/dist/accounts/index.d.ts.map +0 -0
- package/dist/accounts/index.js +0 -0
- package/dist/accounts/index.js.map +0 -0
- package/dist/accounts/types.d.ts +0 -0
- package/dist/accounts/types.d.ts.map +0 -0
- package/dist/accounts/types.js +0 -0
- package/dist/accounts/types.js.map +0 -0
- package/dist/auth/auth-manager.d.ts +1 -1
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +33 -13
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auto-discovery/auto-discovery.d.ts +0 -0
- package/dist/auto-discovery/auto-discovery.d.ts.map +0 -0
- package/dist/auto-discovery/auto-discovery.js +0 -0
- package/dist/auto-discovery/auto-discovery.js.map +0 -0
- package/dist/cli/accounts.d.ts +0 -0
- package/dist/cli/accounts.d.ts.map +0 -0
- package/dist/cli/accounts.js +0 -0
- package/dist/cli/accounts.js.map +0 -0
- package/dist/cli/de-auth.d.ts +0 -0
- package/dist/cli/de-auth.d.ts.map +0 -0
- package/dist/cli/de-auth.js +0 -0
- package/dist/cli/de-auth.js.map +0 -0
- package/dist/cli/help.d.ts +0 -0
- package/dist/cli/help.d.ts.map +0 -0
- package/dist/cli/help.js +0 -0
- package/dist/cli/help.js.map +0 -0
- package/dist/cli/setup-auth.d.ts +0 -0
- package/dist/cli/setup-auth.d.ts.map +0 -0
- package/dist/cli/setup-auth.js +18 -10
- package/dist/cli/setup-auth.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -1
- package/dist/config.js.map +1 -1
- package/dist/content/content-generator.d.ts +0 -0
- package/dist/content/content-generator.d.ts.map +0 -0
- package/dist/content/content-generator.js +0 -0
- package/dist/content/content-generator.js.map +0 -0
- package/dist/content/content-manager.d.ts +0 -0
- package/dist/content/content-manager.d.ts.map +0 -0
- package/dist/content/content-manager.js +0 -0
- package/dist/content/content-manager.js.map +0 -0
- package/dist/content/content-templates.d.ts +0 -0
- package/dist/content/content-templates.d.ts.map +0 -0
- package/dist/content/content-templates.js +0 -0
- package/dist/content/content-templates.js.map +0 -0
- package/dist/content/index.d.ts +0 -0
- package/dist/content/index.d.ts.map +0 -0
- package/dist/content/index.js +0 -0
- package/dist/content/index.js.map +0 -0
- package/dist/content/types.d.ts +0 -0
- package/dist/content/types.d.ts.map +0 -0
- package/dist/content/types.js +0 -0
- package/dist/content/types.js.map +0 -0
- package/dist/errors.d.ts +0 -0
- package/dist/errors.d.ts.map +0 -0
- package/dist/errors.js +0 -0
- package/dist/errors.js.map +0 -0
- package/dist/http-wrapper.d.ts +0 -0
- package/dist/http-wrapper.d.ts.map +1 -1
- package/dist/http-wrapper.js +275 -7
- package/dist/http-wrapper.js.map +1 -1
- package/dist/i18n/en.json +0 -0
- package/dist/i18n/fr.json +0 -0
- package/dist/i18n/index.d.ts +0 -0
- package/dist/i18n/index.d.ts.map +0 -0
- package/dist/i18n/index.js +0 -0
- package/dist/i18n/index.js.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +0 -0
- package/dist/index.js.map +0 -0
- package/dist/library/notebook-library.d.ts +0 -0
- package/dist/library/notebook-library.d.ts.map +0 -0
- package/dist/library/notebook-library.js +0 -0
- package/dist/library/notebook-library.js.map +0 -0
- package/dist/library/types.d.ts +0 -0
- package/dist/library/types.d.ts.map +0 -0
- package/dist/library/types.js +0 -0
- package/dist/library/types.js.map +0 -0
- package/dist/session/browser-session.d.ts +0 -0
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +215 -91
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +0 -0
- package/dist/session/session-manager.d.ts.map +0 -0
- package/dist/session/session-manager.js +0 -0
- package/dist/session/session-manager.js.map +0 -0
- package/dist/session/shared-context-manager.d.ts +0 -0
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +38 -5
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/startup/startup-manager.d.ts +60 -0
- package/dist/startup/startup-manager.d.ts.map +1 -0
- package/dist/startup/startup-manager.js +468 -0
- package/dist/startup/startup-manager.js.map +1 -0
- package/dist/stdio-http-proxy.d.ts +0 -0
- package/dist/stdio-http-proxy.d.ts.map +0 -0
- package/dist/stdio-http-proxy.js +91 -16
- package/dist/stdio-http-proxy.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +55 -34
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +0 -0
- package/dist/types.d.ts.map +0 -0
- package/dist/types.js +0 -0
- package/dist/types.js.map +0 -0
- package/dist/utils/citation-extractor.d.ts +6 -7
- package/dist/utils/citation-extractor.d.ts.map +1 -1
- package/dist/utils/citation-extractor.js +138 -303
- package/dist/utils/citation-extractor.js.map +1 -1
- package/dist/utils/cleanup-manager.d.ts +0 -0
- package/dist/utils/cleanup-manager.d.ts.map +0 -0
- package/dist/utils/cleanup-manager.js +0 -0
- package/dist/utils/cleanup-manager.js.map +0 -0
- package/dist/utils/logger.d.ts +0 -0
- package/dist/utils/logger.d.ts.map +0 -0
- package/dist/utils/logger.js +0 -0
- package/dist/utils/logger.js.map +0 -0
- package/dist/utils/page-utils.d.ts +0 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +12 -13
- package/dist/utils/page-utils.js.map +1 -1
- package/dist/utils/stealth-utils.d.ts +0 -0
- package/dist/utils/stealth-utils.d.ts.map +0 -0
- package/dist/utils/stealth-utils.js +0 -0
- package/dist/utils/stealth-utils.js.map +0 -0
- package/docs/ADDING_A_LANGUAGE.md +0 -0
- package/docs/ARCHITECTURE_MIGRATION_STUDY.md +0 -0
- package/docs/CHROME_PROFILE_LIMITATION.md +0 -0
- package/docs/MULTI_ACCOUNT_SYSTEM.md +0 -0
- package/docs/archive/auto-discovery-complet.md +906 -0
- package/package.json +4 -2
- package/scripts/add-totp.ts +110 -0
- package/scripts/archive/add-and-activate-notebook.ps1 +0 -0
- package/scripts/archive/add-new-notebook.ps1 +0 -0
- package/scripts/archive/add-rom1pey.ps1 +0 -0
- package/scripts/archive/add-rpmonster.ps1 +0 -0
- package/scripts/archive/add-source-debug.ps1 +0 -0
- package/scripts/archive/add-source-e2e.ps1 +0 -0
- package/scripts/archive/add-source-visible.ps1 +0 -0
- package/scripts/archive/add-test-notebook.ps1 +0 -0
- package/scripts/archive/add-test-source.ps1 +0 -0
- package/scripts/archive/capture-screen.ps1 +0 -0
- package/scripts/archive/change-language.mjs +0 -0
- package/scripts/archive/change-language.ts +0 -0
- package/scripts/archive/check-account.ps1 +0 -0
- package/scripts/archive/check-notebook-2.ps1 +0 -0
- package/scripts/archive/check-test-notebook.ps1 +0 -0
- package/scripts/archive/create-notebook-auto.ps1 +0 -0
- package/scripts/archive/create-notebook.ps1 +0 -0
- package/scripts/archive/create-rom1pey-notebook.ps1 +0 -0
- package/scripts/archive/create-rom1pey.ps1 +0 -0
- package/scripts/archive/create-test-notebook-fresh.ps1 +0 -0
- package/scripts/archive/create-test-notebook.ps1 +0 -0
- package/scripts/archive/debug-add-source-auto.ps1 +0 -0
- package/scripts/archive/debug-add-source.ps1 +0 -0
- package/scripts/archive/debug-add-text-source.ps1 +0 -0
- package/scripts/archive/debug-home.ps1 +0 -0
- package/scripts/archive/debug-selectors.ps1 +0 -0
- package/scripts/archive/debug-sources-panel.ps1 +0 -0
- package/scripts/archive/debug-ui.ps1 +0 -0
- package/scripts/archive/discover-home.ps1 +0 -0
- package/scripts/archive/kill-automation-chrome.ps1 +0 -0
- package/scripts/archive/list-my-notebooks.ps1 +0 -0
- package/scripts/archive/navigate-home-visible.ps1 +0 -0
- package/scripts/archive/navigate-home.ps1 +0 -0
- package/scripts/archive/run-e2e-english.ps1 +0 -0
- package/scripts/archive/run-e2e-rom1pey-v2.ps1 +0 -0
- package/scripts/archive/run-e2e-rom1pey.ps1 +0 -0
- package/scripts/archive/setup-english-test.ps1 +0 -0
- package/scripts/archive/setup-test-notebook.ps1 +0 -0
- package/scripts/archive/simple-add-source.ps1 +0 -0
- package/scripts/archive/t10.ps1 +0 -0
- package/scripts/archive/t20.ps1 +0 -0
- package/scripts/archive/t30.ps1 +0 -0
- package/scripts/archive/t31.ps1 +0 -0
- package/scripts/archive/t32.ps1 +0 -0
- package/scripts/archive/t39.ps1 +0 -0
- package/scripts/archive/t40.ps1 +0 -0
- package/scripts/archive/t53.ps1 +0 -0
- package/scripts/archive/t54.ps1 +0 -0
- package/scripts/archive/t55.ps1 +0 -0
- package/scripts/archive/t9.ps1 +0 -0
- package/scripts/archive/test-access.ps1 +0 -0
- package/scripts/archive/test-add-delete-source.ps1 +0 -0
- package/scripts/archive/test-add-source-visible.ps1 +0 -0
- package/scripts/archive/test-add-source.ps1 +0 -0
- package/scripts/archive/test-add-text-debug.ps1 +0 -0
- package/scripts/archive/test-add-text-source.ps1 +0 -0
- package/scripts/archive/test-add-url-source.ps1 +0 -0
- package/scripts/archive/test-ask-ascii.ps1 +0 -0
- package/scripts/archive/test-ask-cnv.ps1 +0 -0
- package/scripts/archive/test-ask-headed.ps1 +0 -0
- package/scripts/archive/test-ask-ifs.ps1 +0 -0
- package/scripts/archive/test-ask-now.ps1 +0 -0
- package/scripts/archive/test-ask-real.ps1 +0 -0
- package/scripts/archive/test-ask-visible.ps1 +0 -0
- package/scripts/archive/test-create-notebook.ps1 +0 -0
- package/scripts/archive/test-create-then-add.ps1 +0 -0
- package/scripts/archive/test-delete-source.ps1 +0 -0
- package/scripts/archive/test-e2e-notebook.ps1 +0 -0
- package/scripts/archive/test-english-notebook.ps1 +0 -0
- package/scripts/archive/test-english.ps1 +0 -0
- package/scripts/archive/test-full-custom-instructions.ps1 +0 -0
- package/scripts/archive/test-full-infographic.ps1 +0 -0
- package/scripts/archive/test-full-language.ps1 +0 -0
- package/scripts/archive/test-full-presentation.ps1 +0 -0
- package/scripts/archive/test-full-report.ps1 +0 -0
- package/scripts/archive/test-full-source-selection.ps1 +0 -0
- package/scripts/archive/test-full-video-brief.ps1 +0 -0
- package/scripts/archive/test-full-video-explainer.ps1 +0 -0
- package/scripts/archive/test-full-video-styles.ps1 +0 -0
- package/scripts/archive/test-generate-report.ps1 +0 -0
- package/scripts/archive/test-generate-study-guide.ps1 +0 -0
- package/scripts/archive/test-headed-ask.ps1 +0 -0
- package/scripts/archive/test-headed-now.ps1 +0 -0
- package/scripts/archive/test-headed.ps1 +0 -0
- package/scripts/archive/test-hello.ps1 +0 -0
- package/scripts/archive/test-i18n-studio.ps1 +0 -0
- package/scripts/archive/test-i18n.ps1 +0 -0
- package/scripts/archive/test-manual-headed.ps1 +0 -0
- package/scripts/archive/test-mathieu-quota.ps1 +0 -0
- package/scripts/archive/test-notebook-1.ps1 +0 -0
- package/scripts/archive/test-notebook-2-sources.ps1 +0 -0
- package/scripts/archive/test-notebook1.ps1 +0 -0
- package/scripts/archive/test-personal-notebook.ps1 +0 -0
- package/scripts/archive/test-rate-limit.ps1 +0 -0
- package/scripts/archive/test-real-ask.ps1 +0 -0
- package/scripts/archive/test-real-ask2.ps1 +0 -0
- package/scripts/archive/test-rom1pey.ps1 +0 -0
- package/scripts/archive/test-rotation-complete.ps1 +0 -0
- package/scripts/archive/test-rotation.ps1 +0 -0
- package/scripts/archive/test-show-browser.ps1 +0 -0
- package/scripts/archive/test-update-notebook.ps1 +0 -0
- package/scripts/archive/verify-language-slow.ps1 +0 -0
- package/scripts/archive/verify-language.ps1 +0 -0
- package/scripts/check-server.ps1 +0 -0
- package/scripts/docker-entrypoint.sh +25 -0
- package/scripts/mcp-proxy-hidden.ps1 +31 -0
- package/scripts/mcp-wsl-helper.sh +146 -146
- package/scripts/start-server-hidden.vbs +13 -0
- package/scripts/start-server.ps1 +0 -0
- package/scripts/start-vnc.sh +37 -0
- package/scripts/stop-server.bat +5 -0
- package/scripts/stop-server.ps1 +0 -0
- package/scripts/switch-account-language.sh +0 -0
- package/scripts/test-account.ps1 +0 -0
|
@@ -1,146 +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
|
|
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
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
' NotebookLM MCP Server - Démarrage silencieux
|
|
2
|
+
' Lance le serveur HTTP sans fenêtre visible
|
|
3
|
+
' Pour démarrage automatique : ajouter au dossier Démarrage Windows
|
|
4
|
+
|
|
5
|
+
Set WshShell = CreateObject("WScript.Shell")
|
|
6
|
+
WshShell.CurrentDirectory = "D:\Claude\notebooklm-mcp-http"
|
|
7
|
+
|
|
8
|
+
' Définir les variables d'environnement
|
|
9
|
+
Set WshEnv = WshShell.Environment("Process")
|
|
10
|
+
WshEnv("DATA_DIR") = "C:\Users\romai\AppData\Local\notebooklm-mcp\Data"
|
|
11
|
+
|
|
12
|
+
' Lancer le serveur en mode caché (0 = hidden)
|
|
13
|
+
WshShell.Run "node dist/http-wrapper.js", 0, False
|
package/scripts/start-server.ps1
CHANGED
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Start VNC services for browser visibility in Docker
|
|
3
|
+
# This allows users to see and interact with Chromium via noVNC web interface
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
DISPLAY_NUM="${DISPLAY_NUM:-99}"
|
|
8
|
+
VNC_PORT="${VNC_PORT:-5900}"
|
|
9
|
+
NOVNC_PORT="${NOVNC_PORT:-6080}"
|
|
10
|
+
SCREEN_RESOLUTION="${SCREEN_RESOLUTION:-1280x800x24}"
|
|
11
|
+
|
|
12
|
+
export DISPLAY=":${DISPLAY_NUM}"
|
|
13
|
+
|
|
14
|
+
echo "[VNC] Starting Xvfb on display :${DISPLAY_NUM}..."
|
|
15
|
+
Xvfb :${DISPLAY_NUM} -screen 0 ${SCREEN_RESOLUTION} -ac &
|
|
16
|
+
sleep 1
|
|
17
|
+
|
|
18
|
+
echo "[VNC] Starting fluxbox window manager..."
|
|
19
|
+
fluxbox &
|
|
20
|
+
sleep 1
|
|
21
|
+
|
|
22
|
+
echo "[VNC] Starting x11vnc on port ${VNC_PORT}..."
|
|
23
|
+
x11vnc -display :${DISPLAY_NUM} -forever -shared -rfbport ${VNC_PORT} -nopw -xkb &
|
|
24
|
+
sleep 1
|
|
25
|
+
|
|
26
|
+
echo "[VNC] Starting noVNC websockify on port ${NOVNC_PORT}..."
|
|
27
|
+
# noVNC location on Debian
|
|
28
|
+
NOVNC_DIR="/usr/share/novnc"
|
|
29
|
+
if [ -d "$NOVNC_DIR" ]; then
|
|
30
|
+
websockify --web=${NOVNC_DIR} ${NOVNC_PORT} localhost:${VNC_PORT} &
|
|
31
|
+
else
|
|
32
|
+
echo "[VNC] Warning: noVNC directory not found at ${NOVNC_DIR}"
|
|
33
|
+
websockify ${NOVNC_PORT} localhost:${VNC_PORT} &
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
echo "[VNC] VNC services started successfully"
|
|
37
|
+
echo "[VNC] Access browser at: http://localhost:${NOVNC_PORT}/vnc.html"
|
package/scripts/stop-server.ps1
CHANGED
|
File without changes
|
|
File without changes
|
package/scripts/test-account.ps1
CHANGED
|
File without changes
|