cool-solution — dev.blog
Technologies

Repo of the day: notebooklm-mcp-cli, NotebookLM from the terminal and from an AI agent

Google NotebookLM is great for reasoning over your documents, but it lives inside a web app: you open the browser, upload the sources, click to generate the audio. Today's repo — notebooklm-mcp-cli, around 5,100 stars and active development — brings all of that to the command line and, above all, into an MCP server. From there an agent like Claude Code, Cursor or Gemini CLI can create a notebook, add research and spin up a podcast with one natural-language sentence. It's the difference between using NotebookLM and programming it.

$ claude "refactor user.service to async/await" reading src/services/user.service.ts... proposing 12 edits across 3 files ✓ tests still pass (47 / 47) applying patch...AI PAIRsupervised

💡 What it is: NotebookLM becomes programmable

notebooklm-mcp-cli is a Python package, published on PyPI, that exposes Google NotebookLM in two forms: a CLI called `nlm`, for scripts and interactive terminal use, and an MCP server called `notebooklm-mcp`, which connects NotebookLM to AI assistants. One package, two entry points: install it once and you get both.

It's worth saying up front, because the project itself states it plainly: under the hood it uses NotebookLM's internal, unofficial APIs, which require extracting cookies from your browser. There is no public Google API: it's honest reverse engineering, meant for personal and experimental use. A detail to keep in mind before building anything critical on top of it, which we'll come back to later.

Terminal · install and first commands
# install CLI and MCP server (same package)
uv tool install notebooklm-mcp-cli

# or on the fly, installing nothing
uvx --from notebooklm-mcp-cli nlm --help

# first login: opens the browser and extracts cookies
nlm login

# create a notebook and add a source
nlm notebook create 'AI Research'
nlm source add <notebook> --url 'https://...'

Official repo · jacob-bd/notebooklm-mcp-cli

A single package gives you the nlm command and the notebooklm-mcp server.

🤖 CLI and MCP server: two doors into the same machine

The same function is reachable in two ways, and the choice depends on how you work. The CLI is perfect for deterministic automation: a script that every Monday creates a notebook, pours in the week's sources and generates an audio summary is ten lines of bash. Every `nlm` command has a twin as an MCP tool — `notebook_list`, `source_add`, `studio_create` — so you don't learn two different models.

The MCP server, on the other hand, is the door for the agent. You connect `notebooklm-mcp` to Claude Code or Cursor and from then on you talk to NotebookLM in natural language: «create a notebook about cloud security, import these three articles and make me a deep-dive podcast». The agent translates the request into the right sequence of tools, and — no small detail — every query launched from CLI or MCP also stays in NotebookLM's web-app history.

Two ways to drive NotebookLM

CLI (nlm)

  • Ideal for scripts and repeatable automation
  • Predictable output, pipeline-friendly
  • Explicit commands: nlm notebook, nlm source, nlm studio
  • Perfect in cron jobs and CI

MCP server (notebooklm-mcp)

  • Ideal for conversational use with an agent
  • Natural language instead of flags
  • Nearly 40 tools exposed to the assistant
  • Toggle it off when unused, to save context

Same capabilities, two interfaces: automation on one side, conversation on the other.

🎧 What it can do: from notebooks to podcasts

The range of features mirrors the web app, but made automatable. On the management side you can list and create notebooks, add sources of any kind — URLs, YouTube videos, Google Drive documents, local files, pasted text — and query the notebook with questions whose answers, complete with citations, come back to the terminal or the agent.

The flashiest part is generating Studio content. With one command (or one sentence to the agent) NotebookLM produces a deep-dive audio podcast, an explainer video, a vertical short, a mind map, study flashcards, an infographic, a briefing document or even a slide deck. This is where the project goes from convenience to productivity lever: the same research becomes five different formats with no manual clicks. There's also web and Drive research, sharing (public link or invites), source syncing and batch, cross-notebook and multi-step pipeline operations.

  • Sources: URLs, YouTube, Google Drive, local files and text, with freshness sync.
  • Studio: audio/podcasts, videos, vertical shorts, mind maps, flashcards, infographics, briefings, slides.
  • Research: deep research over web and Drive with automatic import of the sources found.
  • Scale: batch, cross-notebook queries and pipelines for multi-step flows.
Terminal · generating Studio content
nlm studio create <notebook> audio       # podcast / deep dive
nlm studio create <notebook> video       # explainer video
nlm studio create <notebook> mindmap     # mind map
nlm studio create <notebook> flashcards  # study flashcards
nlm studio create <notebook> infographic # infographic
nlm studio create <notebook> slides      # slide deck

CLI Guide · commands and options

Six formats from the same research; each type's exact syntax is in the CLI Guide.

⚙️ How to use it: login, setup and first notebook

The startup path is short. After installation, `nlm login` opens a dedicated browser profile (Chrome, Arc, Brave, Edge, Chromium and others), you sign in to Google and the cookies are extracted automatically; the login persists for future refreshes. You can keep multiple Google accounts side by side with profiles (`nlm login --profile work`), each with its own isolated session.

From there it's all linear: you create a notebook, add sources, launch a Studio generation and download the artifact when it's ready. The real value shows up when you don't run this flow yourself, but an agent runs it from a natural-language request — and that's the next step.

From login to podcast, in five steps
  1. 01
    nlm loginbrowser + cookie extraction, once only
  2. 02
    Create the notebooknlm notebook create, or ask the agent
  3. 03
    Add the sourcesURLs, YouTube, Drive, files or text
  4. 04
    Generate the contentaudio, video, map or slides with one command
  5. 05
    Download the artifactnlm download once generation is ready

The same flow works from the terminal and, in natural language, from an AI agent.

🔌 How it connects to the AI agent

Here the project is especially polished. The `nlm setup add <tool>` command configures the MCP server in your assistant without editing JSON by hand: it supports Claude Code, Claude Desktop, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Cline and Antigravity. For Claude Desktop there's even a `.mcpb` extension with one-click install. An `nlm setup add json` instead generates the snippet for any other tool.

Beyond the connection, you can install an expert skill (`nlm skill install`) that teaches the agent to use the tools well, and diagnose problems with `nlm doctor`. An honest warning from the docs: the server exposes nearly 40 tools, which weigh on the context window; it's best to disable it when you're not working with NotebookLM. We have a dedicated guide on connecting an MCP server to Claude Code and Codex, and the mechanism is identical.

Terminal · connect the agent and install the skill
# configure the MCP server in your tool
nlm setup add claude-code
nlm setup add cursor
nlm setup add gemini
nlm setup add github-copilot

# expert skill to guide the agent
nlm skill install claude-code

# diagnose installation and auth
nlm doctor

MCP Guide · all tools and configuration

One command per tool: no JSON to edit by hand.

⚠️ The limits to know before trusting it with work

Let's tell the whole story, because it's the most important point. Resting on undocumented internal APIs, the tool can break without notice if Google changes something: it's declared «use at your own risk, for personal and experimental purposes». The cookies last a few weeks and need refreshing (there's automatic refresh via headless browser, but it's not infallible), and the free tier caps you at around 50 queries a day.

It's also a beta project (v0.8.4), born from the community: great for prototyping, experimenting and automating your own things, less suited to a mission-critical production process until you validate it on your case. The good news is the transparency: all these limits are written in black and white in the README, not hidden.

The repo's ID card
repo      jacob-bd/notebooklm-mcp-cli
stars     ~5,100 · MIT license
version   v0.8.4 (beta) · Python 3.11+
stack     Python · FastMCP · Typer · Rich
auth      browser cookies (internal APIs)
limits    free ~50 queries/day · cookies to refresh

Releases and changelog · GitHub

Snapshot as of mid-July 2026: a young project, but with real traction and maintenance.

🧪 An honest vibe-coding case

There's one more reason we like this repo, and it's in the README: the author openly states he is not a developer and that he built the project with AI assistants. He calls it a «Vibe Coding Alert» and invites experienced people to contribute rather than wince — refactoring, error handling, type hints, architectural choices. It's vibe coding told without the myth: a real, useful tool, with its flaws declared.

And it works: around 5,100 stars, dozens of contributors credited in the README (HTTP transport, multi-browser authentication, security hardening, WSL support) and a dense release cadence. It's concrete proof that you can start from a personal idea, stand it up with AI, and then let it grow thanks to the review of people who know more. For our audience it's exactly the arc we describe when we talk about moving from vibe coding to agentic engineering.

🏢 Why it matters for developers and SMEs

For developers, notebooklm-mcp-cli is first of all a pattern to study: a single Python codebase that, with FastMCP and Typer, exposes the same logic as a CLI and as an MCP server. It's the clean way to package a tool so it's usable both by a script and by an agent — reusable on any internal service you want to make drivable in natural language.

For an SME the value is in the flow: many knowledge tasks are «gather sources → synthesize → produce a shareable format». Here that flow gets automated. A folder of documents about a supplier becomes an audio briefing the team listens to in the car; a market study becomes a mind map and slides, generated by the agent while you do something else. It's not extra NotebookLM: it's NotebookLM inside the way you work, without the bottleneck of manual clicks.

🗺️ Where to start

The low-risk path is this: install the package with `uvx` (so you don't clutter the system), run `nlm login`, create a test notebook and add two or three real but non-critical sources. Generate an audio preview and listen to it: in five minutes you'll know whether the quality serves you. Only then connect the MCP server to Claude Code and redo the same job by asking the agent — that's where you measure the time saved.

Keep the guardrails in mind: cookies to refresh, a query cap on the free tier, its experimental nature. But even just reading how the project holds CLI, MCP server and skill together from a single codebase is, in itself, a small lesson in agentic architecture. Studying it is worth as much as using it.

Frequently asked questions about NotebookLM MCP

What is notebooklm-mcp-cli?

It's an open source Python package (MIT license) that gives programmatic access to Google NotebookLM. It includes a CLI called nlm, for terminal and script use, and an MCP server called notebooklm-mcp that connects NotebookLM to AI agents like Claude Code, Cursor or Gemini CLI. With one command or a natural-language sentence you can create notebooks, add sources and generate podcasts, videos, mind maps and more.

Do I need a paid NotebookLM account?

No: it works with free and Pro NotebookLM accounts, and has also been tested on Google AI Ultra. The free tier, however, caps you at around 50 queries a day. Authentication happens by extracting cookies from your browser with nlm login, not through an official Google API.

Why does it use unofficial APIs, and is that a problem?

Google offers no public API for NotebookLM, so the project uses the product's internal APIs, which can change without notice and break some commands. That's why it's meant for personal and experimental use: great for automating your own things, to validate carefully before entrusting it with a critical production process.

How does it connect to Claude Code or Cursor?

With the nlm setup add command followed by the tool name (claude-code, cursor, gemini, github-copilot and others): it configures the MCP server without editing JSON by hand. For Claude Desktop there's also a .mcpb extension with one-click install. Mind the context window: the server exposes nearly 40 tools, so it's best to disable it when you're not using NotebookLM.

Let's talk

If this topic is relevant to you, write to me: comparing notes on code and AI is always time well spent.

All articles

More articles from the blog

tips-claude-resume-luglio-2026.mdJuly 10, 2026claude-code-hooks-quality-gate-2026.mdJuly 9, 2026orchestrazione-agenti-ai-multi-agent-dotnet-2026.mdJuly 8, 2026