Back to all posts

NotebookLM MCP Server: Complete Guide (2026)

The NotebookLM MCP server lets your AI agent — Claude Code, Cursor, Codex — ask questions against your Google NotebookLM notebooks and get back short, citation-backed answers grounded in your own documents. NotebookLM has no public API, so the server drives a real Chrome session to do it. This guide covers what it does, how to install and authenticate it, the tools it exposes, and the gotchas (Patchright, the visible login window, headless servers) worth knowing before you wire it into a workflow.

Updated June 2026 ~14 min read3,300 words
Editorial illustration: a central luminous teal notebook glyph at the geometric center, its pages fanning into softly glowing citation cards, linked by curved query-line arcs to a small orbital ring of generic AI-client glyphs on a deep midnight navy backdrop.

TL;DR + what you actually need

If you came here for the one-liner, here it is for the three clients people ask about most:

  • Claude Code: claude mcp add notebooklm -- npx notebooklm-mcp@latest
  • Codex CLI: codex mcp add notebooklm npx notebooklm-mcp@latest
  • Cursor: add a notebooklm entry to ~/.cursor/mcp.json (full JSON below)

Three things to know before you run it:

  • It’s free and MIT-licensed. Package name notebooklm-mcp, maintained in PleasePrompto/notebooklm-mcp. No API key, no signup beyond a Google account.
  • There is no NotebookLM API. The server automates a real Chrome browser. The first run opens a visible window so you can log into Google once; after that it runs headless from a saved profile.
  • It is a retrieval bridge, not a model. Answers come from Google’s Gemini reading your uploaded sources. Your agent gets the citation-backed answer, not the raw documents.

The rest of this guide explains the browser-automation design, walks the install and auth for each client, lists the tools, and ends with the troubleshooting that bites people first.

What it actually does

NotebookLM is Google’s research tool: you upload sources (PDFs, docs, URLs, pasted text) into a notebook, and Gemini answers questions grounded only in those sources, with citations back to the original passages. It is excellent at staying inside your documents. Its one limitation for agent work: it only talks to Gemini, inside Google’s own UI.

The NotebookLM MCP server closes that gap. MCP (Model Context Protocol — the open standard that lets an AI client call external tools) gives your agent two new verbs: ask a notebook a question and manage which notebooks it can see. So Claude Code can sit in your editor, hit a notebook holding 300 pages of internal API docs, and get back a precise answer with sources — without you copy-pasting between two tabs.

The maintainer’s framing is “zero hallucinations, just your knowledge base.” That is marketing shorthand for a real property: every answer is grounded in documents you chose, and the server tags each response as AI-generated synthesis from those sources. It does not stop Gemini from misreading a source, but it does stop the agent from inventing an API that was never in your docs.

Why route Claude through NotebookLM at all

The obvious objection: why not just upload the files to Claude directly? Context budget. A notebook with hundreds of sources would blow past any agent’s context window, and you’d pay tokens to reload it on every question.

NotebookLM acts as a compression layer. The sources stay on Google’s servers, indexed by Gemini using RAG (retrieval-augmented generation — search the docs, then generate an answer from the hits). Your agent sends one question and receives one short answer plus citations. A 300-document corpus never touches the agent’s context. That is the whole pitch, and for large, stable knowledge bases it is a real win.

The honest counterpoint: for a handful of files that fit in context, this is overkill. Uploading three PDFs straight to Claude is simpler and avoids the browser automation entirely. The NotebookLM bridge earns its place when the corpus is big, durable, and reused across many questions.

How it works (there is no NotebookLM API)

This is the part most guides skip, and it explains every quirk you’ll hit. NotebookLM has no public API. So the server does not call an endpoint — it drives a real Chrome browser through Patchright, a stealth fork of Playwright built to avoid bot detection. It opens the NotebookLM web app, types your question into the chat, waits for the answer to settle, then scrapes the answer and the citation panel straight out of the page DOM.

Three consequences fall out of that design, and they’re worth holding in your head:

Real browser

It needs Chrome (or the bundled Patchright Chromium) and a real Google session. Latency is page-render speed, not API speed — expect seconds per question, not milliseconds.

One-time visible login

The first auth opens a window you log into by hand. After that, a persistent profile keeps the session alive and runs headless.

Untrusted by default

Answers are tagged as AI-generated synthesis, and instructions embedded in your PDFs are flagged as untrusted input — a guard against prompt injection from documents.

Under the hood the answer comes from Gemini 2.5 (the model NotebookLM runs), and every response carries a _provenance envelope naming the provider, the model, and the fact that it arrived via Chrome automation grounded in user-uploaded documents. That metadata is the server being honest with your agent about where the answer came from.

Install (Claude Code, Cursor, Codex, and more)

You need Node.js 18 or newer and Chrome (stable channel preferred; the server falls back to a bundled Chromium if Chrome refuses to launch). The published package is notebooklm-mcp and the v2 line is current — v1 is no longer supported, so always install @latest.

Claude Code

The one-liner registers the server over stdio:

claude mcp add notebooklm -- npx notebooklm-mcp@latest

Prefer editing config by hand? Drop this into ~/.claude.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "npx",
      "args": ["notebooklm-mcp@latest"]
    }
  }
}

Cursor

Cursor reads MCP servers from ~/.cursor/mcp.json. Same stdio shape:

{
  "mcpServers": {
    "notebooklm": {
      "command": "npx",
      "args": ["notebooklm-mcp@latest"]
    }
  }
}

Codex CLI

Codex has its own add command:

codex mcp add notebooklm npx notebooklm-mcp@latest

Any client that can spawn a stdio MCP server uses the same npx notebooklm-mcp@latest invocation — the install differs only in where the config lives. Browse every client and its config path at Claude Code, Cursor, and Codex on mcp.directory.

The server’s catalog entry and one-click panel live on its detail page. The embed below pulls install configs straight from our catalog when they’re available; if the panel is empty for your client, use the verified npx commands above — they are the canonical install paths from the maintainer’s README.

One-line install · NotebookLM

Open server page

Install

Authentication: the visible login window

This is the step that surprises people, so do it deliberately. There’s no token to paste. Instead, after the server is registered, you call the setup_auth tool from your agent (in Claude Code, just ask it to “run NotebookLM setup_auth”). A real Chrome window opens. You log into your Google account by hand, exactly as you would in a browser. You have up to ten minutes to finish.

Once you’re in, the cookies persist in a per-user Chrome profile, and every later run reuses it — no second login, and the browser runs headless from then on. The profile lives in a standard OS data dir:

  • macOS: ~/Library/Application Support/notebooklm-mcp/chrome_profile/
  • Linux: ~/.local/share/notebooklm-mcp/chrome_profile/
  • Windows: %APPDATA%\notebooklm-mcp\chrome_profile\

Two related tools matter: re_auth wipes the stored session and starts over (use it when switching Google accounts), and cleanup_data clears everything with a preview, optionally keeping your saved notebook library. One honest caveat: there is no encrypted credential store. Isolation between accounts is purely by separate Chrome profile directories, so treat the profile dir like any other place a live Google session lives.

The tools it exposes

The default full profile registers the complete set. The ones you’ll touch daily:

  • ask_question — the core verb. Ask a question against the active notebook. Supports session reuse and a source_format option that controls how citations come back (none, inline, footnotes, or structured json).
  • add_source — add a source to a notebook; v2 supports type=url (web crawl) and type=text (paste).
  • list_notebooks / select_notebook — manage which notebook is the active default for questions, and the local library of notebook share-URLs.
  • generate_audio / download_audio — kick off an Audio Overview (NotebookLM’s podcast-style summary) and save it locally.
  • get_health, setup_auth, re_auth, cleanup_data — system and auth tools.

A typical citation-aware call looks like this:

{
  "name": "ask_question",
  "arguments": {
    "question": "How do I configure retry logic in n8n HTTP nodes?",
    "source_format": "footnotes"
  }
}

With footnotes, the answer text comes back clean and a Sources section is appended with numbered entries — each carrying a title, an excerpt, and a URL where one exists, scraped from the NotebookLM citation panel. The opinionated default: use footnotes or json for anything you’ll act on, so the agent can show its work.

Transports and tool profiles

The server speaks MCP over two transports. For an editor agent on your machine, you want the first.

  • stdio (default). Plain npx notebooklm-mcp@latest. The client spawns the server as a subprocess. This is what every install command above uses.
  • Streamable-HTTP. npx notebooklm-mcp@latest --transport http --port 3000. Exposes JSON-RPC at POST /mcp with session lifecycle via the Mcp-Session-Id header, plus a GET /healthz probe. This is the path for HTTP-only hosts like n8n, Zapier, or Make. It binds to 127.0.0.1 by default — only bind 0.0.0.0 on a trusted network.

Because the tool list is long, the server ships profiles that trim it to keep your agent’s context budget sane: minimal (just ask/list/select/health), standard (adds auth, sessions, and library editing), and full (everything, the default). If your agent is drowning in tool descriptions, drop to minimal:

npx notebooklm-mcp config set profile minimal

Recipes

Four workflows where routing your agent through NotebookLM earns the setup cost. Each assumes the server is installed and authenticated, with a notebook selected.

Recipe 1 — Ground coding answers in your own docs

You’re working in a codebase with a large internal API spec loaded into a notebook. Mid-feature, ask Claude Code: “Check the API notebook — what’s the correct pagination contract for the orders endpoint? Use footnotes.” The agent calls ask_question, gets the exact contract with citations to the spec, and writes code against the real interface instead of a guessed one.

Recipe 2 — Research synthesis across many sources

Load fifty papers or reports into a notebook, then have the agent pull a synthesis: “Summarize the consensus on X across the notebook’s sources, and flag where they disagree.” You get a sourced synthesis the agent can then turn into a doc, a table, or a literature note — without fifty PDFs ever entering its context. Pairs well with a structured writing workflow like the Claude literature-review skill.

Recipe 3 — Crawl a doc site into a notebook, then query it

Use add_source with type=url to crawl a framework’s docs site into a notebook, then query that notebook for the rest of the project. It’s a slower-moving cousin of a live docs server — good when you want a stable, pinned snapshot rather than always-fresh fetches.

Recipe 4 — Audio Overview of a knowledge base

Call generate_audio on a notebook to produce NotebookLM’s podcast-style Audio Overview, then download_audio to save it. Useful for turning a dense spec into something you can listen to on a commute — driven entirely from the agent, no clicking through the web UI.

What we got wrong the first time

Two assumptions cost us time, and they’re both downstream of the “it’s a browser, not an API” fact.

We expected auth to be a token, and ran it on a headless box. The first setup_auth needs a display, because it opens a real login window. On a headless Linux server that just hangs. The fix is in the docs but easy to miss: run the first auth under xvfb-run -a npx notebooklm-mcp to give it a virtual display, complete the login, and every run after that goes headless from the saved profile. Plan the one-time login on a machine with a screen if you can.

We treated answers as ground truth and skipped the citation format. With the default source_format: none, you get prose and no sources, which is exactly when an agent will quietly over-trust it. Switching to footnotes turned the tool from “a second opinion” into “a checkable answer.” The whole point of grounding is the citation; don’t throw it away by default.

Troubleshooting

setup_auth hangs and no window appears

You’re on a headless machine with no display. The first login needs a screen. Run it once under xvfb-run -a npx notebooklm-mcp, finish the Google login, then later runs go headless on the saved profile.

Chrome refuses to launch

The server prefers stable-channel Chrome and falls back to a bundled Chromium. Force the fallback with BROWSER_CHANNEL=chromium if your installed Chrome won’t cooperate.

Won’t run under WSL

WSL1 can’t launch Chromium and is unsupported. Upgrade to WSL2 with WSLg (Windows 11+), which is fully supported.

Session broke after switching Google accounts

Each account needs its own profile. Run re_auth to wipe and re-login, or use --account work / --account personal to keep separate profiles side by side (each needs its own first setup_auth).

Too many tools cluttering the agent

Switch profiles: npx notebooklm-mcp config set profile minimal trims to the five essential tools and frees context budget.

Who it’s for, and who it isn’t

Use it if: you keep a large, durable knowledge base (internal docs, a research corpus, a crawled doc site) and you want your agent to query it without burning context — and you’re fine with a one-time visible Google login and a real browser running in the background.

Skip it if: your sources are a few files that fit in context (just upload them to the agent), you need millisecond latency (this is page-render speed), or you can’t run a browser where the agent lives and can’t do the one-time display-based login. A locked-down CI box with no display and no xvfb is the wrong home for it.

Community signal

The most-upvoted launch thread is the maintainer’s own. Posting in r/notebooklm, the author frames the gap the server fills:

NotebookLM is great for grounding AI responses in your own documents, but it only works natively with Gemini. If you want to use it with Claude, you need an MCP server.

u/P_VT_MAP (maintainer) · Reddit

r/notebooklm — "I built a free MCP server that connects Claude to NotebookLM"

Source

A second signal worth reading is the fork ecosystem. One community member built NotebookLM MCP Structured on top of this server, adding a prompt-structuring layer — and was candid about a real friction point in the original:

The original required closing all Chrome instances before authenticating. This fork uses Patchright and handles browser sessions more cleanly. You authenticate once and it works.

paolodalprato (fork author) · Reddit

On building a structured fork of the NotebookLM MCP server

Source

That browser-session friction is the recurring theme across threads: the server is genuinely useful, and the hardest part is always the Chrome/auth dance, not the querying. The contrarian read is fair — this is browser automation, and browser automation is fragile. A NotebookLM UI change can break DOM scraping until the maintainer catches up. That’s the structural risk you accept for talking to a product with no API. Worth weighing against running-text alternatives in our best knowledge-base MCP servers roundup.

For broader context, XDA Developers called a NotebookLM MCP integration “easily the best research setup I’ve ever used” — though that piece walks through a different implementation (a CLI-first fork), a reminder that several community projects now wrap NotebookLM and they’re not interchangeable.

The verdict

Our take

The NotebookLM MCP server is the cleanest way to give Claude, Cursor, or Codex a citation-backed window into a big knowledge base that lives in NotebookLM. Use it if you have a large, stable corpus and want grounded answers without spending context. Skip it if your sources fit in context, you need API-speed latency, or you can’t run a browser (and a one-time visible login) where your agent runs. Go in knowing it’s browser automation, not an API — that single fact explains both its power and its fragility.

FAQ

Is the NotebookLM MCP server free?

Yes. The notebooklm-mcp package is MIT-licensed and free to run via `npx notebooklm-mcp@latest`. It drives your own NotebookLM account through a real Chrome session, so you also need a (free) Google account. There is no paid tier and no API key for the server itself — your only cost is whatever NotebookLM usage limits Google applies to your account.

What is the NotebookLM MCP server command?

The published package runs with `npx notebooklm-mcp@latest`. To register it in Claude Code: `claude mcp add notebooklm -- npx notebooklm-mcp@latest`. The first time, call the `setup_auth` tool to log into Google in a visible Chrome window; after that the persistent profile keeps you signed in and runs headless.

Does the NotebookLM MCP work with Codex and Cursor?

Yes. It speaks stdio, so any MCP client that can spawn a stdio server works. Cursor: add a `notebooklm` entry to `~/.cursor/mcp.json` with command `npx` and args `["notebooklm-mcp@latest"]`. Codex CLI: `codex mcp add notebooklm npx notebooklm-mcp@latest`. The same `npx` invocation works for any generic stdio client.

Does NotebookLM have an official MCP server?

Google ships no first-party NotebookLM MCP server as of writing. NotebookLM has no public API, so every option is community-built and drives the web UI through browser automation. The most-installed is PleasePrompto/notebooklm-mcp (the subject of this guide). A separate CLI-first project, jacob-bd/notebooklm-mcp-cli, takes a different approach.

How does the NotebookLM MCP server authenticate without an API?

It automates a real Chrome browser using Patchright (a stealth Playwright fork). The `setup_auth` tool opens a visible window, you log into Google once, and cookies persist in a per-user Chrome profile. Subsequent runs reuse that profile and run headless. There is no encrypted credential store — isolation is by profile directory only.

Why connect Claude to NotebookLM instead of just uploading files to Claude?

Sources stay on Google's servers and are indexed by NotebookLM's RAG, so a 300-document notebook never enters your agent's context window. The agent asks a question and gets back a short, citation-backed answer instead of paying tokens to load every file. It is a compression layer for large, stable knowledge bases.

Does the NotebookLM MCP server run on Windows and WSL?

Yes, on Windows, macOS, and Linux. WSL2 with WSLg (Windows 11+) is fully supported. WSL1 cannot launch Chromium and is unsupported. On a headless Linux server the one-time login needs a display — run the first auth under `xvfb-run`, then later runs go headless using the saved profile.

Sources

Found an issue?

If something here is out of date — a renamed tool, a new install path, a NotebookLM UI change that breaks the server — email [email protected] or read more on our about page. We keep these guides current.