NotebookLM CLI & MCP Server
GitHub Repo
MIT
July 20, 2026 at 02:22 PM
0 views

NotebookLM CLI & MCP Server

@jacob-bdProject Author

NotebookLM CLI & MCP Server: A Practical Guide to Programmatic NotebookLM Access

Header image: NotebookLM MCP Header

Introduction: What this project offers

This project delivers programmatic access to Google NotebookLM, accessible through two complementary interfaces: a Command-Line Interface (CLI) and a Model Context Protocol (MCP) server. It combines the precision of scripting with the flexibility of AI-assisted workflows, allowing you to manage notebooks, sources, and media, and to connect AI agents as capable assistants. The system is designed to work with common account configurations, including Pro/free and Google AI Ultra tiers, with a note that some enterprise deployments may behave differently or require additional testing. The promise is clear: you can script, automate, and orchestrate NotebookLM content and AI-powered workflows at scale.

Media and demos to give you a sense of the tool in action This project is accompanied by a suite of demonstrations that illustrate both the general MCP capabilities and the CLI experiences. You’ll find cinematic and overview videos that walk through setup, configuration, and use cases across different AI assistants. The media material includes:

  • A cinematic introduction to Codex Setup and associated slides
  • General overviews and tool-specific demos for Claude Desktop, Perplexity Desktop, and MCP Super Assistant
  • CLI-focused demos showing the CLI in action, its integration with MCP and skills, and deployment steps To give you a tangible sense of what the tooling looks like during real usage, imagine a gallery of YouTube thumbnails embedded in the post, each linking to a detailed walkthrough:
  • General overview
  • Claude Desktop
  • Perplexity Desktop
  • MCP Super Assistant
  • CLI Overview
  • CLI, MCP & Skills
  • Setup, Doctor & mcpb
  • Infographics

Two ways to work with NotebookLM: CLI and MCP server

This toolset is designed around two complementary usage modes, each serving different personas and workflows:

1) Command-Line Interface (CLI)

  • Purpose-built for scripting, automation, and interactive use inside a terminal.
  • You can list notebooks, create new notebooks, add sources, generate audio, download artifacts, and share notebooks, all from the command line.
  • A typical session demonstrates straightforward commands such as:
  • List notebooks: nlm notebook list
  • Create a notebook: nlm notebook create "Research Project"
  • Add sources: nlm source add --url "https://…"
  • Create audio: nlm audio create --confirm
  • Download: nlm download audio
  • Share publicly: nlm share public
  • When you’re ready for comprehensive AI-assisted documentation, you can run nlm --ai to access the assistant’s documentation and capabilities directly from the CLI.

2) MCP Server (for AI Agents)

  • The MCP server enables AI assistants (Claude, Gemini, Cursor, and others) to connect to NotebookLM, turning them into powerful agents that can manage notebooks, pull in sources, and generate content.
  • Setup is designed to be automatic and tool-aware. You can incrementally add tools to the MCP server, letting the system generate JSON configuration for each tool:
  • nlm setup add claude-code
  • nlm setup add gemini
  • nlm setup add github-copilot
  • nlm setup add cursor
  • nlm setup add cline
  • nlm setup add antigravity
  • nlm setup add json
  • After configuration, natural language interactions become possible, such as: “Create a notebook about quantum computing and generate a podcast.”
  • The MCP server is designed to persist interactions to the NotebookLM web UI, so your conversations become part of the central history, ensuring continuity across interfaces.

Key features and capabilities

  • Comprehensive notebooks lifecycle: List, create, query, and manage notebooks with both CLI and MCP-level operations.
  • Flexible sources: Add and manage sources from URLs, text, drives, and files, enabling rich research contexts for your notebooks.
  • Content creation and media: Create studio content like audio and video, revise slides, and generate podcast overviews directly from the toolset.
  • Artifacts and exports: Download artifacts for use in presentations, reports, or distribution channels.
  • Web and drive research: Start web-based research and import findings and sources into notebooks, maintaining traceability and provenance.
  • Sync and batch operations: Synchronize drive sources, perform batch query or create operations, and run multi-step pipelines.
  • Cross-notebook querying and pipelines: Cross-notebook queries enable insights that span multiple notebooks, while pipelines orchestrate multi-step workflows.
  • Tagging and smart selection: Tag content, perform smart selects, and organize your research effectively.
  • AI tool configuration: Configure AI tools for your environment, including the ability to install and manage AI skills that extend the capabilities of the assistants.
  • Authentication and session management: A robust authentication lifecycle with cookie management, CSRF handling, and session persistence, including automated token refreshes and guided re-authentication when needed.
  • Troubleshooting and diagnostics: Built-in tools to diagnose installation, authentication, and configuration issues.
  • Documentation and community: A broad set of reference guides, including Getting Started, CLI Guide, MCP Guide, Authentication, Remote MCP, and an API Reference for contributors.
  • Clear disclaimer: The MCP and CLI access relies on internal APIs that are undocumented and may change, with cookie extraction involved for authentication.

Getting started: installation and setup

There are multiple paths to install NotebookLM’s CLI and MCP server, accommodating different workflows and environments:

  • Using uv (recommended)
  • Quick install: uv tool install notebooklm-mcp-cli
  • Using uvx (run without installing)
  • Quick run: uvx --from notebooklm-mcp-cli nlm --help
  • Or: uvx --from notebooklm-mcp-cli notebooklm-mcp
  • Using pip
  • Standard install: pip install notebooklm-mcp-cli
  • Using pipx
  • Isolated install: pipx install notebooklm-mcp-cli
  • Alternative: Install from source
  • Clone the repository, then install with uv in place
    • git clone https://github.com/jacob-bd/notebooklm-mcp-cli.git
    • cd notebooklm-mcp
    • uv tool install .
  • After installation, you’ll typically have:
  • nlm: the CLI
  • notebooklm-mcp: the MCP server for AI assistants
  • Upgrading
  • uv tool upgrade notebooklm-mcp-cli
  • Or: pip install --upgrade notebooklm-mcp-cli
  • Or: pipx upgrade notebooklm-mcp-cli
  • Tip: If a forceful upgrade is necessary to fetch the latest version, use uv tool install --force notebooklm-mcp-cli to bypass constraints.

Migrating from legacy setups

If you previously ran separate CLI and MCP packages, you’ll want to migrate to the unified package. Steps include:

  • Check installed components
  • Uninstall legacy CLI and MCP packages
  • Reinstall the unified package with a force install to fix symlinks
  • Re-authenticate if needed
  • The unified package presents a consistent executable name (notebooklm-mcp) and simplifies tool management

Getting started with authentication

Authentication is foundational to using either the CLI or MCP server. Here are practical approaches:

  • Auto mode: nlm login launches a browser and extracts cookies automatically
  • Check status: nlm login --check
  • Profiles: nlm login --profile work (or --profile personal) supports multiple Google accounts
  • Manual mode: nlm login --manual --file cookies.txt allows you to import cookies
  • External CDP provider: nlm login --provider openclaw --cdp-url http://127.0.0.1:18800
  • Profile management commands let you switch, list, delete, or rename profiles

Standalone auth for the MCP server

  • nlm login (auto mode) or nlm login --manual for independent MCP use
  • Browser preference: set with nlm config set auth.browser chromium or another browser
  • If login issues occur, rerun nlm login or use nlm doctor auth-replay for troubleshooting

MCP configuration: automatic vs. manual

  • Automatic setup (recommended): nlm setup to configure MCP for your AI tools without manual JSON editing
  • Examples: nlm setup add claude-code, nlm setup add claude-desktop, nlm setup add gemini, nlm setup add github-copilot, nlm setup add cursor, nlm setup add windsurf, nlm setup add json
  • You can inspect what’s configured with nlm setup list and diagnose with nlm doctor
  • Manual setup: for tools that require custom paths or JSON snippets
  • Claude Desktop, GitHub Copilot, Cursor, Windsurf, and others have example JSON blocks showing where to place commands and settings
  • MCP guide and remote MCP notes: Full configuration details are documented in the MCP Guide and Remote MCP sections for deployment scenarios

Installing AI skills (optional)

  • AI skills extend the capabilities of your assistants by providing specialized knowledge or tools
  • Supported skills include cline, openclaw, codex, antigravity, plus Gemini CLI and Claude Code ecosystems
  • Commands: nlm skill install cline, nlm skill install openclaw, nlm skill install codex, nlm skill install antigravity
  • Skill updates: nlm skill update

What you can do with NotebookLM (example prompts and workflows)

You can interact with AI tools using natural language through MCP-enabled assistants or directly via the CLI. Here are representative workflows:

Research and discovery

  • Ask to list notebooks or initiate web research on a topic, then import the sources into a notebook
  • Example prompts you might use:
  • “List all my NotebookLM notebooks”
  • “Create a new notebook called ‘AI Strategy Research’”
  • “Start web research on ‘enterprise AI ROI metrics’ and show sources”
  • “Do a deep research on ‘cloud marketplace trends’ and import the top 10 sources”
  • “Search my Google Drive for documents about ‘product roadmap’ and create a notebook” Adding content to notebooks
  • You can append URLs, YouTube videos, meeting notes, Google Docs, and more as sources for richer context
  • Example intents:
  • “Add this URL to my notebook: https://example.com/article”
  • “Add my meeting notes as a text source to this notebook”
  • “Import this Google Doc into my research notebook”

AI-powered analysis and insights

  • Query notebooks to extract insights, summarize sources, or extract security best practices
  • Prompt ideas:
  • “What are the key findings in this notebook?”
  • “Summarize the main arguments across all these sources”
  • “What does this source say about security best practices?”
  • “Get an AI summary of what this notebook is about”
  • “Configure the chat to use a learning guide style with longer responses”

Content generation and media

  • Studio content creation across audio and video, plus supporting materials
  • Examples:
  • “Create an audio podcast overview of this notebook in deep dive format”
  • “Generate a video explainer with classic visual style”
  • “Make a short vertical video overview of the key idea”
  • “Create a briefing doc from these sources”
  • “Create flashcards for studying, medium difficulty”
  • “Generate an infographic in landscape orientation with professional style”
  • “Build a mind map from my research sources”
  • “Create a slide deck presentation from this notebook”

Smart management and maintenance

  • Keep your research up to date, synchronize sources, and monitor freshness
  • Example prompts:
  • “Check which Google Drive sources are out of date and sync them”
  • “Show me all the sources in this notebook with their freshness status”
  • “Delete this source from the notebook”
  • “Check the status of my audio overview generation”

Sharing and collaboration

  • Control access and distribute notebooks
  • Example actions:
  • “Show me the sharing settings for this notebook”
  • “Make this notebook public so anyone with the link can view it”
  • “Disable public access to this notebook”
  • “Invite [email protected] as an editor to this notebook”
  • “Add a viewer to my research notebook”

A note about the MCP context window

  • The MCP is designed to balance context and tool availability. If you’re using it in Claude Code or similar environments, there is a recommended approach to managing the 39 tools available within this MCP. When NotebookLM is not actively used, you can disable tools to preserve context and avoid overwhelming the AI with unnecessary options.

Authentication lifecycle and token management

  • This system handles cookies, CSRF tokens, and session IDs across the lifecycle
  • Cookies typically persist for roughly 2–4 weeks with auto-refresh
  • CSRF tokens refresh frequently to avoid stale sessions
  • The server can automatically refresh tokens or reload cookies from disk if an external login occurs
  • You can explicitly refresh tokens with a command like refresh_auth() if needed
  • If automatic refresh fails, re-authentication with nlm login is recommended
  • There are troubleshooting steps for browser-bound replay failures and experimental browser-backed transport options for RPC

Troubleshooting and common issues

  • Upgrading with uv tool upgrade may sometimes pull in an older version due to version constraints; forcing a reinstall with uv tool install --force notebooklm-mcp-cli resolves this
  • After upgrades, you may need to restart connected AI tools for the changes to take effect
  • For authentication issues, re-authenticating with nlm login or running the doctor diagnostic (nlm doctor) can help diagnose problems
  • If the internal APIs change or cookie handling changes, consult the documentation at docs/AUTHENTICATION.md and related MCP guides

Limitations and caveats

  • Rate limits: Free tier commonly supports a limited number of queries per day
  • No official support: The API surface can change without notice
  • Cookie expiration and re-authentication requirements mean you’ll periodically re-authenticate
  • Because this uses internal APIs and browser-cookie extraction, you should use it for personal or experimental purposes and be mindful of security considerations

Documentation, guides, and community

  • Getting Started: A starter guide that covers install, login, agent setup, and migration
  • CLI Guide: Comprehensive command reference for CLI usage
  • MCP Guide: In-depth MCP tool references, including all 35 MCP tools with examples
  • Authentication: Setup and troubleshooting for authentication
  • Remote MCP: Web/mobile connector feasibility and security considerations
  • API Reference: Internal API docs for contributors
  • CLAUDE.md: A dedicated API reference and integration guide
  • The project invites contributions from developers: the “Vibe Coding” ethos emphasizes openness to refactoring, error handling improvements, and robust engineering practices

Credits and acknowledgments

  • The project credits a diverse group of contributors for hardware transport, debugging, content extraction, multi-browser authentication, and numerous feature enhancements
  • Recognized contributors include Le Anh Tuan, David Szabo-Pele, saitrogen, devnull03, VooDisss, codepiano, Tony Hansmann, Fabiana Furtado, Amy-Ra-lph, Kyle Brodeur, Robiton, pjeby, beausea, JumpLao, cbruyndoncx, zxyasfas, Serdar Akın, and many others
  • The project is associated with a star history graphic showing its ongoing interest and engagement from the open-source community
  • Licensed under the MIT License

Two important notes for readers and users

  • This MCP and CLI toolset relies on internal, undocumented APIs. It is intended for personal and experimental use, so plan for potential changes and test any critical workflows accordingly.
  • The tool is designed to be compatible with a range of NotebookLM accounts and allows for a flexible setup that can be tailored to your preferred AI assistants and workflows. If you are deploying in a team or enterprise environment, consider additional security and access controls, and review the Remote MCP documentation before broad deployment.

A closing reflection: embracing AI-driven research workflows

NotebookLM’s CLI and MCP server together open a pathway to more automated, reproducible, and scalable knowledge workflows. By combining the precise, repeatable capabilities of a CLI with the adaptive, conversational powers of AI assistants, you can accelerate research, streamline content creation, and maintain a persistent, interconnected research environment. The design emphasizes both the power of automation and the nuance of human guidance: you issue clear prompts, your AI partners handle organization and synthesis, and NotebookLM preserves a history of insights across sessions and interfaces. If you are exploring how to weave together research notebooks, media generation, and intelligent assistants, this toolset offers a robust, extensible foundation to build your own AI-assisted knowledge economy.

Images included from the input

  • NotebookLM MCP Header: NotebookLM MCP Header
  • YouTube demo thumbnails integrated in the “Media and demos” section, demonstrating the general overview and tool-specific demonstrations:
  • General overview: https://img.youtube.com/vi/d-PZDQlO4m4/mqdefault.jpg
  • Claude Desktop: https://img.youtube.com/vi/PU8JhgLPxes/mqdefault.jpg
  • Perplexity Desktop: https://img.youtube.com/vi/BCKlDNg-qxs/mqdefault.jpg
  • MCP Super Assistant: https://img.youtube.com/vi/7aHDbkr-l_E/mqdefault.jpg
  • CLI Overview: https://img.youtube.com/vi/XyXVuALWZkE/mqdefault.jpg
  • CLI, MCP & Skills: https://img.youtube.com/vi/ZQBQigFK-E8/mqdefault.jpg
  • Setup, Doctor & mcpb: https://img.youtube.com/vi/5tOUilBTJ3Q/mqdefault.jpg
  • Infographics: https://img.youtube.com/vi/Uc6iH5NuQ9A/mqdefault.jpg

Conclusion

NotebookLM’s CLI and MCP server present a compelling framework for researchers, developers, and knowledge workers who want to meld automated notebook management with the power of AI assistants. The two-pronged approach—driving everyday tasks from the terminal and orchestrating intelligent agents through MCP—provides a flexible, scalable path to richer research outputs, faster content generation, and smarter collaboration. Whether you’re starting a new project, migrating from browser-based workflows, or building complex pipelines that weave research, media, and analysis, this toolset is designed to support you with a pragmatic, developer-friendly experience.

Enjoying this project?

Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.

Project
notebooklm-cli-mcp-server
Created
July 20
Last Updated
July 16, 2026 at 11:54 AM

Find more projects like this

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.