@m4ykeldev/notebooklm-mcp 0.1.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/LICENSE +21 -0
- package/README.md +159 -0
- package/dist/cli.js +1966 -0
- package/dist/cli.js.map +1 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 m4yk3ldev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# NotebookLM MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server for [Google NotebookLM](https://notebooklm.google.com) — 32 tools for notebooks, sources, research, and studio content generation.
|
|
4
|
+
|
|
5
|
+
Built with the [Model Context Protocol](https://modelcontextprotocol.io) SDK for TypeScript.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### 1. Install & Run
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx -y @m4yk3ldev/notebooklm-mcp serve
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or install globally:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g @m4yk3ldev/notebooklm-mcp
|
|
19
|
+
notebooklm-mcp serve
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
> **Note:** This package is published on [GitHub Packages](https://github.com/m4yk3ldev/notebooklm-mcp/packages). You need to configure your `.npmrc` first:
|
|
23
|
+
>
|
|
24
|
+
> ```
|
|
25
|
+
> @m4yk3ldev:registry=https://npm.pkg.github.com
|
|
26
|
+
> ```
|
|
27
|
+
|
|
28
|
+
### 2. Authenticate
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx @m4yk3ldev/notebooklm-mcp auth
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This opens NotebookLM in your default browser (where you're already logged into Google), then guides you to copy your session cookies from DevTools and paste them in the terminal.
|
|
35
|
+
|
|
36
|
+
Tokens are cached at `~/.notebooklm-mcp/auth.json`.
|
|
37
|
+
|
|
38
|
+
**Alternative: environment variables**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
export NOTEBOOKLM_COOKIES="SID=xxx; HSID=xxx; SSID=xxx; APISID=xxx; SAPISID=xxx"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 3. Add to Your MCP Client
|
|
45
|
+
|
|
46
|
+
**Claude Code:**
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"notebooklm": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["-y", "@m4yk3ldev/notebooklm-mcp", "serve"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Cursor / other MCP clients:** use the same command configuration.
|
|
60
|
+
|
|
61
|
+
## Tools (32)
|
|
62
|
+
|
|
63
|
+
### Notebooks
|
|
64
|
+
|
|
65
|
+
| Tool | Description |
|
|
66
|
+
|------|-------------|
|
|
67
|
+
| `notebook_list` | List all notebooks with metadata |
|
|
68
|
+
| `notebook_create` | Create a new notebook |
|
|
69
|
+
| `notebook_get` | Get details of a specific notebook |
|
|
70
|
+
| `notebook_describe` | AI-generated summary of notebook contents |
|
|
71
|
+
| `notebook_rename` | Rename a notebook |
|
|
72
|
+
| `notebook_delete` | Delete a notebook (requires confirmation) |
|
|
73
|
+
|
|
74
|
+
### Sources
|
|
75
|
+
|
|
76
|
+
| Tool | Description |
|
|
77
|
+
|------|-------------|
|
|
78
|
+
| `notebook_add_url` | Add a URL or YouTube video as a source |
|
|
79
|
+
| `notebook_add_text` | Add pasted text as a source |
|
|
80
|
+
| `notebook_add_drive` | Add a Google Drive document as a source |
|
|
81
|
+
| `source_describe` | AI summary and keywords for a source |
|
|
82
|
+
| `source_get_content` | Raw text content of a source |
|
|
83
|
+
| `source_list_drive` | List sources with Drive freshness status |
|
|
84
|
+
| `source_sync_drive` | Sync stale Drive sources (requires confirmation) |
|
|
85
|
+
| `source_delete` | Delete a source (requires confirmation) |
|
|
86
|
+
|
|
87
|
+
### Query & Chat
|
|
88
|
+
|
|
89
|
+
| Tool | Description |
|
|
90
|
+
|------|-------------|
|
|
91
|
+
| `notebook_query` | Ask questions about notebook sources |
|
|
92
|
+
| `chat_configure` | Set chat goal and response length |
|
|
93
|
+
|
|
94
|
+
### Research
|
|
95
|
+
|
|
96
|
+
| Tool | Description |
|
|
97
|
+
|------|-------------|
|
|
98
|
+
| `research_start` | Start a web or Drive research task |
|
|
99
|
+
| `research_status` | Check research task progress |
|
|
100
|
+
| `research_import` | Import discovered sources from research |
|
|
101
|
+
|
|
102
|
+
### Studio — Content Generation
|
|
103
|
+
|
|
104
|
+
| Tool | Description |
|
|
105
|
+
|------|-------------|
|
|
106
|
+
| `audio_overview_create` | Generate an audio podcast |
|
|
107
|
+
| `video_overview_create` | Generate a video summary |
|
|
108
|
+
| `infographic_create` | Generate an infographic |
|
|
109
|
+
| `slide_deck_create` | Generate a slide presentation |
|
|
110
|
+
| `report_create` | Generate a report (briefing, study guide, blog post) |
|
|
111
|
+
| `flashcards_create` | Generate study flashcards |
|
|
112
|
+
| `quiz_create` | Generate a quiz |
|
|
113
|
+
| `data_table_create` | Generate a data table |
|
|
114
|
+
| `mind_map_create` | Generate and save a mind map |
|
|
115
|
+
| `studio_status` | Check generation status and download URLs |
|
|
116
|
+
| `studio_delete` | Delete a studio artifact (requires confirmation) |
|
|
117
|
+
|
|
118
|
+
### Authentication
|
|
119
|
+
|
|
120
|
+
| Tool | Description |
|
|
121
|
+
|------|-------------|
|
|
122
|
+
| `refresh_auth` | Reload authentication tokens |
|
|
123
|
+
| `save_auth_tokens` | Manually save authentication cookies |
|
|
124
|
+
|
|
125
|
+
## CLI Reference
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Start the MCP server (default command)
|
|
129
|
+
notebooklm-mcp serve
|
|
130
|
+
notebooklm-mcp serve --query-timeout 60000
|
|
131
|
+
|
|
132
|
+
# Authenticate interactively
|
|
133
|
+
notebooklm-mcp auth
|
|
134
|
+
|
|
135
|
+
# Import cookies from a file
|
|
136
|
+
notebooklm-mcp auth --file cookies.txt
|
|
137
|
+
|
|
138
|
+
# Show cached token info
|
|
139
|
+
notebooklm-mcp auth --show-tokens
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## How It Works
|
|
143
|
+
|
|
144
|
+
This server communicates with NotebookLM through Google's internal `batchexecute` RPC endpoint. It uses the same API that the NotebookLM web app uses in your browser.
|
|
145
|
+
|
|
146
|
+
Authentication is cookie-based — the server needs your Google session cookies to make requests on your behalf. Cookies are extracted once and cached locally. CSRF tokens are auto-refreshed when they expire.
|
|
147
|
+
|
|
148
|
+
## Requirements
|
|
149
|
+
|
|
150
|
+
- Node.js >= 18
|
|
151
|
+
- A Google account with access to [NotebookLM](https://notebooklm.google.com)
|
|
152
|
+
|
|
153
|
+
## Disclaimer
|
|
154
|
+
|
|
155
|
+
This project is not affiliated with, endorsed by, or sponsored by Google. It uses NotebookLM's internal web API, which is undocumented and may change without notice. Use at your own risk.
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
|
|
159
|
+
[MIT](LICENSE)
|