Sandbox
@roomi-fields/notebooklm-mcp

NotebookLM MCP server and REST API

This project connects NotebookLM to agent tools and plain HTTP clients. It supports citation-backed Q&A, source management, Studio content generation, multi-account rotation, and a batch-to-vault pattern for saving answers as structured files.

176 stars53 forksTypeScriptUpdated 13d ago
Who it's for

Builders who want their agent or workflow tool to query NotebookLM with citations and reuse the results in other systems.

What it delivers

You can turn NotebookLM into a reusable backend for grounded answers, content generation, and automated research workflows.

What it does

Citation-backed Q&A

Ask NotebookLM questions and get answers with source citations in multiple formats, including inline, footnotes, JSON, and expanded excerpts.

HTTP REST API

Use 33 documented endpoints over plain HTTP so tools like n8n, Zapier, Make, or curl can call NotebookLM directly.

MCP transport

Connect Claude Code, Cursor, Codex, and other MCP clients to the same NotebookLM engine.

Studio content generation

Generate audio overviews, video, infographics, reports, presentations, data tables, flashcards, quizzes, and mind maps from notebook sources.

Multi-account rotation

Rotate across personal and Workspace accounts with auto re-authentication for long batch runs.

Source and notebook management

Add, list, read, search, label, share, and bulk delete notebooks and sources through the API.

Batch-to-vault export

Write cited answers to markdown and JSON sidecars so they can be searched, diffed, or indexed later.

Bundled skill

Includes a `notebooklm` skill that teaches citation formats, quota-aware batching, and transport choice.

How to get it

  1. 1The fastest way to get NotebookLM into Claude Code. Distributed via the…
    /plugin marketplace add roomi-fields/claude-plugins
    /plugin install notebooklm@roomi-fields
  2. 2Run
    git clone https://github.com/roomi-fields/notebooklm-mcp.git
    cd notebooklm-mcp
    npm install && npm run build
    npm run setup-auth   # One-time Google login
    npm run start:http   # Start REST API on port 3000
  3. 3Run
    # Citation-backed Q&A, single curl, JSON response
    curl -X POST http://localhost:3000/ask \
      -H 'Content-Type: application/json' \
      -d '{"question": "Summarize chapter 3", "notebook_id": "your-id", "source_format": "json"}'
  4. 4Log in once — in a terminal, not through the assistant. Run the interactive Google login…
    npm run setup-auth          # from a clone (Option 2 above)
    notebooklm-mcp setup-auth   # from a global install (npm i -g @roomi-fields/notebooklm-mcp)
  5. 5Run
    # Build and run
    docker build -t notebooklm-mcp .
    docker run -d --name notebooklm-mcp -p 3000:3000 -p 6080:6080 -v notebooklm-data:/data notebooklm-mcp
    
    # Authenticate via noVNC
    # 1. Open http://localhost:6080/vnc.html
    # 2. Run: curl -X POST http://localhost:3000/setup-auth -d '{"show_browser":true}'
    # 3. Login to Google in the VNC window

README

NotebookLM REST API + MCP server

Automate Google NotebookLM at scale. 33-endpoint HTTP REST API for n8n / Zapier / Make / curl, plus an MCP server for Claude Code / Cursor / Codex. Citation-backed Q&A, full Studio generation (audio · video · infographic · report · presentation · data table), multi-account rotation with auto-reauth across personal and Google Workspace accounts.

v3.2.0 — generated content can finally be deleted (content_delete): the endpoint had been declared and called by nothing since v3, so notebooks accumulated every draft ever asked for. Builds on 3.1.x, where generated content stopped coming back in the wrong language — the interface locale was overriding the language argument on both transports, silently, while reporting success. Also: reading a source's full indexed text (source_read, paginated), working source labels, and RPC refusals reported as refusals instead of as a rotated endpoint id. Built on a dual transport — the internal batchexecute RPC API (10-100× faster than scraping, immune to UI rebrands) with the Playwright browser as an automatic fallback, both shipped permanently. Batch-tested on overnight runs of 1 000+ questions. See the changelog. Compare with PleasePrompto/notebooklm-mcp for when this project is the right pick (REST API, full Studio, auto-reauth).

Note (July 2026): Google rebranded NotebookLM to Gemini Notebook. It is the same product, existing links redirect, and this project drives the same underlying service — the browser path was updated for the new DOM in v2.3.0 and the RPC path in v3.0.0. Package and repository keep the notebooklm name.

CI npm version npm downloads codecov License: MIT TypeScript Node.js

MCP Claude Code n8n GitHub MCP Toplist


Unofficial project — good to know before you start

This is not affiliated with Google. It talks to the same batchexecute endpoints the NotebookLM web app uses, with a browser fallback when they move. They are undocumented, so they can change without notice — when that happens we ship a fix, as we have for every change so far.

Two practical notes: use a dedicated Google account for automation, and expect NotebookLM's own quotas to apply at high volume. See Disclaimer for the full text.


What You Can Build

🔗 No-code automation pipelines — The 33-endpoint REST API means NotebookLM becomes a step in n8n, Zapier, Make, or a plain curl in cron. No agent, no MCP client, no Node in your stack — just HTTP. This is the half most NotebookLM libraries don't have.

🤖 Agent tooling — The same engine over MCP for Claude Code, Cursor and Codex, with a bundled skill that primes the agent on citation formats, the daily-quota-aware batch pattern, and transport selection.

📚 Research at volume — Multi-account rotation with automatic re-authentication, built for overnight runs of 1 000+ questions across several notebooks without babysitting.

🎙️ Full Studio generation — Audio overviews, video, infographics, reports, presentations, data tables, plus flashcards, quizzes and mind maps — generated and downloaded programmatically.

Use Cases & Recipes

NotebookLM is a grounded engine: Gemini reads your sources and answers from them, with citations. The winning pattern is to let it do the expensive reading while your own stack handles orchestration and the last mile.

Spend fewer tokens — offload the reading

  • 🪙 Zero-token synthesis layer — Drop 30 documents in a notebook, let Gemini do the heavy analysis, and spend your agent's context only on the final polish. The reasoning happens server-side; your agent just orchestrates (add_notebooksource_addnotebook_ask).
  • 💾 Answer cache you can re-read offlinevault_batch writes every answer to disk as structured JSON against a published schema, so a batch run becomes a corpus you can grep, diff, re-index, or feed to a retrieval layer — without re-querying and re-spending quota.

Wire it into things that aren't agents

  • ⚙️ NotebookLM as an n8n / Zapier / Make step — Because it speaks plain HTTP, a citation-backed answer becomes one node in a workflow: a form submission triggers a question, the cited answer lands in a sheet, a Slack message, or a database. No agent runtime involved.
  • 📄 Document intake pipeline — Watch a folder or an inbox, push new PDFs and URLs in as sources, and ask a standing set of questions against them on every arrival.

Grounded answers with a paper trail

  • 🔍 Citations with the actual source text — Answers come back with source names and the quoted excerpts they rest on, extracted from the citation panel — so a claim can be checked, not just attributed.
  • 🎓 Literature review at thesis scale — Batch 100+ research questions across multiple notebooks, rotate accounts as daily quotas run out, and resume where it stopped. Built for, and tested on, exactly this.

Get artifacts back out

  • 🔁 One source set, every format — Fan a single notebook out to a podcast, a video, a slide deck, a report, a quiz and a mind map, then download them all locally.

In the Wild

Real deployments, not hypotheticals.

  • 📚 A doctoral literature review at batch scale — The project was built for, and is continuously tested on, overnight runs of 1 000+ research questions spread across several notebooks: multi-account rotation picks up when a daily quota runs out, every answer is written to disk with its citations, and an interrupted run resumes instead of starting over. The batch pattern in vault_batch exists because a thesis needed it.

  • 🔌 Replacing a RAG engine with the REST APImusnymubarak/Calim_Doc swapped a Gemini-based retrieval engine for this project's HTTP API, running it as a Docker service (notebooklm:3000) behind a full client and worker layer. A good illustration of the REST half: no agent runtime, no MCP client — NotebookLM simply became a backend service their Python app calls.

Built something with it? Open an issue — this section is for other people's work.

Features

Q&A with Citations

  • Ask questions to NotebookLM and get accurate, citation-backed answers
  • Source citation extraction with 5 formats: none, inline, footnotes, json, expanded (97% excerpt success rate)
  • Session management for multi-turn conversations with auto-reauth on session expiry

Content Generation

Generate multiple content types from your notebook sources:

Content TypeFormatsOptions
Audio OverviewPodcast-style discussionLanguage (80+), custom instructions
VideoBrief, Explainer6 visual styles, language, custom instructions
InfographicHorizontal, VerticalLanguage, custom instructions
ReportSummary, DetailedLanguage, custom instructions
PresentationOverview, DetailedLanguage, custom instructions
Data TableSimple, DetailedLanguage, custom instructions
FlashcardsStudy cardsLanguage, custom instructions
QuizAssessment questionsLanguage, custom instructions
Mind MapInteractive node graphSaved to the notebook

Video Visual Styles: classroom, documentary, animated, corporate, cinematic, minimalist

Language of generated content: pass language to any generator — a BCP-47 code (es, ja, pt_BR, zh_Hans) or a name in English or in the language itself ("Spanish", "Español"). 81 languages are accepted, and an unrecognised one is refused rather than quietly swapped for another. Set a default with NOTEBOOKLM_CONTENT_LANGUAGE; it is deliberately independent of NOTEBOOKLM_UI_LOCALE, which only picks the interface language the browser fallback reads.

Flashcards and quizzes are generated via generate_study_aid; mind maps via generate_mind_map. v3 also adds share_notebook, manage_labels, and research_sources (web/Drive source discovery) — see the changelog.

Content Download

  • Download Audio — WAV audio files
  • Download Video — MP4 video files
  • Download Infographic — PNG image files
  • Text-based content (report, presentation, data_table) is returned in the API response
  • Delete generated content (content_delete) — until now a notebook accumulated every draft anyone ever asked for, with no way to remove one short of the web UI

Source Management

  • Add sources: Files (PDF, TXT, DOCX), URLs, Text, YouTube videos, Google Drive
  • List sources: Every source with its ID and title (source_list)
  • Read a source in full (source_read): the exact text NotebookLM indexed — what it actually reasons over, which the web UI only shows in fragments. Quote a source verbatim, check what a PDF really yielded, or hand the raw material to another tool. Name the source instead of its ID if you prefer; an ambiguous name is refused rather than guessed. Long sources arrive one page at a time, with an explicit instruction for fetching the next — or paginate: false for the whole document at once.

Notebook Library

  • Multi-notebook management with validation and smart selection
  • Auto-discovery: Automatically generate metadata via NotebookLM queries
  • Search notebooks by keyword in name, description, or topics
  • Scrape notebooks: List all notebooks from NotebookLM with IDs and names
  • Bulk delete: Delete multiple notebooks at once

Accounts & Localization

  • Personal and Google Workspace accounts — recognizes both NotebookLM hosts (notebooklm.google.com and the notebook.google.com Workspace alias), so Workspace sessions authenticate cleanly instead of looping on "session expired"
  • UI-language-aware — drives NotebookLM whether its interface is in English, French, German, or Japanese (en · fr · de · ja); add a language in a single JSON file

Integration Options

  • MCP Protocol — Claude Code, Cursor, Codex, any MCP client
  • Agent Skill — ships a bundled notebooklm skill (also standalone: roomi-fields/notebooklm-skill) that teaches the agent citation formats, the daily-quota-aware batch pattern, and when to use which transport
  • HTTP REST API — n8n, Zapier, Make.com, custom integrations
  • Docker — Isolated deployment with Docker or Docker Compose
  • RTFM retrieval layer/batch-to-vault writes citation-backed answers as markdown + JSON sidecars (nblm-answer-v1 schema), indexable by RTFM (FTS5 + semantic) for unlimited offline queries. Ideal for academic / SOTA workflows. Guide.

Quick Start

Option 0 — Claude Code marketplace (one-liner, recommended for Claude Code users)

The fastest way to get NotebookLM into Claude Code. Distributed via the roomi-fields/claude-plugins marketplace alongside RTFM (the retrieval companion — see RTFM integration guide):

/plugin marketplace add roomi-fields/claude-plugins
/plugin install notebooklm@roomi-fields

That registers the MCP server, runs npx -y @roomi-fields/notebooklm-mcp@<pinned-version> automatically (Node ≥ 18 required), and lets you upgrade with two commands when a new release ships: /plugin marketplace update roomi-fields then /reload-plugins. Then run npx -y -p @roomi-fields/notebooklm-mcp notebooklm-mcp-setup-auth once in a terminal to log into Google (a visible Chrome opens). To install RTFM at the same time: /plugin install rtfm@roomi-fields.

Option 1 — HTTP REST API (n8n, Zapier, Make, curl, any HTTP client)

git clone https://github.com/roomi-fields/notebooklm-mcp.git
cd notebooklm-mcp
npm install && npm run build
npm run setup-auth   # One-time Google login
npm run start:http   # Start REST API on port 3000
# Citation-backed Q&A, single curl, JSON response
curl -X POST http://localhost:3000/ask \
  -H 'Content-Type: application/json' \
  -d '{"question": "Summarize chapter 3", "notebook_id": "your-id", "source_format": "json"}'

The full surface is 33 documented endpoints — see the REST API reference. For overnight batches of 1 000+ questions, see the batch pattern.

Option 2 — MCP Mode (Claude Code, Cursor, Codex)

# Build (same package, MCP transport)
git clone https://github.com/roomi-fields/notebooklm-mcp.git
cd notebooklm-mcp
npm install && npm run build

# Claude Code
claude mcp add notebooklm node /path/to/notebooklm-mcp/dist/index.js

# Cursor — add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "notebooklm": {
      "command": "node",
      "args": ["/path/to/notebooklm-mcp/dist/index.js"]
    }
  }
}

Log in once — in a terminal, not through the assistant. Run the interactive Google login as a command; a visible Chrome window opens, you sign in, and the saved session is then reused by the MCP server:

npm run setup-auth          # from a clone (Option 2 above)
notebooklm-mcp setup-auth   # from a global install (npm i -g @roomi-fields/notebooklm-mcp)

Do the login in a terminal rather than by asking the assistant "log me in": some stdio MCP clients (e.g. Claude Desktop) cap tool-call duration and cut off the up-to-10-minute interactive login before you can finish signing in (see issue #27).

Option 3 — Docker (NAS, server, headless)

# Build and run
docker build -t notebooklm-mcp .
docker run -d --name notebooklm-mcp -p 3000:3000 -p 6080:6080 -v notebooklm-data:/data notebooklm-mcp

# Authenticate via noVNC
# 1. Open http://localhost:6080/vnc.html
# 2. Run: curl -X POST http://localhost:3000/setup-auth -d '{"show_browser":true}'
# 3. Login to Google in the VNC window

See Docker Guide for NAS deployment (Synology, QNAP).


Documentation

Full docs site: https://roomi-fields.github.io/notebooklm-mcp/ · OpenAPI 3.1 spec

GuideDescription
InstallationStep-by-step setup for HTTP and MCP modes
ConfigurationEnvironment variables and security
REST API referenceComplete HTTP endpoint documentation (33 endpoints)
Run 1 000 questions overnightProduction batch pattern with auto-reauth and rotation
RTFM integration — cache as searchable vaultPipeline pattern: NotebookLM as one-shot ingestion, RTFM as retrieval layer. /batch-to-vault endpoint, nblm-answer-v1 schema.
n8n integrationWorkflow automation setup
TroubleshootingCommon issues and solutions
Notebook libraryMulti-notebook management
Auto-discoveryAutonomous metadata generation
Content managementAudio, video, infographic, report, presentation
Multi-account rotationMultiple accounts with TOTP auto-reauth
DockerDocker and Docker Compose deployment
Multi-interfaceRun Claude Desktop + HTTP simultaneously
Compare with PleasePrompto v2.0.0Feature matrix vs the upstream MCP-only server
Chrome profile limitationProfile locking (solved in v1.3.6+)
Adding a languagei18n system for multilingual UI support

Roadmap

See ROADMAP.md for planned features and version history.

Latest releases:

  • v3.0.1 — Interactive Google login as a first-class CLI command (notebooklm-mcp setup-auth) for global / stdio-client installs; setup_auth / re_auth accept a top-level headless (#27)
  • v3.0.0 — Major refactor: dual transport (NotebookLM's internal batchexecute RPC API with automatic DOM fallback), 10-100× faster and immune to UI rebrands; 5 new tools (notebook sharing, study aids, mind maps, source labels, web research)
  • v2.3.0 — Full support for Google's "Gemini Notebook" rebrand: create / list / rename / delete, sources, and every Studio generation type re-verified end-to-end (#23, #21)
  • v2.2.1 — Recognize both NotebookLM hosts so Google Workspace accounts authenticate (the notebook.google.com alias); notebook listing no longer wastes ~30s after the "Gemini Notebook" rebrand; HTTP banner reads the real version. Diagnosis + patch by @kpietkaa (#19)
  • v2.2.0 — Fix new-answer detection timing out when an answer repeats an earlier one (position-based identity, not text-hash); graceful shutdown on stdio disconnect; Japanese UI locale
  • v2.1.1 — Thai UI selectors for notebook_create (partial, #18)
  • v2.1.0note_list and note_get MCP tools (#17)
  • v2.0.4 — German UI selectors (closes #14)
  • v2.0.0 — Tools renamed to a namespaced tree (notebook_ask, source_add, session_list, server_health, vault_batch…) across 9 namespaces; tools/list advertises only the canonical names. Backward compatible — the legacy flat names still work as aliases, so existing scripts and configs keep running. Also adds MCP annotations (read-only / destructive / idempotent / open-world hints) and outputSchema + structuredContent on every tool. Published on the Smithery registry.
  • v1.7.0batch_to_vault exposed as a first-class MCP tool (parity with the HTTP endpoint, no localhost server required); shared runBatchToVault helper deduplicates the loop across both transports
  • v1.6.0/batch-to-vault endpoint + RTFM integration (nblm-answer-v1 JSON Schema published at schemas.roomi-fields.com/nblm-answer-v1.json) for caching NotebookLM answers as a searchable markdown vault
  • v1.5.8 — NotebookLM 2026 UI adaptations (icon-label sanitization, Discussion-panel recovery, count-based source detection) — PR #5 by @KhizarJamshaidIqbal
  • v1.5.7 — Citation extraction selector fix (.highlighted) and Docker multi-stage build — PR #1 by @JulienCANTONI
  • v1.5.6 — Citation extraction major rewrite (97% success rate), browser-verified auth at startup, profile auto-sync
  • v1.5.0 — Complete Studio content generation (video, infographic, presentation, data_table) + Notes management + Delete sources
  • v1.4.0 — Content management (sources, audio, generation) + Multi-account

Intermediate patch and hardening releases (1.5.x–1.7.x) are in the full CHANGELOG.

Not yet implemented:

  • Discover sources (Web/Drive search with Fast/Deep modes)
  • Edit notes (create, delete, and convert are implemented)

Disclaimer

This tool automates browser interactions with NotebookLM. Use a dedicated Google acco

Files in the repo

Repository payload35 top-level entries
  • .claude-plugin
  • .github
  • .husky
  • assets
  • deploy-package
  • deployment
  • docs
  • mcpb
  • schemas
  • scripts
  • skills
  • src
  • tests
  • website
  • .dockerignore
  • .env.example
  • .gitattributes
  • .gitignore
  • .prettierrc
  • CHANGELOG.md
  • CONTRIBUTING.md
  • CREDITS.md
  • docker-compose.yml
  • Dockerfile
  • eslint.config.js
  • jest.config.js
  • LICENSE
  • package-lock.json
  • package.json
  • PRIVACY.md
  • README.md
  • ROADMAP.md
  • server.json
  • smithery.yaml
  • tsconfig.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k