360 Secure SkillHub
360 安全技能中心

NotebookLM MCP Login

该 Skill 在主机上以远程调试端口启动 Chromium,等待用户在浏览器中完成 Google 登录后,通过 CDP 提取 Cookie 并保存到 notebooklm-mcp 的默认配置文件目录,用于修复内置登录命令在非标准环境中启动浏览器失败的问题。

ou-rock
ou-rock
热度 43.55
最近更新 2026-05-18 12:31:23
分类:自动化依赖:联网浏览搜索 / 代码执行 / 读写文件应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add notebooklm-login
Metadata
name
notebooklm-login
description
Login to Google NotebookLM via Chrome DevTools Protocol and save auth cookies for notebooklm-mcp. Use when user asks to login, authenticate, or re-authenticate NotebookLM MCP, or when `nlm login --check` shows expired/missing credentials.
metadata
{"openclaw":{"requires":{"bins":["chromium-browser","uv"]}}}

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:

  1. Manually launches Chromium with --remote-debugging-port=9222
  2. Waits for the user to complete Google login in the browser
  3. Extracts cookies via CDP (extract_cookies_via_existing_cdp)
  4. Saves them to ~/.notebooklm-mcp-cli/profiles/default/ via AuthManager.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