{"id":"e4b8bee4-4a60-4ea1-ac19-232d67a2868a","slug":"ers123-notebooklm-mcp","kind":"mcp","name":"notebooklm-mcp","summary":"Secure MCP server for Google NotebookLM — 16 tools, AES-256-GCM encrypted cookies, macOS Keychain, browser sandbox enabled","owner":"ers123","repoUrl":"https://github.com/ers123/notebooklm-mcp","license":"MIT","licenseTier":"permissive","trust":"community","stars":2,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-02-06T08:49:16.000Z","addedAt":"2026-10-21T20:33:10.626Z","logoUrl":"https://avatars.githubusercontent.com/u/8192631?u=9977ffffeb4617d84eccc16f97e055d5b1e0d751&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["browser-web","cloud-infra"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-22T22:07:11.505Z","sample":false,"url":"https://conduits.dev/tools/ers123-notebooklm-mcp","language":"TypeScript","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# notebooklm-mcp\r\n\r\nA secure MCP (Model Context Protocol) server for Google NotebookLM. Enables AI assistants to interact with NotebookLM notebooks — manage notebooks, query sources, create audio/video/reports, run research, and more.\r\n\r\n**v2** uses direct HTTP API calls (no browser automation at runtime), making it significantly faster than v1 while maintaining all security hardening.\r\n\r\n## Security\r\n\r\n| Issue in existing MCPs | Our fix |\r\n|---|---|\r\n| Plaintext cookie storage | AES-256-GCM encrypted, key in macOS Keychain |\r\n| No file permissions | `0o700` dirs, `0o600` files, verified on read |\r\n| `--no-sandbox` Chrome | Sandbox enabled; `--no-sandbox` in blocklist |\r\n| Remote debug port exposed | `--remote-debugging-port` in blocklist |\r\n| Stored Google password | Manual login only — no credential storage |\r\n| No URL validation | All URLs validated against `notebooklm.google.com` |\r\n| Prompt injection via DOM | Response sanitizer strips zero-width chars, flags injection patterns |\r\n| All cookies stored | Only `.google.com` + `notebooklm.google.com` persisted |\r\n| `exec()` for shell commands | `execFile()` to prevent shell injection |\r\n\r\n## Tools (35)\r\n\r\n### Authentication (3)\r\n| Tool | Description |\r\n|---|---|\r\n| `setup_auth` | Interactive login (headful browser, one-time setup) |\r\n| `check_auth` | Validate auth status |\r\n| `clear_auth` | Clear all stored auth data |\r\n\r\n### Notebook Management (7)\r\n| Tool | Description |\r\n|---|---|\r\n| `notebook_list` | List all notebooks in your account |\r\n| `notebook_create` | Create a new notebook |\r\n| `notebook_get` | Get notebook details including sources |\r\n| `notebook_describe` | Get AI-generated summary and suggested topics |\r\n| `notebook_rename` | Rename a notebook |\r\n| `notebook_delete` | Delete a notebook (requires confirm=true) |\r\n| `chat_configure` | Configure AI chat settings (goal, response length, custom prompt) |\r\n\r\n### Source Management (8)\r\n| Tool | Description |\r\n|---|---|\r\n| `source_add_url` | Add a URL or YouTube link as source |\r\n| `source_add_text` | Add text content as source |\r\n| `source_add_drive` | Add a Google Drive document as source |\r\n| `source_describe` | Get AI-generated source summary |\r\n| `source_get_content` | Get original text content of a source |\r\n| `source_list_drive` | List Drive sources with sync status |\r\n| `source_sync_drive` | Sync a Drive source to latest version |\r\n| `source_delete` | Delete a source (requires confirm=true) |\r\n\r\n### AI Query (1)\r\n| Tool | Description |\r\n|---|---|\r\n| `notebook_query` | Ask questions about notebook sources (supports follow-ups) |\r\n\r\n### Research (3)\r\n| Tool | Description |\r\n|---|---|\r\n| `research_start` | Start web research (fast or deep mode) |\r\n| `research_status` | Check research task progress |\r\n| `research_import` | Import research results as notebook source |\r\n\r\n### Studio Content (10)\r\n| Tool | Description |\r\n|---|---|\r\n| `audio_create` | Generate audio podcast (format, length, language, focus) |\r\n| `video_create` | Generate video overview (visual style, language, focus) |\r\n| `report_create` | Generate report (briefing doc, study guide, FAQ, timeline, blog) |\r\n| `flashcards_create` | Generate flashcards (difficulty) |\r\n| `quiz_create` | Generate quiz (question count, difficulty) |\r\n| `infographic_create` | Generate infographic (orientation, detail level) |\r\n| `slide_deck_create` | Generate slide deck (format, length) |\r\n| `data_table_create` | Generate data table |\r\n| `studio_status` | Check generation status of any studio artifact |\r\n| `studio_delete` | Delete a studio artifact (requires confirm=true) |\r\n\r\n### Mind Map (3)\r\n| Tool | Description |\r\n|---|---|\r\n| `mind_map_create` | Generate a mind map from sources (synchronous, returns immediately) |\r\n| `mind_map_list` | List all mind maps in a notebook |\r\n| `mind_map_delete` | Delete a mind map (requires confirm=true) |\r\n\r\n## Requirements\r\n\r\n- Node.js 18+\r\n- macOS (uses Keychain for key storage)\r\n- Google account with NotebookLM access\r\n\r\n## Installation\r\n\r\n```bash\r\ngit clone https://github.com/ers123/notebooklm-mcp.git\r\ncd notebooklm-mcp\r\nnpm install\r\nnpm run build\r\nnpx patchright install chromium   # needed for one-time setup_auth only\r\n```\r\n\r\n## Configuration\r\n\r\n### Claude Code\r\n\r\nAdd to `~/.claude/mcp_config.json`:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"notebooklm\": {\r\n      \"command\": \"node\",\r\n      \"args\": [\"/path/to/notebooklm-mcp/dist/index.js\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Claude Desktop\r\n\r\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json`:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"notebooklm\": {\r\n      \"command\": \"node\",\r\n      \"args\": [\"/path/to/notebooklm-mcp/dist/index.js\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Any MCP Client (stdio)\r\n\r\n```bash\r\nnode /path/to/notebooklm-mcp/dist/index.js\r\n```\r\n\r\n## Usage\r\n\r\n### First-time setup\r\n\r\n1. Connect the MCP server to your AI assistant\r\n2. Run `setup_auth` — a browser window opens\r\n3. Sign in to your Google account manually\r\n4. The browser closes automatically after successful login\r\n5. Cookies are encrypted and stored securely\r\n6. All subsequent API calls use HTTP directly (no browser needed)\r\n\r\n### Example workflows\r\n\r\n```\r\n# List your notebooks\r\nUse notebook_list\r\n\r\n# Create a notebook and add sources\r\nUse notebook_create with title \"AI Research\"\r\nUse source_add_url with notebookId \"...\" and url \"https://example.com/paper.pdf\"\r\nUse source_add_text with notebookId \"...\" and title \"Notes\" and content \"...\"\r\n\r\n# Query your notebook\r\nUse notebook_query with notebookId \"...\" and question \"What are the key findings?\"\r\nUse notebook_query with notebookId \"...\" and question \"Tell me more\" and followUp true\r\n\r\n# Generate content\r\nUse audio_create with notebookId \"...\" and format \"conversation\" and length \"medium\"\r\nUse report_create with notebookId \"...\" and reportFormat \"briefing_doc\"\r\nUse studio_status with notebookId \"...\" and artifactId \"...\" to check progress\r\n\r\n# Run web research\r\nUse research_start with notebookId \"...\" and query \"latest AI developments\" and mode \"deep\"\r\nUse research_status with notebookId \"...\" and taskId \"...\" to check progress\r\nUse research_import with notebookId \"...\" and taskId \"...\" to add results as source\r\n```\r\n\r\n## Architecture\r\n\r\n```\r\nsrc/\r\n├── index.ts                    # Entry point + stdio transport\r\n├── server.ts                   # 35 MCP tools registered\r\n├── config.ts                   # Constants, API endpoints, timeouts\r\n├── types.ts                    # Shared interfaces\r\n├── errors.ts                   # Error class hierarchy\r\n├── api/                        # HTTP API layer (v2 core)\r\n│   ├── rpc-client.ts           # batchexecute RPC client\r\n│   ├── query-client.ts         # Streaming query client\r\n│   ├── response-parser.ts      # Anti-XSSI removal + chunk parsing\r\n│   └── constants.ts            # RPC IDs + code mappings\r\n├── security/                   # Keychain, AES-256-GCM, file perms, URL validation, sanitizer\r\n├── auth/                       # Manual login flow, encrypted cookie store\r\n├── browser/                    # Patchright launcher (setup_auth only)\r\n└── tools/                      # 35 MCP tool handlers\r\n    ├── notebook/               # list, create, get, describe, rename, delete, chat-configure\r\n    ├── source/                 # add-url, add-text, add-drive, describe, get-content, list-drive, sync-drive, delete\r\n    ├── query/                  # notebook-query (AI Q&A with follow-ups)\r\n    ├── research/               # start, status, import\r\n    ├── studio/                 # audio, video, report, flashcards, quiz, infographic, slide-deck, data-table, mind-map, status, delete\r\n    └── auth-tools/             # setup, check, clear auth\r\n```\r\n\r\n## Development\r\n\r\n```bash\r\nnpm run dev          # Run with tsx (hot reload)\r\nnpm run build        # Compile TypeScript\r\nnpm test             # Run unit tests\r\nnpm run test:watch   # Run tests in watch mode\r\n```\r\n\r\n## Dependencies\r\n\r\nOnly 2 runtime dependencies:\r\n\r\n- `@modelcontextprotocol/sdk` — MCP server framework\r\n- `zod` — Input validation\r\n\r\nOptional:\r\n- `patchright` — Browser automation (only needed for `setup_auth`)\r\n\r\nNo native modules. Encryption via Node.js built-in `crypto`. Keychain via `child_process.execFile`.\r\n\r\n## Acknowledgments\r\n\r\nThe NotebookLM internal API structure (RPC IDs, parameter formats, response schemas) was informed by community reverse-engineering efforts, including [wonseokjung/notebooklm-mcp](https://github.com/wonseokjung/notebooklm-mcp). All implementation code is original.\r\n\r\n## License\r\n\r\nMIT\r\n"}