source-lm
sourceInstall free

Blog

NotebookLM MCP + Claude Code: setup and feeding it sources

Claude Code is good at reading your code and bad at reading forty hours of conference talks. Paste the transcripts in and the context window is gone before the first question; skip them and the answer comes from training data, without a source you can check. A NotebookLM MCP server splits the work: NotebookLM holds the sources and answers with citations, and Claude Code gets back the answer, not the forty hours. Google renamed NotebookLM to Gemini Notebook on July 16, 2026, same product (announcement); the MCP server and this post still say “NotebookLM”.

This post covers both halves: installing the NotebookLM MCP server in Claude Code, and getting the material into the notebook in the first place — which is where YouTube playlists, Notion workspaces and Telegram chats get awkward.

Why put NotebookLM behind Claude Code

  • The sources stay out of Claude’s context. Claude sends a question; the MCP server returns NotebookLM’s answer, the citation numbers and the cited passages. Thirty sources in the notebook cost Claude one answer and a handful of quoted passages per question, not the thirty sources.
  • Answers are grounded and checkable. NotebookLM answers only from the notebook’s sources and cites which ones. Claude can quote the passage back to you instead of paraphrasing what it remembers.
  • More than one notebook at a time. A cross-notebook query asks the same question of several notebooks and returns per-notebook citations — “what do my research notebook and my meeting-notes notebook say about X”.
  • Notes and Studio outputs are reachable from the terminal. Reports, flashcards, audio and video overviews, slide decks and mind maps can be created by a prompt instead of a click, and notes written the same way.

Fill the notebook first

The MCP server can add sources too: its source_add tool takes a URL (a web page or a YouTube video), a list of URLs, pasted text, a Google Drive document, or a local file. For a handful of public links that is all you need. It gets awkward where the material is not a public URL, or is too big to be one source:

Material MCP source_add source-lm
One public page or one YouTube video Yes — pass the URL Yes, free
A YouTube playlist or a whole channel Only if you already have every video URL “Add to notebook” buttons inside YouTube, a channel up to the latest N videos
A private Notion page with its subpages Not the link (it imports empty); only Notion’s Markdown export, file by file A button in Notion’s top bar, one level of subpages
A Telegram chat or channel export Uploads the raw file, if NotebookLM takes the type; never split Split into Markdown sources under the per-source cap
A ChatGPT, Claude, Gemini or Perplexity chat No — the chat URL is behind your login One click, a labelled Markdown transcript
Re-running on a grown export Uploads the whole file again Uploads only the new messages

You could ask Claude Code to write a splitter for a Telegram export every time you need one. But each time it reads the export, writes and debugs the script, and prepares the files, and all of that is paid for in tokens, again for every new chat and every re-run. source-lm is that splitter, already written, running in the browser where you are signed in, and it costs no tokens at all:

  • YouTube — buttons on the watch page, the playlist panel, a playlist page and the channel header; re-running skips videos already in the notebook. On a watch page it can also add the comments: the top N threads (100 by default) with their replies, as a second Markdown source next to the video. NotebookLM itself only takes the video, never what viewers wrote under it. See YouTube to NotebookLM in bulk and adding a whole channel.
  • Notion — an Add to NotebookLM button in Notion’s own top bar, with “Include child pages (1 level)”. On your own workspace it runs Notion’s Markdown export; on a public *.notion.site page it reads the page’s block data. See Notion to NotebookLM and the step-by-step post.
  • Telegram — a JSON or HTML export from Telegram Desktop (HTML from the macOS app) is split into Markdown files at a 400,000-word budget each, under NotebookLM’s 500,000 words per source, and a re-run on a longer export uploads only the new messages. See Telegram to NotebookLM and exporting a Telegram chat.
  • AI chats — Add page as .md on a ChatGPT, Claude, Gemini or Perplexity conversation adds it as a transcript with labelled turns. See ChatGPT to NotebookLM.

For a playlist, Claude could also run yt-dlp --flat-playlist to list the video URLs and pass them to source_add as urls=[...]; source-lm does the same from the playlist page you already have open.

Single sources are free and unmetered; a click that adds more than one source is a bulk action, 5 a calendar month on the free tier, then $29 once.

Install the NotebookLM MCP server

The server is gemini-notebook-mcp-cli by Jacob Ben-David — a third-party project, MIT-licensed, not ours and not Google’s (renamed from notebooklm-mcp-cli with the product; the PyPI package keeps the old name). It installs two commands: nlm, a CLI, and notebooklm-mcp, the MCP server.

1. Install the package. With pipx (uv, pip and other options are in the project’s installation guide):

pipx install notebooklm-mcp-cli
nlm --version

2. Sign in.

nlm login

The project’s docs say nlm login opens a browser with a separate profile, you sign in to Google, and the CLI saves the session cookies under ~/.notebooklm-mcp-cli/. It needs a Chromium-based browser installed — Chrome, Edge, Brave, Arc, Chromium, Vivaldi or Opera, Chrome tried first — or nlm login --manual --file <path> to import cookies you exported yourself. Check it with:

nlm login --check

It prints the profile and how many notebooks it found. nlm notebook list lists them with their ids and source counts.

3. Register the server with Claude Code. Either let the CLI do it:

nlm setup add claude-code

or run the command it runs yourself:

claude mcp add --scope user notebooklm-mcp -- notebooklm-mcp

--scope user makes the server available in every project; leave it out to register it for the current project only (local scope). claude mcp list should show notebooklm-mcp as connected. Start a new Claude Code session so the tools load.

Prompts that work, and the tools they call

You do not name tools; Claude picks them. What each kind of prompt ends up calling:

  • “List my NotebookLM notebooks.” → notebook_list
  • “Ask the ‘Conference talks 2026’ notebook what the speakers recommend for keeping an agent’s context small. Quote the sources.” → notebook_query, with a conversation_id for follow-up questions in the same thread.
  • “Ask my ‘Research’ and ‘Meeting notes’ notebooks what we decided about the pricing change.” → cross_notebook_query, by notebook names, tags, or all notebooks.
  • “Save that answer as a note in the notebook, titled ‘Context tips’.” → note with action: create.
  • “Make a Study Guide report from this notebook.” → studio_create with artifact_type: report; audio, video, slide decks, flashcards, quizzes, infographics, data tables and mind maps are the other types. Creation asks for your confirmation first, then studio_status polls until it is ready.

A real run, on a notebook of 30 sources, mostly YouTube talks about coding agents. The prompt is plain English; Claude Code picks the tool and fills in the parameters itself:

Ask my "Coding agents" notebook how to keep a Claude Code session from running out of context.

The answer comes back with citations into the notebook, trimmed:

Based on your sources, three strategies:

  • Delegate tasks to subagents. Offload heavy file reads, so only the result lands in the main session [1–3].
  • Use context compaction and short, focused sessions [4–7].
  • Offload persistent facts to external files or RAG [8–10].

[2] “A fork inherits the entire conversation history from the main session … Only the final result comes back …”

Four of the thirty sources were used, and each claim in the answer points at a passage Claude can show you.

Caveats

  • Unofficial. NotebookLM has no public API for consumer notebooks. The server calls the same internal endpoints the web app uses, reverse-engineered by the project, authenticated with your browser session cookies. When Google changes the web app, tools can break until the project catches up.
  • Your account, your risk. Automating a signed-in session is a question between you and Google’s terms of service. Consider a secondary Google account rather than your main one, and do not point all: true cross-notebook queries at a hundred notebooks in a loop — rate limits apply.
  • Cookies expire. The project’s docs say the CLI refreshes tokens on its own first; when calls still fail with an auth error, run nlm login again.
  • NotebookLM’s limits still apply: 50 sources per notebook on the free Google plan, 500,000 words per source on every plan. See NotebookLM limits.

source-lm rides the same kind of undocumented interface from inside the browser tab, so the same “can break when Google changes things” applies to it.

FAQ

What is the NotebookLM MCP server? An MCP server that exposes NotebookLM notebooks as tools an AI assistant can call: list notebooks, query one or several, add sources, write notes, create Studio artifacts. The widely used one is notebooklm-mcp-cli, a third-party project that runs locally on your machine and uses your own Google session.

How do I add NotebookLM to Claude Code? pipx install notebooklm-mcp-cli, then nlm login, then nlm setup add claude-code — or claude mcp add --scope user notebooklm-mcp -- notebooklm-mcp. Open a new Claude Code session and ask it to list your notebooks.

Is there an official NotebookLM API? Not for the consumer NotebookLM notebooks this server talks to. The MCP server uses the web app’s internal endpoints with your session cookies, so it is unofficial and can break when Google changes the web app.

Can the MCP server add YouTube videos and web pages itself? Yes — source_add takes a URL or a list of URLs, pasted text, a Drive document or a local file. It does not expand a YouTube playlist or channel into its videos, read a Notion page behind your login, or split a large export under the per-source cap; that is what source-lm does in the browser.

Does Claude see the whole notebook? No. Claude sends a question and gets back NotebookLM’s answer with citation numbers and the cited passages. The sources stay in NotebookLM, which keeps Claude’s context small.

Not affiliated with Google, Anthropic or the notebooklm-mcp-cli project. NotebookLM and Gemini are Google trademarks; Claude is an Anthropic trademark.

← All posts

Fill the notebooks Claude Code reads, a whole archive at a time.

Install source-lm

5 bulk actions a month, free. Single sources always free.