Vai al contenuto

First authentication

The MCP server needs to access NotebookLM with the user's credentials. Authentication happens once and the credentials are saved locally for subsequent sessions.

Login procedure

Type in Claude's chat:

Set up authentication for NotebookLM

Claude uses the setup_auth tool and the server automatically opens a dedicated Chrome window. In this window, simply log in with your Google account — the one that contains the notebooks you want to query.

The server uses its own isolated browser profile, separate from Chrome or any other browser you may be using. There is no need to close Chrome or any other application before starting authentication.

The process typically takes 30–60 seconds. Once login is complete, the server automatically saves the authentication state in a local directory. You don't need to repeat the procedure for subsequent sessions, as long as the authentication hasn't expired.

Verifying the connection

After logging in, you can verify that everything is working:

Check NotebookLM status

Claude uses the get_health tool and reports information about the authentication status, the connection to NotebookLM, and the browser state. If everything is in order, the system is ready to use.

Automatic renewal

Authentication has a natural expiration (24 hours). When the session expires, the server detects it automatically on the first request and starts the re-authentication procedure without user intervention.

In most cases, you don't need to worry about expiration. The system handles renewal transparently within the conversation. In a document analysis test, the server detected the authentication expiration and renewed it autonomously before proceeding, without requiring any intervention.

Switching accounts

If you need to use a different Google account (for example, to access notebooks on another account, or when you reach the daily query limit), you can force a new authentication:

Switch the NotebookLM account

Claude uses the re_auth tool, which deletes the saved credentials and opens a new login window.

Under the hood

The server saves authentication cookies in a dedicated local directory: - Windows: %LOCALAPPDATA%\notebooklm-mcp\ - macOS: ~/Library/Application Support/notebooklm-mcp/ - Linux: ~/.local/share/notebooklm-mcp/.

The directory contains the persistent browser profile (with the login session) and the state file with cookies. The authentication state is considered valid for 24 hours; beyond this threshold, the server verifies the cookies and starts re-authentication if necessary.

The server uses Patchright, a fork of Playwright with stealth features, to simulate realistic browsing behavior during authentication. The browser profile is completely isolated from Chrome and other browsers installed on the system: there are no interferences or conflicts.