NotebookLM MCP Server

3.0.7 · active · verified Sun Apr 19

The `notebooklm-mcp-server` package, currently at version 3.0.7, provides a robust Node.js-based server that enables AI agents to interact directly with Google's NotebookLM. Built with TypeScript and leveraging the Model Context Protocol (MCP), this server allows AI agents to securely read, search, and manage NotebookLM notebooks as if they were local files. This direct integration is designed to provide grounded context to AI models, significantly reducing hallucinations. It supports both global installation via npm and zero-configuration execution via npx, making it highly accessible for integration into various AI-augmented workflows. The project maintains an active release cadence, featuring an auto-update mechanism that ensures the server always runs the latest version with critical fixes and enhancements upon startup. Its core differentiation lies in offering a dedicated, protocol-driven solution for real-time context retrieval directly from NotebookLM for AI applications.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates the essential steps to authenticate with Google NotebookLM and then start the MCP server using npx.

import { Console } from 'console';
import { exec } from 'child_process';

const logger = new Console({ stdout: process.stdout, stderr: process.stderr });

async function setupAndStartServer() {
  logger.log('1. Authenticating with Google NotebookLM...');
  // This command will open a browser for Google login.
  // It's a one-time setup to establish a persistent session.
  // User needs to manually close the browser after successful login.
  const authProcess = exec('npx notebooklm-mcp-server auth');
  
  authProcess.stdout?.on('data', (data) => logger.log(`Auth Output: ${data}`));
  authProcess.stderr?.on('data', (data) => logger.error(`Auth Error: ${data}`));

  await new Promise(resolve => {
    authProcess.on('exit', (code) => {
      if (code === 0) {
        logger.log('Authentication command finished. Please ensure you logged in via the browser and closed it.');
        resolve(null); // Resolve to proceed even if auth browser is still open momentarily
      } else {
        logger.error(`Authentication failed with code ${code}. Please try again.`);
        process.exit(1);
      }
    });
  });

  logger.log('\n2. Starting the NotebookLM MCP Server...');
  // This command starts the server process.
  // It will run until manually stopped (e.g., Ctrl+C in terminal where it's running).
  const serverProcess = exec('npx notebooklm-mcp-server start');

  serverProcess.stdout?.on('data', (data) => logger.log(`Server Output: ${data}`));
  serverProcess.stderr?.on('data', (data) => logger.error(`Server Error: ${data}`));

  logger.log('Server started in background. Check terminal output for status.');
  logger.log('To stop the server, you would typically kill the process running `npx notebooklm-mcp-server start`.');
  logger.log('Or if running in foreground in a dedicated terminal, press Ctrl+C.');
}

setupAndStartServer().catch(console.error);

view raw JSON →