@pan-sec/notebooklm-mcp 1.8.0 → 1.9.0
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/README.md +382 -56
- package/dist/gemini/gemini-client.d.ts +42 -1
- package/dist/gemini/gemini-client.d.ts.map +1 -1
- package/dist/gemini/gemini-client.js +262 -0
- package/dist/gemini/gemini-client.js.map +1 -1
- package/dist/gemini/types.d.ts +96 -0
- package/dist/gemini/types.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/definitions/gemini.d.ts.map +1 -1
- package/dist/tools/definitions/gemini.js +165 -0
- package/dist/tools/definitions/gemini.js.map +1 -1
- package/dist/tools/handlers.d.ts +31 -0
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +146 -0
- package/dist/tools/handlers.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# NotebookLM MCP Server (Security Hardened)
|
|
4
4
|
|
|
5
|
-
**Zero-hallucination answers from NotebookLM —
|
|
5
|
+
**Zero-hallucination answers from NotebookLM + Gemini Deep Research — with enterprise-grade security**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@pan-sec/notebooklm-mcp)
|
|
8
8
|
[](https://www.typescriptlang.org/)
|
|
@@ -10,18 +10,309 @@
|
|
|
10
10
|
[](#cross-platform-support)
|
|
11
11
|
[](./SECURITY.md)
|
|
12
12
|
[](./SECURITY.md#post-quantum-encryption)
|
|
13
|
+
[](#-gemini-deep-research-v180)
|
|
14
|
+
[](#-document-api-v190)
|
|
15
|
+
[](#programmatic-notebook-creation-v170)
|
|
13
16
|
[](./docs/COMPLIANCE-SPEC.md)
|
|
14
17
|
[](./tests/)
|
|
15
18
|
|
|
16
|
-
[
|
|
19
|
+
[**Gemini Deep Research**](#-gemini-deep-research-v180) • [**Document API**](#-document-api-v190) • [**Notebook Creation**](#programmatic-notebook-creation-v170) • [Security](#security-features) • [Install](#installation)
|
|
17
20
|
|
|
18
21
|
</div>
|
|
19
22
|
|
|
20
|
-
>
|
|
23
|
+
> **Security-hardened fork** of [PleasePrompto/notebooklm-mcp](https://github.com/PleasePrompto/notebooklm-mcp)
|
|
21
24
|
> Maintained by [Pantheon Security](https://pantheonsecurity.io)
|
|
22
25
|
|
|
23
26
|
---
|
|
24
27
|
|
|
28
|
+
## Gemini Deep Research (v1.8.0)
|
|
29
|
+
|
|
30
|
+
**The most powerful research capability for AI agents — now in your MCP toolkit.**
|
|
31
|
+
|
|
32
|
+
v1.8.0 introduces the **Gemini Interactions API** as a stable, API-based research backend alongside browser automation. This gives your agents access to Google's state-of-the-art Deep Research agent.
|
|
33
|
+
|
|
34
|
+
### Why This Matters
|
|
35
|
+
|
|
36
|
+
| Challenge | Solution |
|
|
37
|
+
|-----------|----------|
|
|
38
|
+
| Browser UI changes break automation | **Gemini API is stable and versioned** |
|
|
39
|
+
| Need comprehensive research but no research agent | **Deep Research agent does it for you** |
|
|
40
|
+
| Want current information with citations | **Google Search grounding built-in** |
|
|
41
|
+
| Need reliable, fast queries | **API-based = no UI dependencies** |
|
|
42
|
+
|
|
43
|
+
### New Tools
|
|
44
|
+
|
|
45
|
+
#### `deep_research` — Comprehensive Research Agent
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
"Research the security implications of post-quantum cryptography adoption in financial services"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- Runs Google's **Deep Research agent** (same as Gemini Advanced)
|
|
52
|
+
- Takes 1-5 minutes for comprehensive, web-grounded analysis
|
|
53
|
+
- Returns structured answers with **citations and sources**
|
|
54
|
+
- Perfect for complex topics requiring multi-source synthesis
|
|
55
|
+
|
|
56
|
+
#### `gemini_query` — Fast Grounded Queries
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
"What are the latest CVEs for Log4j in 2025?" (with Google Search)
|
|
60
|
+
"Calculate the compound interest on $10,000 at 5% over 10 years" (with code execution)
|
|
61
|
+
"Summarize this security advisory: [URL]" (with URL context)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- **Google Search grounding** — Current information, not just training data
|
|
65
|
+
- **Code execution** — Run calculations, data analysis
|
|
66
|
+
- **URL context** — Analyze web pages on demand
|
|
67
|
+
- Models: `gemini-2.5-flash` (fast), `gemini-2.5-pro` (powerful), `gemini-3-flash-preview` (latest)
|
|
68
|
+
|
|
69
|
+
#### `get_research_status` — Background Task Monitoring
|
|
70
|
+
|
|
71
|
+
Run deep research in the background and check progress:
|
|
72
|
+
```
|
|
73
|
+
"Start researching [topic] in the background"
|
|
74
|
+
... continue other work ...
|
|
75
|
+
"Check research status for interaction_abc123"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Hybrid Architecture
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
┌──────────────────────────────────────────────────────────────────────────────┐
|
|
82
|
+
│ NotebookLM MCP Server v1.9.0 │
|
|
83
|
+
├──────────────────────────────────────────────────────────────────────────────┤
|
|
84
|
+
│ │
|
|
85
|
+
│ ┌────────────────────────────────┐ ┌──────────────────────────────────┐ │
|
|
86
|
+
│ │ BROWSER AUTOMATION │ │ GEMINI API │ │
|
|
87
|
+
│ │ (Your Documents) │ │ (Research & Documents) │ │
|
|
88
|
+
│ ├────────────────────────────────┤ ├──────────────────────────────────┤ │
|
|
89
|
+
│ │ │ │ │ │
|
|
90
|
+
│ │ QUERY │ │ RESEARCH v1.8 │ │
|
|
91
|
+
│ │ • ask_question │ │ • deep_research │ │
|
|
92
|
+
│ │ │ │ • gemini_query │ │
|
|
93
|
+
│ │ CREATE & MANAGE v1.7 │ │ • get_research_status │ │
|
|
94
|
+
│ │ • create_notebook │ │ │ │
|
|
95
|
+
│ │ • batch_create_notebooks │ │ DOCUMENTS (NEW!) v1.9 │ │
|
|
96
|
+
│ │ • manage_sources │ │ • upload_document │ │
|
|
97
|
+
│ │ • generate_audio │ │ • query_document │ │
|
|
98
|
+
│ │ • sync_notebook │ │ • list_documents │ │
|
|
99
|
+
│ │ │ │ • delete_document │ │
|
|
100
|
+
│ │ Grounded on YOUR docs │ │ │ │
|
|
101
|
+
│ │ Permanent storage │ │ Fast API • 48h retention │ │
|
|
102
|
+
│ └────────────────────────────────┘ └──────────────────────────────────┘ │
|
|
103
|
+
│ │
|
|
104
|
+
│ ┌─────────────────────────────────┐ │
|
|
105
|
+
│ │ 14 SECURITY LAYERS │ │
|
|
106
|
+
│ │ Post-Quantum • Audit Logs │ │
|
|
107
|
+
│ │ Cert Pinning • Memory Wipe │ │
|
|
108
|
+
│ │ GDPR • SOC2 • CSSF Ready │ │
|
|
109
|
+
│ └─────────────────────────────────┘ │
|
|
110
|
+
└──────────────────────────────────────────────────────────────────────────────┘
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Gemini Configuration
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Required for Gemini features
|
|
117
|
+
GEMINI_API_KEY=your-api-key # Get from https://aistudio.google.com/apikey
|
|
118
|
+
|
|
119
|
+
# Optional settings
|
|
120
|
+
GEMINI_DEFAULT_MODEL=gemini-2.5-flash # Default model
|
|
121
|
+
GEMINI_DEEP_RESEARCH_ENABLED=true # Enable Deep Research
|
|
122
|
+
GEMINI_TIMEOUT_MS=30000 # API timeout
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### When to Use Which
|
|
126
|
+
|
|
127
|
+
| Task | Best Tool | Why |
|
|
128
|
+
|------|-----------|-----|
|
|
129
|
+
| Questions about YOUR documents | `ask_question` | Grounded on your uploaded sources |
|
|
130
|
+
| Comprehensive topic research | `deep_research` | Multi-source synthesis with citations |
|
|
131
|
+
| Current events / recent info | `gemini_query` + google_search | Live web data |
|
|
132
|
+
| Code calculations | `gemini_query` + code_execution | Reliable computation |
|
|
133
|
+
| Analyze a webpage | `gemini_query` + url_context | Direct page analysis |
|
|
134
|
+
| **Quick PDF/document analysis** | `upload_document` + `query_document` | **Fast API, no browser** (NEW!) |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 📄 Document API (v1.9.0)
|
|
139
|
+
|
|
140
|
+
**Upload and query documents directly via Gemini API — no browser automation needed.**
|
|
141
|
+
|
|
142
|
+
v1.9.0 introduces the **Gemini Files API** for fast, reliable document analysis. Upload PDFs, analyze them instantly, and delete when done.
|
|
143
|
+
|
|
144
|
+
### Why This Matters
|
|
145
|
+
|
|
146
|
+
| Feature | Browser Mode | Document API |
|
|
147
|
+
|---------|--------------|--------------|
|
|
148
|
+
| Speed | Seconds | **Milliseconds** |
|
|
149
|
+
| Reliability | UI-dependent | **API-stable** |
|
|
150
|
+
| File Support | Via NotebookLM | **50MB PDFs, 1000 pages** |
|
|
151
|
+
| Retention | Permanent | 48 hours |
|
|
152
|
+
| Setup | Auth + cookies | **Just API key** |
|
|
153
|
+
|
|
154
|
+
### New Tools
|
|
155
|
+
|
|
156
|
+
#### `upload_document` — Fast Document Upload
|
|
157
|
+
|
|
158
|
+
Upload any document to Gemini for instant querying:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Upload /path/to/research-paper.pdf
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
- **Supported**: PDF (50MB, 1000 pages), TXT, MD, HTML, CSV, JSON, DOCX, images, audio, video
|
|
165
|
+
- **48-hour retention** — files auto-expire, or delete manually
|
|
166
|
+
- Returns a file ID for querying
|
|
167
|
+
|
|
168
|
+
#### `query_document` — Ask Questions About Documents
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
"What are the main findings in this research paper?"
|
|
172
|
+
"Summarize section 3 of the document"
|
|
173
|
+
"Extract all statistics mentioned in the PDF"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
- Full document understanding (text, tables, charts, diagrams)
|
|
177
|
+
- Multi-document queries (compare multiple files)
|
|
178
|
+
- Fast API response (no browser wait)
|
|
179
|
+
|
|
180
|
+
#### `list_documents` — See All Uploaded Files
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
List all my uploaded documents
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Shows file names, sizes, MIME types, and expiration times.
|
|
187
|
+
|
|
188
|
+
#### `delete_document` — Clean Up Sensitive Files
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
Delete file xyz123
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Immediately remove files (don't wait for 48h expiration).
|
|
195
|
+
|
|
196
|
+
### Workflow Example
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
1. upload_document("/research/paper.pdf")
|
|
200
|
+
→ Returns: files/abc123
|
|
201
|
+
|
|
202
|
+
2. query_document("files/abc123", "What methodology was used?")
|
|
203
|
+
→ Returns: "The paper uses a mixed-methods approach combining..."
|
|
204
|
+
|
|
205
|
+
3. query_document("files/abc123", "List all cited authors")
|
|
206
|
+
→ Returns: "Smith et al. (2024), Johnson (2023)..."
|
|
207
|
+
|
|
208
|
+
4. delete_document("files/abc123")
|
|
209
|
+
→ File removed
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### When to Use Document API vs NotebookLM
|
|
213
|
+
|
|
214
|
+
| Scenario | Use |
|
|
215
|
+
|----------|-----|
|
|
216
|
+
| Quick one-off document analysis | **Document API** — fast, no setup |
|
|
217
|
+
| Building a permanent knowledge base | **NotebookLM** — permanent storage |
|
|
218
|
+
| Analyzing sensitive documents | **Document API** — 48h auto-delete |
|
|
219
|
+
| Multi-source research over time | **NotebookLM** — organized notebooks |
|
|
220
|
+
| CI/CD pipeline document processing | **Document API** — API-native |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Programmatic Notebook Creation (v1.7.0+)
|
|
225
|
+
|
|
226
|
+
**Create NotebookLM notebooks entirely from code — no manual clicks required.**
|
|
227
|
+
|
|
228
|
+
Most MCP servers can only *read* from NotebookLM. This one can **create notebooks, add sources, and generate audio** — all programmatically.
|
|
229
|
+
|
|
230
|
+
### `create_notebook` — Build Notebooks Instantly
|
|
231
|
+
|
|
232
|
+
Create a complete notebook with multiple sources in one command:
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"name": "Security Research 2025",
|
|
237
|
+
"sources": [
|
|
238
|
+
{ "type": "url", "value": "https://owasp.org/Top10" },
|
|
239
|
+
{ "type": "file", "value": "/path/to/security-report.pdf" },
|
|
240
|
+
{ "type": "text", "value": "Custom analysis notes...", "title": "My Notes" }
|
|
241
|
+
],
|
|
242
|
+
"description": "OWASP security best practices",
|
|
243
|
+
"topics": ["security", "owasp", "vulnerabilities"]
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Supported source types:**
|
|
248
|
+
- **URL** — Web pages, documentation, articles
|
|
249
|
+
- **File** — PDF, DOCX, TXT, and more
|
|
250
|
+
- **Text** — Raw text, code snippets, notes
|
|
251
|
+
|
|
252
|
+
### `batch_create_notebooks` — Scale Up
|
|
253
|
+
|
|
254
|
+
Create **up to 10 notebooks** in a single operation:
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"notebooks": [
|
|
259
|
+
{ "name": "React Docs", "sources": [{ "type": "url", "value": "https://react.dev/reference" }] },
|
|
260
|
+
{ "name": "Node.js API", "sources": [{ "type": "url", "value": "https://nodejs.org/api/" }] },
|
|
261
|
+
{ "name": "TypeScript Handbook", "sources": [{ "type": "url", "value": "https://www.typescriptlang.org/docs/" }] }
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Perfect for:
|
|
267
|
+
- Setting up project documentation libraries
|
|
268
|
+
- Onboarding new team members with curated knowledge bases
|
|
269
|
+
- Creating topic-specific research notebooks in bulk
|
|
270
|
+
|
|
271
|
+
### `manage_sources` — Dynamic Source Management
|
|
272
|
+
|
|
273
|
+
Add or remove sources from existing notebooks:
|
|
274
|
+
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"notebook_id": "abc123",
|
|
278
|
+
"action": "add",
|
|
279
|
+
"sources": [{ "type": "url", "value": "https://new-documentation.com" }]
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### `generate_audio` — Audio Overview Creation
|
|
284
|
+
|
|
285
|
+
Generate NotebookLM's famous "Audio Overview" podcasts programmatically:
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
"Generate an audio overview for my Security Research notebook"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### `sync_notebook` — Keep Sources Updated
|
|
292
|
+
|
|
293
|
+
Sync notebook sources from a local directory:
|
|
294
|
+
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"notebook_id": "abc123",
|
|
298
|
+
"directory": "/path/to/docs",
|
|
299
|
+
"patterns": ["*.md", "*.pdf"]
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Why This Matters
|
|
304
|
+
|
|
305
|
+
| Traditional Workflow | With This MCP |
|
|
306
|
+
|---------------------|---------------|
|
|
307
|
+
| Manually create notebook in browser | `create_notebook` → done |
|
|
308
|
+
| Click "Add source" for each document | Batch add in single command |
|
|
309
|
+
| Navigate UI to generate audio | `generate_audio` → podcast ready |
|
|
310
|
+
| Update sources by hand | `sync_notebook` from local files |
|
|
311
|
+
|
|
312
|
+
**Your agent can now build entire knowledge bases autonomously.**
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
25
316
|
## Why This Fork?
|
|
26
317
|
|
|
27
318
|
The original NotebookLM MCP is excellent for productivity — but MCP servers handle sensitive data:
|
|
@@ -99,18 +390,6 @@ create_incident - Security incident management
|
|
|
99
390
|
...and 8 more
|
|
100
391
|
```
|
|
101
392
|
|
|
102
|
-
#### Compliance Dashboard Example
|
|
103
|
-
```
|
|
104
|
-
═══════════════════════════════════════════════════════════════
|
|
105
|
-
COMPLIANCE DASHBOARD - NotebookLM MCP Server
|
|
106
|
-
═══════════════════════════════════════════════════════════════
|
|
107
|
-
Generated: 2025-12-18T10:00:00.000Z
|
|
108
|
-
Overall Score: 95/100
|
|
109
|
-
|
|
110
|
-
GDPR: [COMPLIANT] SOC2: [COMPLIANT] CSSF: [COMPLIANT]
|
|
111
|
-
═══════════════════════════════════════════════════════════════
|
|
112
|
-
```
|
|
113
|
-
|
|
114
393
|
See [COMPLIANCE-SPEC.md](./docs/COMPLIANCE-SPEC.md) for full documentation.
|
|
115
394
|
|
|
116
395
|
---
|
|
@@ -122,11 +401,12 @@ See [COMPLIANCE-SPEC.md](./docs/COMPLIANCE-SPEC.md) for full documentation.
|
|
|
122
401
|
claude mcp add notebooklm -- npx @pan-sec/notebooklm-mcp@latest
|
|
123
402
|
```
|
|
124
403
|
|
|
125
|
-
### With Authentication (Recommended)
|
|
404
|
+
### With Authentication + Gemini (Recommended)
|
|
126
405
|
```bash
|
|
127
406
|
claude mcp add notebooklm \
|
|
128
407
|
--env NLMCP_AUTH_ENABLED=true \
|
|
129
408
|
--env NLMCP_AUTH_TOKEN=$(openssl rand -base64 32) \
|
|
409
|
+
--env GEMINI_API_KEY=your-gemini-api-key \
|
|
130
410
|
-- npx @pan-sec/notebooklm-mcp@latest
|
|
131
411
|
```
|
|
132
412
|
|
|
@@ -147,7 +427,8 @@ Add to `~/.cursor/mcp.json`:
|
|
|
147
427
|
"args": ["-y", "@pan-sec/notebooklm-mcp@latest"],
|
|
148
428
|
"env": {
|
|
149
429
|
"NLMCP_AUTH_ENABLED": "true",
|
|
150
|
-
"NLMCP_AUTH_TOKEN": "your-secure-token"
|
|
430
|
+
"NLMCP_AUTH_TOKEN": "your-secure-token",
|
|
431
|
+
"GEMINI_API_KEY": "your-gemini-api-key"
|
|
151
432
|
}
|
|
152
433
|
}
|
|
153
434
|
}
|
|
@@ -166,7 +447,8 @@ Add to `~/.cursor/mcp.json`:
|
|
|
166
447
|
"args": ["-y", "@pan-sec/notebooklm-mcp@latest"],
|
|
167
448
|
"env": {
|
|
168
449
|
"NLMCP_AUTH_ENABLED": "true",
|
|
169
|
-
"NLMCP_AUTH_TOKEN": "your-secure-token"
|
|
450
|
+
"NLMCP_AUTH_TOKEN": "your-secure-token",
|
|
451
|
+
"GEMINI_API_KEY": "your-gemini-api-key"
|
|
170
452
|
}
|
|
171
453
|
}
|
|
172
454
|
}
|
|
@@ -194,6 +476,56 @@ Go to [notebooklm.google.com](https://notebooklm.google.com) → Create notebook
|
|
|
194
476
|
"Research [topic] using this NotebookLM: [link]"
|
|
195
477
|
```
|
|
196
478
|
|
|
479
|
+
### 5. Try Deep Research (NEW!)
|
|
480
|
+
```
|
|
481
|
+
"Use deep research to investigate [complex topic]"
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## Complete Tool Reference
|
|
487
|
+
|
|
488
|
+
### Research Tools
|
|
489
|
+
| Tool | Description | Backend |
|
|
490
|
+
|------|-------------|---------|
|
|
491
|
+
| `ask_question` | Query your NotebookLM notebooks | Browser |
|
|
492
|
+
| `deep_research` | Comprehensive research with citations | Gemini API |
|
|
493
|
+
| `gemini_query` | Fast queries with grounding tools | Gemini API |
|
|
494
|
+
| `get_research_status` | Check background research progress | Gemini API |
|
|
495
|
+
|
|
496
|
+
### Notebook Management
|
|
497
|
+
| Tool | Description |
|
|
498
|
+
|------|-------------|
|
|
499
|
+
| `add_notebook` | Add notebook to library |
|
|
500
|
+
| `list_notebooks` | List all notebooks |
|
|
501
|
+
| `get_notebook` | Get notebook details |
|
|
502
|
+
| `update_notebook` | Update notebook metadata |
|
|
503
|
+
| `remove_notebook` | Remove from library |
|
|
504
|
+
| `select_notebook` | Set active notebook |
|
|
505
|
+
| `search_notebooks` | Search by query |
|
|
506
|
+
|
|
507
|
+
### Source Management (v1.7.0+)
|
|
508
|
+
| Tool | Description |
|
|
509
|
+
|------|-------------|
|
|
510
|
+
| `manage_sources` | Add/remove/list sources |
|
|
511
|
+
| `generate_audio` | Create Audio Overview |
|
|
512
|
+
| `sync_notebook` | Sync sources from local files |
|
|
513
|
+
|
|
514
|
+
### Session & System
|
|
515
|
+
| Tool | Description |
|
|
516
|
+
|------|-------------|
|
|
517
|
+
| `list_sessions` | View active sessions |
|
|
518
|
+
| `close_session` | Close a session |
|
|
519
|
+
| `reset_session` | Reset session chat |
|
|
520
|
+
| `get_health` | Server health check |
|
|
521
|
+
| `setup_auth` | Initial authentication |
|
|
522
|
+
| `re_auth` | Re-authenticate |
|
|
523
|
+
| `cleanup_data` | Deep cleanup utility |
|
|
524
|
+
| `get_library_stats` | Library statistics |
|
|
525
|
+
|
|
526
|
+
### Compliance (v1.6.0+)
|
|
527
|
+
16 compliance tools for GDPR, SOC2, and CSSF requirements.
|
|
528
|
+
|
|
197
529
|
---
|
|
198
530
|
|
|
199
531
|
## What Gets Protected
|
|
@@ -206,6 +538,7 @@ Go to [notebooklm.google.com](https://notebooklm.google.com) → Create notebook
|
|
|
206
538
|
| Google connection | Certificate pinned (MITM blocked) |
|
|
207
539
|
| Log output | Credentials auto-redacted |
|
|
208
540
|
| API responses | Scanned for leaked secrets |
|
|
541
|
+
| Gemini API key | Secure memory handling |
|
|
209
542
|
|
|
210
543
|
---
|
|
211
544
|
|
|
@@ -218,6 +551,12 @@ All security features are **enabled by default**. Override via environment varia
|
|
|
218
551
|
NLMCP_AUTH_ENABLED=true
|
|
219
552
|
NLMCP_AUTH_TOKEN=your-secret-token
|
|
220
553
|
|
|
554
|
+
# Gemini API (v1.8.0+)
|
|
555
|
+
GEMINI_API_KEY=your-api-key
|
|
556
|
+
GEMINI_DEFAULT_MODEL=gemini-2.5-flash
|
|
557
|
+
GEMINI_DEEP_RESEARCH_ENABLED=true
|
|
558
|
+
GEMINI_TIMEOUT_MS=30000
|
|
559
|
+
|
|
221
560
|
# Encryption
|
|
222
561
|
NLMCP_USE_POST_QUANTUM=true
|
|
223
562
|
NLMCP_ENCRYPTION_KEY=base64-32-bytes # Optional custom key
|
|
@@ -259,43 +598,6 @@ Or integrate in CI/CD:
|
|
|
259
598
|
|
|
260
599
|
---
|
|
261
600
|
|
|
262
|
-
## How It Works
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
|
|
266
|
-
│ Claude/ │────▶│ MCP Server │────▶│ NotebookLM │
|
|
267
|
-
│ Codex │ │ (This Fork) │ │ (Google) │
|
|
268
|
-
└─────────────┘ └──────────────────┘ └─────────────┘
|
|
269
|
-
│
|
|
270
|
-
┌──────┴──────┐
|
|
271
|
-
│ 14 Security │
|
|
272
|
-
│ Layers │
|
|
273
|
-
└─────────────┘
|
|
274
|
-
• PQ Encryption
|
|
275
|
-
• Secrets Scan
|
|
276
|
-
• Cert Pinning
|
|
277
|
-
• Memory Wipe
|
|
278
|
-
• Audit Logs
|
|
279
|
-
• Rate Limits
|
|
280
|
-
• ...
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Your agent asks questions → Security layers protect the pipeline → NotebookLM answers from your docs.
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
## Original Features (Preserved)
|
|
288
|
-
|
|
289
|
-
All original functionality from [PleasePrompto/notebooklm-mcp](https://github.com/PleasePrompto/notebooklm-mcp):
|
|
290
|
-
|
|
291
|
-
- **Zero hallucinations** — NotebookLM only answers from your uploaded docs
|
|
292
|
-
- **Autonomous research** — Claude asks follow-up questions automatically
|
|
293
|
-
- **Smart library** — Save notebooks with tags, auto-select by context
|
|
294
|
-
- **Cross-tool sharing** — Works with Claude Code, Codex, Cursor, etc.
|
|
295
|
-
- **Tool profiles** — Minimal, standard, or full tool sets
|
|
296
|
-
|
|
297
|
-
---
|
|
298
|
-
|
|
299
601
|
## Comparison
|
|
300
602
|
|
|
301
603
|
| Feature | Original | This Fork |
|
|
@@ -303,6 +605,13 @@ All original functionality from [PleasePrompto/notebooklm-mcp](https://github.co
|
|
|
303
605
|
| Zero-hallucination Q&A | ✅ | ✅ |
|
|
304
606
|
| Library management | ✅ | ✅ |
|
|
305
607
|
| Multi-client support | ✅ | ✅ |
|
|
608
|
+
| **Create Notebooks Programmatically** | ❌ | ✅ **UNIQUE** |
|
|
609
|
+
| **Batch Create (10 notebooks at once)** | ❌ | ✅ **UNIQUE** |
|
|
610
|
+
| **Gemini Deep Research** | ❌ | ✅ **NEW** |
|
|
611
|
+
| **Gemini Query with Grounding** | ❌ | ✅ **NEW** |
|
|
612
|
+
| **Source Management (add/remove)** | ❌ | ✅ |
|
|
613
|
+
| **Audio Overview Generation** | ❌ | ✅ |
|
|
614
|
+
| **Sync from Local Directories** | ❌ | ✅ |
|
|
306
615
|
| **Cross-platform (Linux/macOS/Windows)** | ⚠️ | ✅ |
|
|
307
616
|
| **Post-quantum encryption** | ❌ | ✅ |
|
|
308
617
|
| **Secrets scanning** | ❌ | ✅ |
|
|
@@ -311,6 +620,20 @@ All original functionality from [PleasePrompto/notebooklm-mcp](https://github.co
|
|
|
311
620
|
| **Audit logging** | ❌ | ✅ |
|
|
312
621
|
| **MCP authentication** | ❌ | ✅ |
|
|
313
622
|
| **Prompt injection detection** | ❌ | ✅ |
|
|
623
|
+
| **Enterprise Compliance (GDPR/SOC2/CSSF)** | ❌ | ✅ |
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
## Version History
|
|
628
|
+
|
|
629
|
+
| Version | Highlights |
|
|
630
|
+
|---------|------------|
|
|
631
|
+
| **v1.8.0** | Gemini Interactions API: Deep Research, Query with Grounding, Background Tasks |
|
|
632
|
+
| **v1.7.0** | Source management, batch operations, audio generation, webhooks |
|
|
633
|
+
| **v1.6.0** | Enterprise compliance: GDPR, SOC2 Type II, CSSF |
|
|
634
|
+
| **v1.5.0** | Cross-platform support (Windows ACLs, macOS, Linux) |
|
|
635
|
+
| **v1.4.0** | Post-quantum encryption, secrets scanning |
|
|
636
|
+
| **v1.3.0** | Certificate pinning, audit logging |
|
|
314
637
|
|
|
315
638
|
---
|
|
316
639
|
|
|
@@ -327,6 +650,7 @@ Email: support@pantheonsecurity.io
|
|
|
327
650
|
- **Original MCP Server**: [Gérôme Dexheimer](https://github.com/PleasePrompto) — [notebooklm-mcp](https://github.com/PleasePrompto/notebooklm-mcp)
|
|
328
651
|
- **Security Hardening**: [Pantheon Security](https://pantheonsecurity.io)
|
|
329
652
|
- **Post-Quantum Crypto**: [@noble/post-quantum](https://www.npmjs.com/package/@noble/post-quantum)
|
|
653
|
+
- **Gemini API**: [Google AI](https://ai.google.dev/)
|
|
330
654
|
|
|
331
655
|
## License
|
|
332
656
|
|
|
@@ -338,6 +662,8 @@ MIT — Same as original.
|
|
|
338
662
|
|
|
339
663
|
**Security hardened with 🔒 by [Pantheon Security](https://pantheonsecurity.io)**
|
|
340
664
|
|
|
341
|
-
|
|
665
|
+
**Powered by Google Gemini 🚀**
|
|
666
|
+
|
|
667
|
+
[Full Security Documentation](./SECURITY.md) • [Compliance Guide](./docs/COMPLIANCE-SPEC.md) • [Report Vulnerability](mailto:support@pantheonsecurity.io)
|
|
342
668
|
|
|
343
669
|
</div>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* via the Interactions API for stable, API-based research capabilities.
|
|
6
6
|
*/
|
|
7
7
|
import type { ProgressCallback } from "../types.js";
|
|
8
|
-
import type { GeminiQueryOptions, GeminiInteraction, DeepResearchOptions } from "./types.js";
|
|
8
|
+
import type { GeminiQueryOptions, GeminiInteraction, DeepResearchOptions, UploadDocumentOptions, QueryDocumentOptions, GeminiFile, UploadDocumentResult, QueryDocumentResult, ListDocumentsResult } from "./types.js";
|
|
9
9
|
export { DEEP_RESEARCH_AGENT } from "./types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Client for Gemini Interactions API
|
|
@@ -41,5 +41,46 @@ export declare class GeminiClient {
|
|
|
41
41
|
* Map SDK response to our interface
|
|
42
42
|
*/
|
|
43
43
|
private mapInteraction;
|
|
44
|
+
/**
|
|
45
|
+
* Upload a document to Gemini Files API
|
|
46
|
+
* Files are retained for 48 hours and can be used in multiple queries
|
|
47
|
+
*/
|
|
48
|
+
uploadDocument(options: UploadDocumentOptions): Promise<UploadDocumentResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Wait for file processing to complete
|
|
51
|
+
*/
|
|
52
|
+
private waitForFileProcessing;
|
|
53
|
+
/**
|
|
54
|
+
* Get file metadata
|
|
55
|
+
*/
|
|
56
|
+
getFile(fileName: string): Promise<GeminiFile>;
|
|
57
|
+
/**
|
|
58
|
+
* List all uploaded files
|
|
59
|
+
*/
|
|
60
|
+
listFiles(pageSize?: number, pageToken?: string): Promise<ListDocumentsResult>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete an uploaded file
|
|
63
|
+
*/
|
|
64
|
+
deleteFile(fileName: string): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Query an uploaded document
|
|
67
|
+
*/
|
|
68
|
+
queryDocument(options: QueryDocumentOptions): Promise<QueryDocumentResult>;
|
|
69
|
+
/**
|
|
70
|
+
* Map SDK file response to our interface
|
|
71
|
+
*/
|
|
72
|
+
private mapFile;
|
|
73
|
+
/**
|
|
74
|
+
* Detect MIME type from file extension
|
|
75
|
+
*/
|
|
76
|
+
private detectMimeType;
|
|
77
|
+
/**
|
|
78
|
+
* Format bytes to human-readable string
|
|
79
|
+
*/
|
|
80
|
+
private formatBytes;
|
|
81
|
+
/**
|
|
82
|
+
* Calculate expiration time (48 hours from now)
|
|
83
|
+
*/
|
|
84
|
+
private calculateExpiration;
|
|
44
85
|
}
|
|
45
86
|
//# sourceMappingURL=gemini-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini-client.d.ts","sourceRoot":"","sources":["../../src/gemini/gemini-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"gemini-client.d.ts","sourceRoot":"","sources":["../../src/gemini/gemini-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EAGnB,qBAAqB,EACrB,oBAAoB,EACpB,UAAU,EAEV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAA4B;gBAE9B,MAAM,CAAC,EAAE,MAAM;IAU3B;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACG,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA+CpE;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwC5E;;OAEG;IACG,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAevE;;OAEG;IACG,iBAAiB,CACrB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,gBAAgB,GAClC,OAAO,CAAC,iBAAiB,CAAC;IAgD7B;;OAEG;IACG,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe7D;;OAEG;IACH,OAAO,CAAC,cAAc;IAkDtB;;;OAGG;IACG,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAoDnF;;OAEG;YACW,qBAAqB;IAsBnC;;OAEG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAepD;;OAEG;IACG,SAAS,CAAC,QAAQ,SAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAyBjF;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAejD;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA6EhF;;OAEG;IACH,OAAO,CAAC,OAAO;IA0Bf;;OAEG;IACH,OAAO,CAAC,cAAc;IAyBtB;;OAEG;IACH,OAAO,CAAC,WAAW;IAMnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAK5B"}
|