jacob-bd/gemini-notebook-mcp-cli

Programmatic access to Gemini Notebook - via command-line interface (CLI), Model Context Protocol (MCP) server, and AI agent skills.

Gemini Notebook (formerly Google NotebookLM) CLI & MCP Server

What it is – A Python package that lets you control Google’s Gemini Notebook (the service formerly known as Notebook LM) from the command line or via a Model Context Protocol (MCP) server. The MCP server can be hooked up to AI‑assistant tools such as Claude, Cursor, Gemini‑CLI, GitHub Copilot, etc., so those agents can read, write and generate content in your Gemini Notebook automatically.

Key capabilities

Area CLI command (example) MCP tool name
List notebooks nlm notebook list notebook_list
Create a notebook nlm notebook create "Research Project" notebook_create
Add sources (URL, text, Drive file, upload) nlm source add <nb> --url "https://…" source_add
Query a notebook (adds a chat entry in the web UI) nlm notebook query "Summarize key points" notebook_query
Manage chat sessions nlm chats list / nlm chats get <id> chat_list, chat_get
Generate Studio content (audio, video, slides, infographics, etc.) nlm studio create <nb> audio studio_create
Revise slide decks nlm slides revise <nb> studio_revise
Download artifacts nlm download audio <nb> <artifact-id> download_artifact
Bulk download all artifacts nlm download all <nb> -d ./exports download_all_artifacts
Sync Drive‑based sources nlm source sync source_sync_drive
Batch operations, cross‑notebook queries, pipelines, tagging, etc. nlm batch …, nlm cross query …, nlm pipeline run …, nlm tag add … batch, cross_notebook_query, pipeline, tag
Share notebooks (public link or invite) nlm share public <nb> notebook_share_*
Configure AI tools (Claude, Cursor, Gemini‑CLI, etc.) nlm setup add claude-code
Install “skills” that teach the assistant how to use the MCP nlm skill install cline
Diagnose problems nlm doctor

How you use it

  1. Installpip install notebooklm-mcp-cli (or the recommended uv tool install notebooklm-mcp-cli).
  2. Authenticatenlm login opens a browser, extracts Google cookies, and stores them locally. Profiles let you keep separate Google accounts.
  3. Run the CLInlm … lets you script notebook creation, source addition, content generation, downloading, sharing, etc.
  4. Expose the MCP servernotebooklm-mcp starts a local HTTP server that AI assistants can call. With nlm setup add <tool> the package writes the appropriate JSON configuration for tools like Claude Desktop, Cursor, GitHub Copilot, etc., so those agents can invoke the 43 built‑in MCP tools.
  5. Talk to your assistant – Once the MCP is registered, you can simply say things like “Create a notebook about quantum computing and generate a podcast” and the assistant will call the appropriate MCP endpoints behind the scenes.

Installation & upgrade

  • Preferred: uv tool install notebooklm-mcp-cli (or uvx for a one‑off run).
  • Also available via pip / pipx.
  • Upgrading follows the same command (uv tool upgrade … or pip install --upgrade …).
  • Legacy packages (notebooklm-cli, notebooklm-mcp-server) must be removed before installing the unified package.

Safety note – The tool talks to undocumented internal Google APIs and requires you to export cookies from your browser. Those APIs can change without notice, so the package is intended for personal/experimental use only.

Who it’s for – Developers, researchers, or power users who want programmatic or AI‑agent‑driven access to Gemini Notebook for tasks such as automated research aggregation, content generation (audio, video, slide decks, infographics), bulk export, or sharing notebooks without manually using the web UI.


Quick start example

# Install
uv tool install notebooklm-mcp-cli

# Log in (opens browser, extracts cookies)
nlm login

# Create a notebook and add a source
nlm notebook create "AI Strategy" 
nlm source add "AI Strategy" --url "https://arxiv.org/abs/2302.12345"

# Ask the notebook to summarize
nlm notebook query "Summarize the main findings"

# Generate a podcast and download it
nlm studio create "AI Strategy" audio
nlm download all "AI Strategy" -d ./exports

MCP registration example (for Claude Desktop)

nlm setup add claude-code   # writes the needed JSON into Claude’s config

Now Claude can run commands like @gemini-notebook-mcp notebook_create "My Notebook".


Resources

  • Full docs: docs/GETTING_STARTED.md, docs/CLI_GUIDE.md, docs/MCP_GUIDE.md
  • Demo videos linked in the README showcase both CLI usage and MCP integration with various assistants.
  • The package is published on PyPI as notebooklm-mcp-cli.

Related

  • Project
  • Project
  • Project
  • Project
  • Project