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‑mcp‑cli
What it is – A Python package that ships a command‑line tool (nlm) and a Model‑Context‑Protocol (MCP) server (notebooklm‑mcp). It lets you programmatically control Google Gemini Notebook (formerly Google NotebookLM) and expose the same functionality to AI agents such as Claude, Cursor, or Gemini‑CLI.
Why it matters – Gemini Notebook is Google’s personal‑knowledge‑base service that can store notebooks, sources, audio/video “studio” artifacts, and interactive reports. By providing a stable CLI and an MCP endpoint, this project makes the notebook usable from scripts, CI pipelines, or other AI assistants that speak the MCP protocol.
Quick start (3 commands)
- Install –
uv tool install notebooklm-mcp-cli(orpip install notebooklm-mcp-cli). - Log in –
nlm login(opens a browser, extracts Google cookies, and stores them, optionally encrypted in the OS keychain). - Connect tools –
nlm setupruns an interactive wizard that discovers local AI tools (Claude, Cursor, Gemini‑CLI, Copilot, etc.) and registers the MCP server with them.
Core capabilities
| Feature | CLI command | MCP action (exposed to agents) |
|---|---|---|
| List notebooks | nlm notebook list |
notebook_list |
| Create notebook | nlm notebook create "My Project" |
notebook_create |
| Add sources (URL, text, Drive file) | nlm source add <nb> --url … |
source_add |
| Query notebook (adds to web UI) | nlm notebook query "…" |
notebook_query |
| Manage chat sessions | nlm chats list/get/export |
chat_list, chat_get, chat_export |
| Generate studio content (audio, video, slides) | nlm studio create … |
studio_create |
| Download artifacts | nlm download <type> … |
download_artifact |
| Batch / pipeline workflows | nlm batch …, nlm pipeline run |
batch, pipeline |
| Tagging & smart selection | nlm tag add/list/select |
tag |
| Usage / quota info | nlm usage |
usage_get |
| Credential protection | nlm auth storage set protected |
– |
How agents use it
- Run the MCP server –
notebooklm-mcpstarts a local HTTP endpoint. - Agent registration – The wizard (
nlm setup add <tool>) writes a JSON configuration into the target AI tool (Claude Desktop, Cursor, etc.). - Natural‑language calls – Once registered, you can ask the agent: “Create a notebook about quantum computing and generate a podcast.” The agent translates the request into MCP calls (
notebook_create,studio_create, …) and the server talks to Gemini Notebook on your behalf.
Installation options
| Method | Command |
|---|---|
| uv (recommended) | uv tool install notebooklm-mcp-cli |
| uvx (run without installing) | uvx --from notebooklm-mcp-cli nlm --help |
| pip | pip install notebooklm-mcp-cli |
| pipx | pipx install notebooklm-mcp-cli |
| From source | Clone the repo and uv tool install . |
Both nlm (CLI) and notebooklm-mcp (MCP server) become available on your $PATH.
Authentication & security
- Uses Google cookies extracted from a browser session (auto‑mode or manual file import).
- Optional protected storage encrypts the saved cookies with the OS keychain; plain‑file storage is still supported for headless or Docker setups.
- Supports multiple profiles (
--profile work,--profile personal). - Provides a head‑less refresh command (
nlm auth refresh) for cron‑based token renewal. - Disclaimer – The tool talks to undocumented internal Google APIs; usage is intended for personal/experimental purposes and may violate Google’s Terms of Service.
Maintenance & upgrades
- Upgrade via the same installer you used (
uv tool upgrade notebooklm-mcp-cli,pip install --upgrade …, etc.). - Legacy packages (
notebooklm-cli,notebooklm-mcp-server) are deprecated; the README includes a migration guide. - All configuration and cached data live under
~/.notebooklm-mcp-cli; backups are made automatically before any change.
License & community
- License: MIT (see
LICENSE). - Published on PyPI (badge shows current version and download stats).
- The author encourages donations via Buy‑Me‑A‑Coffee to fund ongoing testing.
Bottom line
gemini-notebook-mcp-cli is a practical bridge that turns Google’s Gemini Notebook into a programmable service and makes it reachable by a growing ecosystem of AI assistants. If you already use Claude, Cursor, Gemini‑CLI, or similar agents and want them to read/write notebooks, generate audio/video, or share artifacts automatically, this package gives you a ready‑made CLI + MCP server with minimal configuration.
Related
- Project
- Project
- Project
- Project
- Project