@roomi-fields/notebooklm-mcp 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +2 -0
- package/deployment/INDEX.md +292 -0
- package/deployment/PACKAGE-FILES.txt +180 -0
- package/deployment/QUICK-START.md +100 -0
- package/deployment/docs/01-INSTALL.md +611 -0
- package/deployment/docs/02-CONFIGURATION.md +404 -0
- package/deployment/docs/03-API.md +1691 -0
- package/deployment/docs/04-N8N-INTEGRATION.md +373 -0
- package/deployment/docs/05-TROUBLESHOOTING.md +429 -0
- package/deployment/docs/06-NOTEBOOK-LIBRARY.md +692 -0
- package/deployment/docs/07-AUTO-DISCOVERY.md +236 -0
- package/deployment/docs/08-WSL-USAGE.md +363 -0
- package/deployment/docs/09-MULTI-INTERFACE.md +293 -0
- package/deployment/docs/10-CONTENT-MANAGEMENT.md +421 -0
- package/deployment/docs/11-MULTI-ACCOUNT.md +295 -0
- package/deployment/docs/README.md +207 -0
- package/deployment/scripts/README.md +564 -0
- package/deployment/scripts/install.ps1 +114 -0
- package/deployment/scripts/setup-auth.ps1 +217 -0
- package/deployment/scripts/start-server.ps1 +72 -0
- package/deployment/scripts/stop-server.ps1 +51 -0
- package/deployment/scripts/test-api.ps1 +651 -0
- package/deployment/scripts/test-auth.ps1 +323 -0
- package/deployment/scripts/test-auto-discovery.ps1 +295 -0
- package/deployment/scripts/test-cors.ps1 +398 -0
- package/deployment/scripts/test-errors.ps1 +581 -0
- package/deployment/scripts/test-server.ps1 +140 -0
- package/deployment/scripts/test-sessions.ps1 +426 -0
- package/deployment/scripts/test-validation.ps1 +299 -0
- package/dist/cli/accounts.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-manager.d.ts.map +1 -1
- package/dist/content/content-manager.js +113 -118
- package/dist/content/content-manager.js.map +1 -1
- package/dist/i18n/en.json +120 -0
- package/dist/i18n/fr.json +120 -0
- package/dist/i18n/index.d.ts +168 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +213 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +1 -0
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +2 -0
- package/dist/session/shared-context-manager.js.map +1 -1
- package/docs/ADDING_A_LANGUAGE.md +209 -0
- package/package.json +6 -3
- package/scripts/archive/add-and-activate-notebook.ps1 +31 -0
- package/scripts/archive/add-new-notebook.ps1 +25 -0
- package/scripts/archive/add-rom1pey.ps1 +2 -0
- package/scripts/archive/add-rpmonster.ps1 +2 -0
- package/scripts/archive/add-source-debug.ps1 +11 -0
- package/scripts/archive/add-source-e2e.ps1 +28 -0
- package/scripts/archive/add-source-visible.ps1 +11 -0
- package/scripts/archive/add-test-notebook.ps1 +13 -0
- package/scripts/archive/add-test-source.ps1 +50 -0
- package/scripts/archive/capture-screen.ps1 +11 -0
- package/scripts/archive/change-language.mjs +45 -0
- package/scripts/archive/change-language.ts +44 -0
- package/scripts/archive/check-account.ps1 +19 -0
- package/scripts/archive/check-notebook-2.ps1 +8 -0
- package/scripts/archive/check-test-notebook.ps1 +11 -0
- package/scripts/archive/create-notebook-auto.ps1 +31 -0
- package/scripts/archive/create-notebook.ps1 +8 -0
- package/scripts/archive/create-rom1pey-notebook.ps1 +19 -0
- package/scripts/archive/create-rom1pey.ps1 +8 -0
- package/scripts/archive/create-test-notebook-fresh.ps1 +21 -0
- package/scripts/archive/create-test-notebook.ps1 +16 -0
- package/scripts/archive/debug-add-source-auto.ps1 +29 -0
- package/scripts/archive/debug-add-source.ps1 +19 -0
- package/scripts/archive/debug-add-text-source.ps1 +47 -0
- package/scripts/archive/debug-home.ps1 +10 -0
- package/scripts/archive/debug-selectors.ps1 +55 -0
- package/scripts/archive/debug-sources-panel.ps1 +22 -0
- package/scripts/archive/debug-ui.ps1 +17 -0
- package/scripts/archive/discover-home.ps1 +26 -0
- package/scripts/archive/kill-automation-chrome.ps1 +37 -0
- package/scripts/archive/list-my-notebooks.ps1 +27 -0
- package/scripts/archive/navigate-home-visible.ps1 +23 -0
- package/scripts/archive/navigate-home.ps1 +15 -0
- package/scripts/archive/run-e2e-english.ps1 +111 -0
- package/scripts/archive/run-e2e-rom1pey-v2.ps1 +122 -0
- package/scripts/archive/run-e2e-rom1pey.ps1 +117 -0
- package/scripts/archive/setup-english-test.ps1 +36 -0
- package/scripts/archive/setup-test-notebook.ps1 +71 -0
- package/scripts/archive/simple-add-source.ps1 +14 -0
- package/scripts/archive/t10.ps1 +2 -0
- package/scripts/archive/t20.ps1 +4 -0
- package/scripts/archive/t30.ps1 +9 -0
- package/scripts/archive/t31.ps1 +11 -0
- package/scripts/archive/t32.ps1 +6 -0
- package/scripts/archive/t39.ps1 +5 -0
- package/scripts/archive/t40.ps1 +5 -0
- package/scripts/archive/t53.ps1 +12 -0
- package/scripts/archive/t54.ps1 +12 -0
- package/scripts/archive/t55.ps1 +11 -0
- package/scripts/archive/t9.ps1 +1 -0
- package/scripts/archive/test-access.ps1 +28 -0
- package/scripts/archive/test-add-delete-source.ps1 +64 -0
- package/scripts/archive/test-add-source-visible.ps1 +16 -0
- package/scripts/archive/test-add-source.ps1 +19 -0
- package/scripts/archive/test-add-text-debug.ps1 +28 -0
- package/scripts/archive/test-add-text-source.ps1 +8 -0
- package/scripts/archive/test-add-url-source.ps1 +7 -0
- package/scripts/archive/test-ask-ascii.ps1 +20 -0
- package/scripts/archive/test-ask-cnv.ps1 +20 -0
- package/scripts/archive/test-ask-headed.ps1 +51 -0
- package/scripts/archive/test-ask-ifs.ps1 +16 -0
- package/scripts/archive/test-ask-now.ps1 +24 -0
- package/scripts/archive/test-ask-real.ps1 +19 -0
- package/scripts/archive/test-ask-visible.ps1 +20 -0
- package/scripts/archive/test-create-notebook.ps1 +8 -0
- package/scripts/archive/test-create-then-add.ps1 +17 -0
- package/scripts/archive/test-delete-source.ps1 +41 -0
- package/scripts/archive/test-e2e-notebook.ps1 +21 -0
- package/scripts/archive/test-english-notebook.ps1 +20 -0
- package/scripts/archive/test-english.ps1 +7 -0
- package/scripts/archive/test-full-custom-instructions.ps1 +40 -0
- package/scripts/archive/test-full-infographic.ps1 +34 -0
- package/scripts/archive/test-full-language.ps1 +21 -0
- package/scripts/archive/test-full-presentation.ps1 +85 -0
- package/scripts/archive/test-full-report.ps1 +34 -0
- package/scripts/archive/test-full-source-selection.ps1 +35 -0
- package/scripts/archive/test-full-video-brief.ps1 +22 -0
- package/scripts/archive/test-full-video-explainer.ps1 +22 -0
- package/scripts/archive/test-full-video-styles.ps1 +37 -0
- package/scripts/archive/test-generate-report.ps1 +15 -0
- package/scripts/archive/test-generate-study-guide.ps1 +11 -0
- package/scripts/archive/test-headed-ask.ps1 +13 -0
- package/scripts/archive/test-headed-now.ps1 +9 -0
- package/scripts/archive/test-headed.ps1 +9 -0
- package/scripts/archive/test-hello.ps1 +7 -0
- package/scripts/archive/test-i18n-studio.ps1 +8 -0
- package/scripts/archive/test-i18n.ps1 +7 -0
- package/scripts/archive/test-manual-headed.ps1 +26 -0
- package/scripts/archive/test-mathieu-quota.ps1 +8 -0
- package/scripts/archive/test-notebook-1.ps1 +10 -0
- package/scripts/archive/test-notebook-2-sources.ps1 +12 -0
- package/scripts/archive/test-notebook1.ps1 +14 -0
- package/scripts/archive/test-personal-notebook.ps1 +14 -0
- package/scripts/archive/test-rate-limit.ps1 +19 -0
- package/scripts/archive/test-real-ask.ps1 +50 -0
- package/scripts/archive/test-real-ask2.ps1 +30 -0
- package/scripts/archive/test-rom1pey.ps1 +7 -0
- package/scripts/archive/test-rotation-complete.ps1 +14 -0
- package/scripts/archive/test-rotation.ps1 +8 -0
- package/scripts/archive/test-show-browser.ps1 +39 -0
- package/scripts/archive/test-update-notebook.ps1 +4 -0
- package/scripts/archive/verify-language-slow.ps1 +21 -0
- package/scripts/archive/verify-language.ps1 +15 -0
- package/scripts/check-server.ps1 +46 -0
- package/scripts/mcp-wsl-helper.sh +146 -0
- package/scripts/start-server.ps1 +94 -0
- package/scripts/stop-server.ps1 +30 -0
- package/scripts/switch-account-language.sh +191 -0
- package/scripts/test-account.ps1 +58 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Auto-Discovery Pattern
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Auto-Discovery enables autonomous resource discovery for AI orchestrators. Instead of manually cataloging notebooks, the system queries NotebookLM to generate its own metadata.
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
### Three-Level Progressive Disclosure
|
|
10
|
+
|
|
11
|
+
**Level 0 - Metadata Registry (Lightweight)**
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
library.json: 5KB for 50 notebooks
|
|
15
|
+
├── Loaded at startup
|
|
16
|
+
├── Cached in memory
|
|
17
|
+
└── Zero NotebookLM queries
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Level 1 - Contextual Matching (Local)**
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
User query → Tag/description matching → Relevant notebooks
|
|
24
|
+
Example: "gmail automation" → Match tags: ["gmail", "n8n", "automation"]
|
|
25
|
+
Cost: 0 NotebookLM queries (local only)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Level 2 - Deep Query (Rate-Limited)**
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Selected notebook → Query NotebookLM → Precise answer
|
|
32
|
+
Cost: 1 NotebookLM query (rate-limited by Google)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## For Orchestrators
|
|
36
|
+
|
|
37
|
+
### Claude Code
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
// Autonomous workflow
|
|
41
|
+
User: "Build n8n Gmail workflow"
|
|
42
|
+
|
|
43
|
+
// Claude internally:
|
|
44
|
+
1. Scan library metadata (instant)
|
|
45
|
+
2. Match: "n8n-workflows-api" (tags: ["n8n", "gmail"])
|
|
46
|
+
3. Query NotebookLM: "Gmail node configuration?"
|
|
47
|
+
4. Implement with accurate info
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### n8n
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
# Workflow node
|
|
54
|
+
HTTP Request: GET /notebooks/match?task=gmail automation
|
|
55
|
+
→ Returns: relevant notebook
|
|
56
|
+
|
|
57
|
+
HTTP Request: POST /notebooks/{id}/ask
|
|
58
|
+
→ Query: "Available Gmail triggers?"
|
|
59
|
+
→ Response: precise documentation
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Cursor / IDEs
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
// Context-aware matching
|
|
66
|
+
Developer: "How to use n8n API?"
|
|
67
|
+
→ MCP: find_relevant_notebook({ task: "n8n API" })
|
|
68
|
+
→ Match: "n8n-workflows-api"
|
|
69
|
+
→ Query notebook for details
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Metadata Generation
|
|
73
|
+
|
|
74
|
+
### Prompt to NotebookLM
|
|
75
|
+
|
|
76
|
+
The system sends this prompt to each notebook:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Analyze your complete content and respond ONLY in JSON format:
|
|
80
|
+
{
|
|
81
|
+
"name": "kebab-case-name",
|
|
82
|
+
"description": "Two sentences max.",
|
|
83
|
+
"tags": ["8-10", "keywords", "covering", "concepts", "actions", "contexts"]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Validation Rules
|
|
88
|
+
|
|
89
|
+
- **name**: 3 words max, kebab-case, no spaces
|
|
90
|
+
- **description**: 2 sentences, under 150 chars
|
|
91
|
+
- **tags**: 8-10 keywords (concepts + actions + contexts)
|
|
92
|
+
|
|
93
|
+
### Example Generated Metadata
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"name": "n8n-workflows-api",
|
|
98
|
+
"description": "Complete n8n API documentation covering workflow creation and node configuration. Includes authentication, webhooks, and error handling.",
|
|
99
|
+
"tags": [
|
|
100
|
+
"n8n",
|
|
101
|
+
"api",
|
|
102
|
+
"workflows",
|
|
103
|
+
"automation",
|
|
104
|
+
"webhooks",
|
|
105
|
+
"nodes",
|
|
106
|
+
"integration",
|
|
107
|
+
"documentation"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Benefits
|
|
113
|
+
|
|
114
|
+
### For Users
|
|
115
|
+
|
|
116
|
+
- **Zero friction**: 30 seconds to add notebook (vs 5 minutes manual)
|
|
117
|
+
- **No metadata expertise**: System generates relevant tags automatically
|
|
118
|
+
- **Scalable**: Works with 1 or 100 notebooks
|
|
119
|
+
|
|
120
|
+
### For Orchestrators
|
|
121
|
+
|
|
122
|
+
- **Autonomous discovery**: Find relevant docs without human guidance
|
|
123
|
+
- **Token efficient**: Metadata scan costs ~500 tokens (vs 50k+ full read)
|
|
124
|
+
- **Rate limit preservation**: 1 query per notebook add (vs N queries per research)
|
|
125
|
+
|
|
126
|
+
### For Product
|
|
127
|
+
|
|
128
|
+
- **Enhanced experience**: Auto-discovery enables frictionless notebook management
|
|
129
|
+
- **Scalable architecture**: Handles growing documentation libraries efficiently
|
|
130
|
+
- **Progressive disclosure**: Optimizes API usage and response times
|
|
131
|
+
|
|
132
|
+
## Comparison with Claude Skills
|
|
133
|
+
|
|
134
|
+
| Aspect | Claude Skills | NotebookLM Auto-Discovery |
|
|
135
|
+
| ----------------- | ------------------------ | ------------------------- |
|
|
136
|
+
| Metadata source | SKILL.md file | NotebookLM query |
|
|
137
|
+
| Access cost | Free (local files) | Rate-limited (Google API) |
|
|
138
|
+
| Content depth | Full docs bundled | Query on-demand |
|
|
139
|
+
| Discovery pattern | Read files progressively | Match → Query if needed |
|
|
140
|
+
| Update mechanism | Edit files | Re-query notebook |
|
|
141
|
+
|
|
142
|
+
**Key difference**: Skills are free/local, Notebooks are rate-limited/remote
|
|
143
|
+
→ **Auto-Discovery optimizes for minimal queries via smart metadata matching**
|
|
144
|
+
|
|
145
|
+
## Error Handling
|
|
146
|
+
|
|
147
|
+
### Common Issues
|
|
148
|
+
|
|
149
|
+
**Invalid metadata format**:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"error": "Invalid name format",
|
|
154
|
+
"details": "Must be kebab-case, 3 words max"
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
→ System retries with same prompt (max 2 retries)
|
|
159
|
+
|
|
160
|
+
**NotebookLM timeout**:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"error": "NotebookLM query timeout",
|
|
165
|
+
"hint": "Try again in a few seconds"
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
→ Rate limit hit, wait and retry
|
|
170
|
+
|
|
171
|
+
**Notebook not accessible**:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"error": "Notebook not found",
|
|
176
|
+
"hint": "Check notebook URL and sharing settings"
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
→ Verify notebook is shared with "Anyone with link"
|
|
181
|
+
|
|
182
|
+
## Testing
|
|
183
|
+
|
|
184
|
+
### Public Test Notebooks
|
|
185
|
+
|
|
186
|
+
The following public notebooks are available for testing auto-discovery:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Test with PowerShell script (all notebooks)
|
|
190
|
+
.\deployment\scripts\test-auto-discovery.ps1 -TestAll
|
|
191
|
+
|
|
192
|
+
# Test with specific notebook
|
|
193
|
+
.\deployment\scripts\test-auto-discovery.ps1 -NotebookUrl "https://notebooklm.google.com/notebook/0d5cd576-2583-4835-8848-a5b7b6a97cea"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Available public notebooks**:
|
|
197
|
+
|
|
198
|
+
1. `https://notebooklm.google.com/notebook/0d5cd576-2583-4835-8848-a5b7b6a97cea`
|
|
199
|
+
2. `https://notebooklm.google.com/notebook/505ee4b1-ad05-4673-a06b-1ec106c2b940`
|
|
200
|
+
3. `https://notebooklm.google.com/notebook/a09e40ad-d41f-43af-a3ca-5fc82bd459e5`
|
|
201
|
+
4. `https://notebooklm.google.com/notebook/19bde485-a9c1-4809-8884-e872b2b67b44`
|
|
202
|
+
5. `https://notebooklm.google.com/notebook/19fdf6bd-1975-40a3-9801-c554130bc64a`
|
|
203
|
+
|
|
204
|
+
### Expected Results
|
|
205
|
+
|
|
206
|
+
Each auto-discovery test should:
|
|
207
|
+
|
|
208
|
+
- ✅ Return 200 OK
|
|
209
|
+
- ✅ Generate valid kebab-case name (1-3 words)
|
|
210
|
+
- ✅ Generate description ≤150 chars
|
|
211
|
+
- ✅ Generate 8-10 relevant topics
|
|
212
|
+
- ✅ Set `auto_generated: true`
|
|
213
|
+
- ✅ Add notebook to library automatically
|
|
214
|
+
|
|
215
|
+
## Future Enhancements
|
|
216
|
+
|
|
217
|
+
### Phase 2: Smart Refresh
|
|
218
|
+
|
|
219
|
+
```typescript
|
|
220
|
+
PATCH /notebooks/:id/refresh
|
|
221
|
+
→ Re-query NotebookLM to update metadata if content changed
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Phase 3: Semantic Matching
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
GET /notebooks/match?query=gmail&semantic=true
|
|
228
|
+
→ Use embeddings for advanced matching beyond tags
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Phase 4: Usage Analytics
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
GET /notebooks/:id/related
|
|
235
|
+
→ "Notebooks often queried together"
|
|
236
|
+
```
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
# WSL Usage Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to use the NotebookLM MCP Server with Claude Code from WSL (Windows Subsystem for Linux).
|
|
4
|
+
|
|
5
|
+
## Architecture Overview
|
|
6
|
+
|
|
7
|
+
Due to browser requirements (Playwright needs Chrome), the HTTP server must run on **Windows**. Claude Code in WSL communicates with it through a stdio-HTTP proxy.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
11
|
+
│ WINDOWS │
|
|
12
|
+
│ ┌─────────────────────┐ ┌─────────────────────────────┐ │
|
|
13
|
+
│ │ HTTP Server │ │ Chrome Browser │ │
|
|
14
|
+
│ │ (node.exe) │◄──►│ (Playwright-controlled) │ │
|
|
15
|
+
│ │ localhost:3000 │ │ │ │
|
|
16
|
+
│ └─────────────────────┘ └─────────────────────────────┘ │
|
|
17
|
+
│ ▲ │
|
|
18
|
+
└────────────┼─────────────────────────────────────────────────────┘
|
|
19
|
+
│ HTTP (localhost:3000)
|
|
20
|
+
┌────────────┼─────────────────────────────────────────────────────┐
|
|
21
|
+
│ │ WSL │
|
|
22
|
+
│ ┌─────────┴───────────────────────────────────────────────────┐│
|
|
23
|
+
│ │ Claude Code ││
|
|
24
|
+
│ │ └── stdio-http-proxy.js (node.exe) ││
|
|
25
|
+
│ │ - Translates MCP stdio ←→ HTTP calls ││
|
|
26
|
+
│ │ - Points to localhost:3000 ││
|
|
27
|
+
│ └─────────────────────────────────────────────────────────────┘│
|
|
28
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### 1. Start the HTTP Server on Windows
|
|
34
|
+
|
|
35
|
+
**CRITICAL: The HTTP server MUST run on Windows, NOT in WSL**
|
|
36
|
+
|
|
37
|
+
Open a **Windows terminal** (PowerShell or CMD, not WSL):
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
cd D:\Claude\notebooklm-mcp-http
|
|
41
|
+
npm run start:http
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Verification:** The logs must show Windows paths:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Chrome Profile: C:\Users\...\AppData\Local\notebooklm-mcp\Data\chrome_profile
|
|
48
|
+
Listening on 0.0.0.0:3000
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If you see `/opt/google/chrome/chrome` in error messages, the server is running under WSL, not Windows!
|
|
52
|
+
|
|
53
|
+
### 2. Configure MCP in Your Project
|
|
54
|
+
|
|
55
|
+
Create `.mcp.json` in your project root:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"notebooklm": {
|
|
61
|
+
"type": "stdio",
|
|
62
|
+
"command": "node.exe",
|
|
63
|
+
"args": ["D:\\Claude\\notebooklm-mcp-http\\dist\\stdio-http-proxy.js"],
|
|
64
|
+
"env": {
|
|
65
|
+
"NOTEBOOKLM_HTTP_URL": "http://localhost:3000"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Important:** Use `stdio-http-proxy.js` (NOT `index.js`)
|
|
73
|
+
|
|
74
|
+
### 3. Enable the MCP Server
|
|
75
|
+
|
|
76
|
+
The first time you use it, Claude Code needs to trust the `.mcp.json` servers. Either:
|
|
77
|
+
|
|
78
|
+
- Restart Claude Code and accept when prompted
|
|
79
|
+
- Or manually add to `~/.claude.json` in your project section:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
"enabledMcpjsonServers": ["notebooklm"],
|
|
83
|
+
"hasTrustDialogAccepted": true,
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 4. Verify Configuration
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# In Claude Code, run:
|
|
90
|
+
/mcp
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
You should see `notebooklm` listed and connected.
|
|
94
|
+
|
|
95
|
+
### 5. Authenticate (First Time)
|
|
96
|
+
|
|
97
|
+
Ask Claude to authenticate:
|
|
98
|
+
|
|
99
|
+
> "Log me in to NotebookLM"
|
|
100
|
+
|
|
101
|
+
This opens Chrome on Windows for Google authentication.
|
|
102
|
+
|
|
103
|
+
## Available MCP Tools
|
|
104
|
+
|
|
105
|
+
| Tool | Description |
|
|
106
|
+
| ------------------- | ---------------------------------- |
|
|
107
|
+
| `ask_question` | Ask a question to a notebook |
|
|
108
|
+
| `list_notebooks` | List all available notebooks |
|
|
109
|
+
| `get_health` | Check server health status |
|
|
110
|
+
| `search_notebooks` | Search notebooks by keyword |
|
|
111
|
+
| `get_notebook` | Get details of a specific notebook |
|
|
112
|
+
| `add_notebook` | Add a new notebook to the library |
|
|
113
|
+
| `activate_notebook` | Set a notebook as the default |
|
|
114
|
+
|
|
115
|
+
Example usage:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
mcp__notebooklm__ask_question(question="...", notebook_id="my-notebook")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Troubleshooting
|
|
122
|
+
|
|
123
|
+
### Error: "Chrome not found at /opt/google/chrome/chrome"
|
|
124
|
+
|
|
125
|
+
**Cause:** The HTTP server is running under WSL instead of Windows.
|
|
126
|
+
|
|
127
|
+
**Solution:**
|
|
128
|
+
|
|
129
|
+
```powershell
|
|
130
|
+
# From Windows (not WSL):
|
|
131
|
+
taskkill /F /IM node.exe
|
|
132
|
+
cd D:\Claude\notebooklm-mcp-http
|
|
133
|
+
npm run start:http
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Check which process is listening on port 3000
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
netstat -ano | findstr :3000
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
If multiple processes are listed, there may be conflicts. Kill the unwanted ones:
|
|
143
|
+
|
|
144
|
+
```powershell
|
|
145
|
+
taskkill /F /PID <pid_to_kill>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Test that the server works (from Windows)
|
|
149
|
+
|
|
150
|
+
```powershell
|
|
151
|
+
curl http://localhost:3000/health
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Should return: `{"success":true,"data":{"status":"ok",...}}`
|
|
155
|
+
|
|
156
|
+
### MCP shows "Not connected"
|
|
157
|
+
|
|
158
|
+
1. Ensure the HTTP server is running on Windows
|
|
159
|
+
2. Restart Claude Code after starting the HTTP server
|
|
160
|
+
3. Check that `.mcp.json` uses `stdio-http-proxy.js` (not `index.js`)
|
|
161
|
+
|
|
162
|
+
### Port 3000 already in use
|
|
163
|
+
|
|
164
|
+
Kill all node processes and restart:
|
|
165
|
+
|
|
166
|
+
```powershell
|
|
167
|
+
taskkill /F /IM node.exe
|
|
168
|
+
cd D:\Claude\notebooklm-mcp-http
|
|
169
|
+
npm run start:http
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Authentication expired
|
|
173
|
+
|
|
174
|
+
Ask Claude: "Check NotebookLM health" or "Re-authenticate to NotebookLM"
|
|
175
|
+
|
|
176
|
+
### Chrome profile locked
|
|
177
|
+
|
|
178
|
+
Close all Chrome windows and restart:
|
|
179
|
+
|
|
180
|
+
```powershell
|
|
181
|
+
taskkill /IM chrome.exe /F
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Then restart the HTTP server.
|
|
185
|
+
|
|
186
|
+
## Configuration Reference
|
|
187
|
+
|
|
188
|
+
### Project-Level Config (`.mcp.json`)
|
|
189
|
+
|
|
190
|
+
Shareable via git, stored in project root:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"mcpServers": {
|
|
195
|
+
"notebooklm": {
|
|
196
|
+
"type": "stdio",
|
|
197
|
+
"command": "node.exe",
|
|
198
|
+
"args": ["D:\\Claude\\notebooklm-mcp-http\\dist\\stdio-http-proxy.js"],
|
|
199
|
+
"env": {
|
|
200
|
+
"NOTEBOOKLM_HTTP_URL": "http://localhost:3000"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Local Config (`~/.claude.json`)
|
|
208
|
+
|
|
209
|
+
Private to you, per-project settings in the `projects` section:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
"/mnt/d/Claude/your-project": {
|
|
213
|
+
"mcpServers": {
|
|
214
|
+
"notebooklm": {
|
|
215
|
+
"type": "stdio",
|
|
216
|
+
"command": "node.exe",
|
|
217
|
+
"args": ["D:\\Claude\\notebooklm-mcp-http\\dist\\stdio-http-proxy.js"],
|
|
218
|
+
"env": {
|
|
219
|
+
"NOTEBOOKLM_HTTP_URL": "http://localhost:3000"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Key Points
|
|
227
|
+
|
|
228
|
+
- Use `node.exe` (Windows) not `node` (Linux)
|
|
229
|
+
- Use Windows paths with double backslashes: `D:\\Claude\\...`
|
|
230
|
+
- Use `stdio-http-proxy.js` to connect to the HTTP server
|
|
231
|
+
- The HTTP server must be started separately on Windows
|
|
232
|
+
- The `.mcp.json` servers must be enabled via `enabledMcpjsonServers`
|
|
233
|
+
|
|
234
|
+
## Data Sharing Between WSL and Windows
|
|
235
|
+
|
|
236
|
+
The server stores authentication and data in:
|
|
237
|
+
|
|
238
|
+
- **Windows**: `C:\Users\<user>\AppData\Local\notebooklm-mcp\Data\`
|
|
239
|
+
- **WSL symlink**: `~/.local/share/notebooklm-mcp` → Windows path
|
|
240
|
+
|
|
241
|
+
This symlink ensures both environments share the same authentication state.
|
|
242
|
+
|
|
243
|
+
To create the symlink (if not already done):
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
rm -rf ~/.local/share/notebooklm-mcp
|
|
247
|
+
ln -sf /mnt/c/Users/<user>/AppData/Local/notebooklm-mcp/Data ~/.local/share/notebooklm-mcp
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Helper Scripts (Windows)
|
|
251
|
+
|
|
252
|
+
The project includes PowerShell scripts for managing the server:
|
|
253
|
+
|
|
254
|
+
```powershell
|
|
255
|
+
# Start server with auto-restart
|
|
256
|
+
.\scripts\start-server.ps1
|
|
257
|
+
|
|
258
|
+
# Stop server
|
|
259
|
+
.\scripts\stop-server.ps1
|
|
260
|
+
|
|
261
|
+
# Check server status
|
|
262
|
+
.\scripts\check-server.ps1
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Run in Background (Hidden Window)
|
|
266
|
+
|
|
267
|
+
```powershell
|
|
268
|
+
Start-Process powershell -ArgumentList "-ExecutionPolicy Bypass -File D:\Claude\notebooklm-mcp-http\scripts\start-server.ps1" -WindowStyle Hidden
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Windows Task Scheduler (Auto-start on Login)
|
|
272
|
+
|
|
273
|
+
1. Open Task Scheduler (`taskschd.msc`)
|
|
274
|
+
2. Create Basic Task: "NotebookLM MCP Server"
|
|
275
|
+
3. Trigger: "When I log on"
|
|
276
|
+
4. Action: Start a program
|
|
277
|
+
- Program: `powershell.exe`
|
|
278
|
+
- Arguments: `-ExecutionPolicy Bypass -WindowStyle Hidden -File "D:\Claude\notebooklm-mcp-http\scripts\start-server.ps1"`
|
|
279
|
+
5. Check "Open Properties dialog" and set "Run whether user is logged on or not"
|
|
280
|
+
|
|
281
|
+
## Authentication Procedure (TOTP/2FA)
|
|
282
|
+
|
|
283
|
+
If authentication expires, follow this procedure **from Windows**:
|
|
284
|
+
|
|
285
|
+
### Step 1: Kill existing processes
|
|
286
|
+
|
|
287
|
+
```powershell
|
|
288
|
+
taskkill /F /IM chrome.exe
|
|
289
|
+
taskkill /F /IM node.exe
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Step 2: Run accounts test with visible browser
|
|
293
|
+
|
|
294
|
+
```powershell
|
|
295
|
+
cd D:\Claude\notebooklm-mcp-http
|
|
296
|
+
npm run accounts test account-XXXXXXXXXXXXX -- --show
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
This will:
|
|
300
|
+
|
|
301
|
+
- Open Chrome with the account profile
|
|
302
|
+
- Auto-login with email/password/TOTP
|
|
303
|
+
- Navigate to NotebookLM home page
|
|
304
|
+
- Save authentication state
|
|
305
|
+
|
|
306
|
+
**Note:** "TOTP input field not found" is OK if Google skips 2FA (trusted device).
|
|
307
|
+
|
|
308
|
+
### Step 3: Sync profile to main location
|
|
309
|
+
|
|
310
|
+
```powershell
|
|
311
|
+
# From PowerShell or WSL:
|
|
312
|
+
copy C:\Users\USERNAME\AppData\Local\notebooklm-mcp\Data\accounts\account-XXXXXXXXXXXXX\browser_state\* C:\Users\USERNAME\AppData\Local\notebooklm-mcp\Data\browser_state\
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Or from WSL:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
cp /mnt/c/Users/USERNAME/AppData/Local/notebooklm-mcp/Data/accounts/account-*/browser_state/* /mnt/c/Users/USERNAME/AppData/Local/notebooklm-mcp/Data/browser_state/
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Step 4: Start HTTP server
|
|
322
|
+
|
|
323
|
+
```powershell
|
|
324
|
+
cd D:\Claude\notebooklm-mcp-http
|
|
325
|
+
npm run start:http
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## Quick Test Commands (from WSL)
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# Start server on Windows (from WSL)
|
|
332
|
+
cmd.exe /c "cd /d D:\\Claude\\notebooklm-mcp-http && start /B node dist/http-wrapper.js"
|
|
333
|
+
|
|
334
|
+
# Check health (from WSL via Windows curl)
|
|
335
|
+
cmd.exe /c "curl http://localhost:3000/health"
|
|
336
|
+
|
|
337
|
+
# Ask a question
|
|
338
|
+
cmd.exe /c 'curl -s -X POST http://localhost:3000/ask -H "Content-Type: application/json" -d "{\"question\": \"Test\", \"notebook_id\": \"notebook-1\"}"'
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## Available Notebooks
|
|
342
|
+
|
|
343
|
+
| ID | Name | URL | Topics |
|
|
344
|
+
| ---------- | ------------------ | -------------------------------------- | -------------- |
|
|
345
|
+
| notebook-1 | Example Notebook 1 | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | topic1, topic2 |
|
|
346
|
+
| notebook-2 | Example Notebook 2 | `yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy` | topic3, topic4 |
|
|
347
|
+
|
|
348
|
+
> **Note:** Replace these with your actual notebook UUIDs from NotebookLM.
|
|
349
|
+
|
|
350
|
+
## IMPORTANT: Never Run Under WSL
|
|
351
|
+
|
|
352
|
+
The HTTP server must ALWAYS run on Windows native, never under WSL.
|
|
353
|
+
|
|
354
|
+
**Why?**
|
|
355
|
+
|
|
356
|
+
- Playwright/Chrome requires Windows Chrome, not Linux Chrome
|
|
357
|
+
- WSL Chrome path (`/opt/google/chrome/chrome`) doesn't exist
|
|
358
|
+
- Running under WSL will cause: `Chromium distribution 'chrome' is not found`
|
|
359
|
+
|
|
360
|
+
**How to verify the server is on Windows:**
|
|
361
|
+
|
|
362
|
+
1. The startup logs should show Windows paths: `C:\Users\...\AppData\...`
|
|
363
|
+
2. Run `.\scripts\check-server.ps1` from PowerShell
|