PromptHub
Back to Blog
Developer Tools AI Automation

Stop Clicking Through NotebookLM! Automate Everything with notebooklm-mcp-cli

B

Bright Coding

Author

14 min read 133 views
Stop Clicking Through NotebookLM! Automate Everything with notebooklm-mcp-cli

What if I told you that every minute you spend clicking through Google NotebookLM's web interface is a minute you're falling behind developers who've already automated their entire research pipeline? Here's the painful truth: while you're manually copying URLs, waiting for audio generation, and switching between tabs, your competitors are running single commands that create notebooks, ingest sources, generate podcasts, and share results—all while they grab coffee.

The notebooklm-mcp-cli project changes everything. This isn't just another CLI wrapper. It's a dual-mode powerhouse that gives you both a sleek terminal interface (nlm) and a full Model Context Protocol (MCP) server that plugs directly into AI assistants like Claude, Cursor, and Gemini. Created by jacob-bd and battle-tested across free, Pro, and even the $249/month Google AI Ultra tiers, this tool exposes NotebookLM's hidden internal APIs to programmatic control.

But here's the kicker—Google doesn't officially support any of this. These are undocumented endpoints that could shift without warning. That risk? It's exactly why the developers who master tools like notebooklm-mcp-cli now will be miles ahead when official APIs finally arrive. Ready to stop being a clicker and start being a builder? Let's dive in.

What is notebooklm-mcp-cli?

notebooklm-mcp-cli is a unified Python↗ Bright Coding Blog package that delivers programmatic access to Google NotebookLM through two complementary interfaces. Born from the merger of two earlier projects (NotebookLM-MCP and NotebookLM-CLI) in January 2026, it represents one of the most ambitious community efforts to unlock Google's AI research platform.

The project sits at a fascinating intersection: it reverse-engineers NotebookLM's internal APIs while providing legitimate, structured interfaces that AI agents can understand via the Model Context Protocol. This means you're not just getting command-line convenience—you're getting agentic AI integration that lets large language models directly manipulate your research data.

Creator jacob-bd openly admits this was built through "vibe coding" with AI assistants—a non-developer leveraging AI to solve their own itch. Yet the project has attracted serious contributors who've added HTTP transport layers, multi-browser authentication, performance optimizations, and enterprise-grade features like batch operations and pipelines. The result? A tool that's surprisingly robust despite its unofficial origins.

What makes notebooklm-mcp-cli genuinely trend-worthy right now is timing. MCP adoption is exploding across the AI tooling ecosystem. Claude Desktop, Cursor, Windsurf, Gemini CLI, GitHub Copilot—all these tools now support MCP servers. Meanwhile, NotebookLM itself has evolved from a curiosity into a serious research platform with Studio features for audio, video, and slide generation. The combination creates a force multiplier: your AI assistant can now orchestrate NotebookLM's creative outputs as part of larger automated workflows.

Key Features That Make notebooklm-mcp-cli Essential

The feature matrix reveals the depth of what's possible. With 35 MCP tools and matching CLI commands, you're not getting a toy—you're getting comprehensive platform control.

Complete Notebook Lifecycle Management: Create, list, query, and delete notebooks. But it goes deeper—cross-notebook queries let you synthesize insights across multiple research projects, while tagging and smart selection enable complex organizational schemes that the web UI simply doesn't support.

Multi-Modal Source Ingestion: URLs, raw text, Google Drive files, and local files—all programmatically addable. The source_sync_drive feature keeps Google Drive sources fresh, solving a real pain point for researchers whose source materials evolve.

Studio Content Generation: This is where it gets exciting. Audio podcasts, video explainers, briefing documents, flashcards, infographics, mind maps, and slide decks—all creatable via API. The studio_revise tool even lets you iterate on slide decks programmatically.

Research Automation: The research_start tool triggers NotebookLM's web and Drive research capabilities, with polling to capture discovered sources. Combine this with batch operations and pipeline workflows, and you're looking at autonomous research agents that can execute multi-step information gathering tasks.

Intelligent AI Tool Integration: The nlm setup family of commands auto-configures MCP servers for Claude Code, Cursor, Gemini, GitHub Copilot, Windsurf, Cline, and more. No manual JSON editing. The nlm doctor command diagnoses installation and authentication issues. AI Skills installation teaches your assistant how to use NotebookLM tools effectively.

Enterprise-Grade Authentication: Multi-profile support lets you switch between Google accounts. Named profiles isolate browser sessions—critical for consultants or researchers managing client/work boundaries. The auto-login flow launches your actual browser, extracts cookies, and maintains refresh capabilities.

Real-World Use Cases Where notebooklm-mcp-cli Dominates

The Autonomous Research Pipeline

Imagine starting your day with a single command: nlm pipeline run morning-briefing. Your predefined workflow creates a notebook, triggers web research on overnight industry developments, polls for source discovery, generates an audio podcast summary, and drops the shareable link in your Slack. This isn't hypothetical—the pipeline and batch tools make this architecture real.

AI-Native Content Operations

Content teams can integrate NotebookLM into their CMS workflows. A Cursor agent receives a brief, uses notebook_create and source_add to build a research foundation, queries for key insights, generates slide decks for stakeholder presentations, and produces audio summaries for executives who prefer listening. All tracked, versioned, and reproducible.

Competitive Intelligence at Scale

Set up cross-notebook queries aggregating intelligence on competitors across multiple research projects. The cross_notebook_query tool surfaces patterns no single notebook reveals. Sync Drive folders containing earnings reports, SEC filings, and news coverage—automatically kept current.

Educational Content Factory

Professors and course creators can batch-generate learning materials. Input a syllabus structure as a pipeline, automatically create notebooks per module, populate with curated sources, generate flashcard sets at specified difficulty levels, and produce video explainers. The tag system organizes by topic, difficulty, and prerequisite relationships.

Consulting Deliverable Automation

For knowledge workers, the combination of nlm share public, studio content generation, and profile switching is transformative. Build client research notebooks in isolated profiles, generate polished deliverables (briefing docs, presentations, audio summaries), share with granular permissions—all without touching the web interface.

Step-by-Step Installation & Setup Guide

Getting notebooklm-mcp-cli running takes minutes, not hours. The unified package means one install gives you everything.

Prerequisites

  • Python 3.8+ installed
  • A Google account with NotebookLM access (free tier works)
  • uv (recommended), pip, or pipx for installation

Installation Options

Using uv (Fastest, Recommended):

# Install the tool globally
uv tool install notebooklm-mcp-cli

# Or run without installing
uvx --from notebooklm-mcp-cli nlm --help

Using pip:

pip install notebooklm-mcp-cli

Using pipx (Isolated environment):

pipx install notebooklm-mcp-cli

After installation, verify you have both executables:

which nlm
which notebooklm-mcp

Authentication Setup

This is critical—without valid Google cookies, nothing works. The auto-login flow is surprisingly smooth:

# Launch browser, log in to Google, cookies extracted automatically
nlm login

# Verify authentication
nlm login --check

For multiple Google accounts (work/personal separation):

nlm login --profile work
nlm login --profile personal
nlm login switch work  # Activate work profile

Prefer a specific browser? Configure it:

nlm config set auth.browser brave
# Options: chrome, arc, brave, edge, chromium, vivaldi, opera

MCP Server Configuration

Here's where the magic happens. Auto-configure your AI tools:

# Add to Claude Code
nlm setup add claude-code

# Add to Cursor
nlm setup add cursor

# Add to Gemini CLI
nlm setup add gemini

# Verify configuration
nlm setup list

# Diagnose issues
nlm doctor

For tools not in the auto-setup list, generate JSON:

nlm setup add json

Manual configuration for uvx users (no install required):

{
  "mcpServers": {
    "notebooklm-mcp": {
      "command": "uvx",
      "args": ["--from", "notebooklm-mcp-cli", "notebooklm-mcp"]
    }
  }
}

Upgrading from Legacy Versions

If you previously installed separate packages, migrate now:

# Check for legacy installations
uv tool list | grep notebooklm

# Remove old packages
uv tool uninstall notebooklm-cli
uv tool uninstall notebooklm-mcp-server

# Force clean install of unified package
uv tool install --force notebooklm-mcp-cli

# Verify clean state
uv tool list | grep notebooklm
# Expected: notebooklm-mcp-cli v0.2.0 with nlm and notebooklm-mcp

REAL Code Examples from notebooklm-mcp-cli

Let's examine actual usage patterns from the repository, with detailed explanations of what each command accomplishes.

Example 1: Complete Notebook Lifecycle (CLI)

# List all existing notebooks to understand current state
nlm notebook list

# Create a new research notebook with descriptive name
nlm notebook create "Q3 Competitive Intelligence"

# Add multiple source types to build comprehensive research base
nlm source add "Q3 Competitive Intelligence" \
  --url "https://example.com/industry-report-2024"

# Add raw text source for meeting notes or quick thoughts
nlm source add "Q3 Competitive Intelligence" \
  --text "Key insight from vendor call: pricing pressure increasing"

# Query the notebook with natural language - persists to web UI
nlm notebook query "Q3 Competitive Intelligence" \
  --question "What are the main pricing trends across sources?"

# Generate audio podcast for executive consumption
nlm audio create "Q3 Competitive Intelligence" --confirm

# Make publicly shareable for team access
nlm share public "Q3 Competitive Intelligence"

What's happening here: This sequence demonstrates the core research workflow. The --confirm flag on audio generation acknowledges you're consuming quota (free tier: ~50 queries/day). Critically, notebook query results automatically appear in your NotebookLM web interface chat history—there's no silo between CLI and web usage.

Example 2: Batch Operations for Scale

# Execute multiple queries across notebooks efficiently
nlm batch query \
  --notebooks "Project Alpha,Project Beta,Project Gamma" \
  --question "What security risks are mentioned?"

# Batch create notebooks from a structured input
nlm batch create --file notebooks.json

# Batch delete outdated research
nlm batch delete --pattern "2024-Q1-*"

The power of batching: Instead of N sequential API calls with overhead, batch operations optimize for throughput. The pattern matching on delete uses glob-style syntax—essential for cleaning up time-boxed research projects. The JSON input for batch create would specify notebook names, descriptions, and initial sources in a single structured file.

Example 3: MCP Server JSON Configuration (Manual Setup)

{
  "mcpServers": {
    "notebooklm-mcp": {
      "command": "notebooklm-mcp",
      "args": [],
      "env": {
        "NOTEBOOKLM_PROFILE": "work"
      }
    }
  }
}

Configuration nuance: The NOTEBOOKLM_PROFILE environment variable selects which authenticated Google account to use. This enables sophisticated multi-tenant setups where different MCP server instances serve different contexts. For Claude Desktop specifically, you may need the full binary path since it doesn't always resolve PATH correctly—use which notebooklm-mcp to discover yours.

Example 4: Pipeline Definition and Execution

# Define a reusable research pipeline
nlm pipeline run competitive-intelligence \
  --notebook "Target: {{company_name}}" \
  --research "deep research on {{company_name}} market position" \
  --sources 10 \
  --outputs "audio,slides,briefing"

# List all available pipelines
nlm pipeline list

# Check execution status of long-running pipelines
nlm pipeline status competitive-intelligence-2024-01-15

Pipeline architecture: Pipelines encode multi-step workflows that would otherwise require orchestration code. The templating with {{company_name}} suggests parameterization for reusable research playbooks. Outputs specification triggers parallel studio content generation once research completes.

Example 5: Advanced Authentication with External Browser

# Use external CDP provider for headless automation
nlm login --provider openclaw \
  --cdp-url "http://127.0.0.1:18800"

# Manual cookie import for CI/CD environments
nlm login --manual --file /secrets/notebooklm-cookies.txt

# List all profiles with associated emails
nlm login profile list

Enterprise authentication patterns: The CDP (Chrome DevTools Protocol) integration enables sophisticated automation scenarios—imagine a Docker↗ Bright Coding Blog container running a browser that authenticates via SSO, with cookies extracted and distributed to serverless functions. The manual mode supports secrets management systems like HashiCorp Vault or Kubernetes secrets for production deployments.

Advanced Usage & Best Practices

Context Window Management: With 35 MCP tools, this server consumes significant context. In Claude Code, use @notebooklm-mcp to toggle activation—only enable when needed. Consider creating focused MCP configurations with tool subsets for specific workflows.

Quota Optimization: Free tier's ~50 queries/day requires discipline. Batch operations where possible. Use nlm doctor to diagnose unexpected quota consumption. The Pro and Ultra tiers offer substantially higher limits—invest if you're building production workflows.

Pipeline Idempotency: Design pipelines to be safely re-runnable. Use deterministic notebook naming with timestamps or hashes. Check for existing notebooks before creation to prevent duplicates in retry scenarios.

Cookie Lifecycle Monitoring: Cookies expire every 2-4 weeks. Set calendar reminders. The auto-refresh works if your browser profile preserves login state, but Google security challenges can invalidate sessions. Profile-specific authentication isolates failures.

Skill Installation for AI Assistants: Don't skip nlm skill install. These files teach your AI how to combine tools effectively—without them, your assistant may make suboptimal tool choices or miss powerful combinations like research_start followed by source_add with discovered URLs.

Comparison with Alternatives

Capability notebooklm-mcp-cli Manual Web UI Unofficial API Scripts
Programmatic Access ✅ Full CLI + MCP ❌ None ⚠️ Fragile, unmaintained
AI Agent Integration ✅ Native MCP ❌ None ❌ None
Multi-Tool Setup ✅ Auto-configure 8+ tools N/A ❌ Manual only
Batch Operations ✅ Built-in ❌ Manual only ⚠️ DIY implementation
Pipeline Workflows ✅ Native support ❌ None ❌ None
Multi-Account Support ✅ Profile isolation ⚠️ Manual logout/login ❌ None
Authentication ✅ Auto browser + refresh N/A ⚠️ Manual cookie extraction
Studio Content (Audio/Video/Slides) ✅ Full API ✅ Web only ⚠️ Partial, brittle
Cross-Notebook Queries ✅ Native ❌ None ❌ None
Maintenance ✅ Active development ✅ Google's responsibility ❌ Abandoned projects
Official Support ❌ Community ✅ Google ❌ None

The verdict is clear: notebooklm-mcp-cli is the only solution that combines comprehensive feature coverage with active maintenance and genuine AI-native architecture. The trade-off is dependency on undocumented APIs—a calculated risk for productivity gains that official channels simply can't match.

FAQ: Common Developer Concerns

Q: Will Google break this by changing their internal APIs? A: It's possible—the README explicitly warns that these are undocumented endpoints. However, the project has evolved through multiple NotebookLM platform updates, and the active contributor base responds quickly to changes. The auto-auth refresh capabilities reduce maintenance burden when adjustments are needed.

Q: Is my Google account safe using this? A: The tool only extracts authentication cookies—it never requests your password directly. Cookies are stored locally in ~/.notebooklm-mcp-cli. The open-source nature means you can audit exactly what happens. That said, any unofficial API access carries some risk; use a dedicated Google account if you're concerned.

Q: Can I use this in production/automated systems? A: The authentication lifecycle (2-4 week cookie expiry) makes fully unattended automation challenging. For production use, implement monitoring that alerts when nlm login --check fails, with human-in-the-loop re-authentication. The CDP provider support enables more sophisticated automation architectures.

Q: What's the difference between CLI and MCP modes? A: The CLI (nlm) is for direct human use and scripting. The MCP server (notebooklm-mcp) exposes the same capabilities via standardized protocol that AI assistants understand. Use CLI for one-off tasks and scheduled scripts; use MCP when building AI-agent-driven workflows.

Q: How do I handle rate limiting? A: Free tier: ~50 queries/day. The tool doesn't implement client-side rate limiting—respect this boundary to avoid account flags. Pro and Ultra tiers offer substantially higher limits. Implement exponential backoff in your own wrappers if building high-volume applications.

Q: Can I contribute even if I'm not a Python expert? A: Absolutely. The project explicitly welcomes contributors at all levels—see the "Vibe Coding Alert" section in the README. Documentation improvements, bug reports, feature requests, and code reviews are all valuable contributions.

Q: Why uv instead of pip? A: uv provides faster installation, better dependency resolution, and cleaner tool isolation. The uv tool install pattern is becoming standard for Python CLI tools. However, pip and pipx remain fully supported—use what works in your environment.

Conclusion: The Future of Research is Programmatic

notebooklm-mcp-cli represents something bigger than convenience automation—it's a glimpse of how AI-native knowledge work will function. When your AI assistant can directly manipulate research platforms, create multi-modal content, and orchestrate complex information pipelines, the nature of "research" transforms from manual labor to strategic direction.

The risks are real: undocumented APIs, cookie maintenance, no official support. But the productivity multiplication is equally real. Developers and researchers who master this tool now are building muscle for a future where AI-agent orchestration is standard, not experimental.

The project at github.com/jacob-bd/notebooklm-mcp-cli is actively evolving, with recent major refactoring unifying CLI and MCP capabilities. Whether you're automating competitive intelligence, building educational content factories, or simply tired of clicking through web interfaces, this tool deserves your attention.

Your next step: Install with uv tool install notebooklm-mcp-cli, run nlm login, and experience the first moment of creating a notebook from your terminal. That single command is the gateway to an entirely different relationship with AI-powered research. The web interface will still be there—but you'll never see it the same way again.

Star the repository, join the contributor community, and start building the automated research workflows that your competitors haven't discovered yet. The future belongs to those who stop clicking and start coding.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

All tools