通过 Chrome 开发者工具协议登录 Google NotebookLM 并保存认证 cookies,用于 notebooklm-mcp。当用户要求登录、认证或重新认证时使用。
Authenticate with Google and save cookies for the notebooklm-mcp CLI/MCP server.
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:
--remote-debugging-port=9222extract_cookies_via_existing_cdp)~/.notebooklm-mcp-cli/profiles/default/ via AuthManager.save_profile()bash
which chromium-browser && which uv
If missing, install Chromium ( apt install chromium-browser) and uv ( curl -LsSf https://astral.sh/uv/install.sh | sh).
bash
DISPLAY=:0 ~/.local/share/uv/tools/notebooklm-mcp-cli/bin/python3 {baseDir}/scripts/login.py
bash
uv tool run --from notebooklm-mcp-cli nlm login --check
Expected output: ✓ Authentication valid! with email and notebook count.
~/.notebooklm-mcp-cli/profiles/default/cookies.json~/.notebooklm-mcp-cli/profiles/default/metadata.jsonProblemFixCannot connect to browser on port 9222Kill stale Chrome: pkill -f remote-debugging-port=9222``Profile not found: defaultRe-run the login scriptDISPLAY not setExport DISPLAY=:0 before running