NotebookLM MCP Login
Authenticate with Google and save cookies for the notebooklm-mcp CLI/MCP server.
Why this skill exists
The built-in nlm login command sometimes fails to launch Chromium via subprocess.Popen in
non-standard environments. This skill provides a tested workaround that:
- Manually launches Chromium with
--remote-debugging-port=9222 - Waits for the user to complete Google login in the browser
- Extracts cookies via CDP (
extract_cookies_via_existing_cdp) - Saves them to
~/.notebooklm-mcp-cli/profiles/default/viaAuthManager.save_profile()
Steps
1. Verify prerequisites
which chromium-browser && which uv
If missing, install Chromium (apt install chromium-browser) and uv (curl -LsSf https://astral.sh/uv/install.sh | sh).
2. Run the login script
DISPLAY=:0 ~/.local/share/uv/tools/notebooklm-mcp-cli/bin/python3 {baseDir}/scripts/login.py
- A Chromium window opens on the host display.
- The user logs in to their Google account.
- The script waits up to 300s, then extracts and saves cookies automatically.
3. Verify
uv tool run --from notebooklm-mcp-cli nlm login --check
Expected output: ✓ Authentication valid! with email and notebook count.
Storage
- Cookies:
~/.notebooklm-mcp-cli/profiles/default/cookies.json - Metadata:
~/.notebooklm-mcp-cli/profiles/default/metadata.json
Troubleshooting
| Problem | Fix |
|---|---|
Cannot connect to browser on port 9222 |
Kill stale Chrome: pkill -f remote-debugging-port=9222 |
Profile not found: default |
Re-run the login script |
DISPLAY not set |
Export DISPLAY=:0 before running |
