Content
# notebooklm-mcp-cli
MCP server that bridges Claude Code to NotebookLM via browser session cookies.
Exposes your NotebookLM notebooks as native Claude Code tools.
**Transport**: stdio (local server, runs on your Windows machine)
**Auth**: Playwright captures Google session cookies — no API key required
---
## Tools
| Tool | Description |
|------|-------------|
| `notebooklm_auth` | Open Chrome, sign in to Google, store session cookies |
| `notebooklm_list_notebooks` | List all notebooks in your account |
| `notebooklm_get_notebook` | Get full detail: sources + notes for a notebook |
| `notebooklm_query_notebook` | Ask a question against a specific notebook |
| `notebooklm_extract_sources` | Extract all source content (for RAG ingestion) |
| `notebooklm_search_all` | Search a query across all notebooks at once |
---
## Quick Start
```bash
# Install
npm install
npx playwright install chromium
# Build
npm run build
# Register in Claude Code (~/.claude/settings.json):
# See docs/SETUP.md for the full JSON snippet
# Then in Claude Code:
# "Run notebooklm_auth to authenticate"
# "List my NotebookLM notebooks"
```
---
## Stack
| Package | Purpose |
|---------|---------|
| `@modelcontextprotocol/sdk` | MCP server framework |
| `playwright` | Browser automation for cookie capture |
| `zod` | Input validation |
| `typescript` | Strict mode TS |
| `tsx` | Dev runner (no build step) |
---
## Cookie Storage
Cookies are stored at `~/.notebooklm-mcp/auth.json` using XOR encryption
with a machine-specific key (hostname). Expire after 6 days.
**Never committed** — protected by `.gitignore` and the pre-commit hook.
---
## Register MCP in Claude Code
Add to `~/.claude/settings.json`:
```json
{
"mcpServers": {
"notebooklm": {
"command": "node",
"args": ["D:/AI_Dev/WorkspaceOS/Projects/notebooklm-mcp-cli/dist/index.js"],
"env": {}
}
}
}
```
---
## Docs
- [Full Setup Guide](docs/SETUP.md)
---
## Disclaimer
NotebookLM has no public API. This server uses reverse-engineered browser
endpoints. It may break if Google changes their internal API.
For personal/research use only — not for production client deployments.