NotebookLM has no official public API, soDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jacob-bd/notebooklm-mcp-cli/llms.txt
Use this file to discover all available pages before exploring further.
notebooklm-mcp-cli authenticates by extracting browser cookies from your Google session. The tool supports two methods: Auto Mode, which launches a dedicated browser window and handles everything automatically using the Chrome DevTools Protocol (CDP), and File Mode, where you manually copy cookies from your browser’s DevTools and paste them into a file. Most users should start with Auto Mode — it handles token refresh automatically and works with all supported Chromium-family browsers.
Supported browsers: Google Chrome, Arc (macOS), Brave, Microsoft Edge, Chromium, Vivaldi, Opera.
Authenticating
- Auto Mode (Recommended)
- File Mode (Manual)
Auto Mode launches a dedicated browser window, lets you sign in to Google, and then extracts your cookies automatically. Subsequent runs reuse the saved browser profile, so you only need to log in once.Prerequisites: A supported Chromium-family browser must be installed. Close your browser completely before running (The CLI will:Valid values:
Cmd+Q on Mac, or quit from the taskbar on Windows/Linux).- Detect the first available supported browser (or your configured preference).
- Create a dedicated browser profile isolated from your regular profile.
- Launch the browser — log in with your Google account.
- Extract cookies, the CSRF token, and your account email automatically.
- Close the browser and confirm success.
Choosing a preferred browser
By default,nlm login picks the first available browser. To pin a specific browser:auto, chrome, arc, brave, edge, chromium, vivaldi, opera. If the preferred browser is not installed, the tool falls back to auto-detection.Increasing the DevTools timeout
If your system is slow to start the DevTools endpoint:Checking authentication status
Multi-Profile Support
Use multiple Google accounts by creating named profiles. Each profile gets its own isolated browser session and stored credentials, so you can be logged into several accounts simultaneously without conflicts.Token Expiration and Auto-Refresh
| Component | Typical Duration | How It Refreshes |
|---|---|---|
| Cookies | ~2–4 weeks | Auto-refreshed via headless browser if profile is saved |
| CSRF Token | Minutes | Auto-refreshed on every request failure |
| Session ID | Per MCP session | Auto-extracted on MCP server start |
nlm login again.
Understanding auth_status
Both nlm login --check and the MCP server_info tool report one of five status values. Understanding the difference between stale and unverified matters — they require different responses.
| Status | Meaning | Action |
|---|---|---|
configured | Live check passed. Credentials are valid. | Nothing required. |
not_configured | No credentials stored — first-time setup. | Run nlm login. |
stale | Credentials are known-bad: the live check was redirected to accounts.google.com, the profile failed to load, or the last successful validation is older than 7 days. | Run nlm login to refresh. API calls will fail. |
unverified | Live check could not complete (network timeout, DNS failure, proxy block). Credentials on disk are intact and may still work. | Retry later or check your network. Do not assume re-auth is needed — operations often still succeed. |
error | Unexpected exception inside the health checker itself (very rare). | File a bug with the traceback. |
The
server_info result is cached for 30 seconds. If you run nlm login externally, the updated status is reflected on the next call without waiting for the cache to expire. nlm login --check always performs a live check.Enterprise and Google Workspace
If your organization uses a managed NotebookLM instance (e.g.,notebooklm.cloud.google.com), set the NOTEBOOKLM_BASE_URL environment variable before authenticating:
~/.zshrc or ~/.bashrc) to make it persist across sessions.
For MCP server configuration, pass the variable in your client config:
Troubleshooting
”Browser is running but without remote debugging enabled”
Close your browser completely before runningnlm login. On Mac use Cmd+Q to fully quit; on Windows/Linux quit from the system tray or taskbar.
Auto Mode fails to connect
Switch to File Mode:“401 Unauthorized” or “403 Forbidden” errors
Your cookies have expired. Refresh them:Browser opens with strange branding (e.g., Antigravity IDE)
A browser extension or tool is modifying the browser environment. Try a different browser:nlm login --manual.
Cookie file shows “missing required cookies”
You copied the full header line instead of just the value. The value should begin withSID=..., not cookie: SID=....
Run the full diagnostic
Thenlm doctor command checks storage, authentication, browser detection, and MCP wiring in one pass: