notebooklm-mcp

notebooklm-mcp

An MCP server that gives Claude (and any MCP-compatible agent) full access to Google NotebookLM — create notebooks, upload sources, ask questions, and generate audio overviews, quizzes, flashcards, mind maps, slide decks, videos, and reports.

Category
访问服务器

README

notebooklm-mcp

An MCP server that gives Claude (and any MCP-compatible agent) full access to Google NotebookLM — create notebooks, upload sources, ask questions, and generate audio overviews, quizzes, flashcards, mind maps, slide decks, videos, and reports.

Python 3.10+ License: MIT

Stability note: This server wraps notebooklm-py, which reverse-engineers NotebookLM's unofficial API. It works well for personal and experimental use, but may break without notice if Google changes their API. Not recommended for production/business-critical workflows.


What You Can Do

Category Examples
Notebooks Create, rename, delete, list
Sources Add URLs, upload files, web research, get full text
Q&A Ask questions grounded in your sources
Generate Audio overview, quiz, flashcards, mind map, slides, report, video
Download Save any generated artifact to a local file

Quick Start

Prerequisites

  • Python 3.10+ — check with python3 --version
  • uv (recommended) — install with curl -LsSf https://astral.sh/uv/install.sh | sh
  • A Google account with NotebookLM access

1. Clone the repo

git clone https://github.com/mulyg/notebooklm-mcp
cd notebooklm-mcp

2. Install dependencies

# With uv (recommended — handles venv automatically)
uv sync

# Or with pip
pip install "notebooklm-py[browser]" "mcp[cli]" pydantic httpx
playwright install chromium

Important: The playwright install chromium step is required for authentication. If you skip it, the server will fail with a browser error.

3. Authenticate with Google

notebooklm login

This opens a browser window to sign in to your Google account. Your session is stored locally — you only need to do this once (sessions last ~30 days).

notebooklm auth check    # verify it worked

What happens under the hood: notebooklm-py uses browser automation (Playwright) to authenticate with Google and store your session cookies in ~/.notebooklm/. No password is saved — only the session token.


Connecting to Agent Environments

Claude Code (CLI)

Add to .mcp.json in your project root, or to ~/.claude/claude_desktop_config.json for global use:

{
  "mcpServers": {
    "notebooklm": {
      "command": "uv",
      "args": ["run", "/path/to/notebooklm-mcp/server.py"]
    }
  }
}

Claude Desktop — macOS

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "uv",
      "args": ["run", "/Users/yourname/notebooklm-mcp/server.py"]
    }
  }
}

Claude Desktop — Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "uv",
      "args": ["run", "C:\\Users\\YourName\\notebooklm-mcp\\server.py"]
    }
  }
}

Note: On Windows, use double backslashes (\\) in JSON paths.

Cursor / Windsurf / other MCP clients

Most MCP-compatible editors use the same command + args format. Point it at server.py using the pattern above. Consult your editor's MCP documentation for the config file location.

Without uv

If you prefer plain Python:

{
  "mcpServers": {
    "notebooklm": {
      "command": "python",
      "args": ["/path/to/notebooklm-mcp/server.py"]
    }
  }
}

Make sure the Python environment that has the dependencies installed is the one being used.


How It Works

Claude / MCP client
       ↓  MCP protocol (stdio)
  server.py  (FastMCP)
       ↓  Python API
  notebooklm-py
       ↓  browser automation (Playwright)
  NotebookLM web API
       ↓
  Google's servers

server.py uses FastMCP to expose 24 tools over the MCP stdio transport. Each tool call passes through notebooklm-py, which uses a headless Chromium browser to talk to NotebookLM's undocumented internal API.


The Generate → Download Pattern

Audio, quiz, flashcards, slides, reports, and videos are generated asynchronously. Calling generate_* starts the generation task. Call download_* to save the result to disk once it's ready.

In practice, ask Claude to do both steps in a single prompt:

"Generate a long deep-dive audio overview of my 'Product Strategy' notebook, then download it to ~/Downloads/strategy.mp3"

Claude will call notebooklm_generate_audio then notebooklm_download_audio automatically.

Mind maps are the exceptionnotebooklm_generate_mind_map returns the JSON data directly without a separate download step.


Available Tools (24 total)

Start Here

Tool What It Does
notebooklm_list_notebooks See all your notebooks and their IDs
notebooklm_create_notebook Create a new empty notebook
notebooklm_rename_notebook Rename a notebook
notebooklm_delete_notebook Delete a notebook permanently

Add Content to a Notebook

Tool What It Does
notebooklm_add_url_source Add a web page, article, or YouTube URL
notebooklm_add_file_source Upload a PDF, DOCX, TXT, audio, video, or image
notebooklm_research Search the web and auto-import relevant sources
notebooklm_list_sources See all sources in a notebook
notebooklm_get_source_fulltext Read the text NotebookLM extracted from a source
notebooklm_refresh_source Re-fetch a source if the original changed

Ask Questions

Tool What It Does
notebooklm_ask Ask a question — answer is grounded in your sources

Generate Content (Step 1 of 2)

Tool Options
notebooklm_generate_audio format: deep-dive, brief, critique, debate · length: short, medium, long
notebooklm_generate_quiz difficulty: easy, medium, hard
notebooklm_generate_flashcards
notebooklm_generate_mind_map Returns JSON directly (no download needed)
notebooklm_generate_slide_deck format: detailed, presenter
notebooklm_generate_report template: briefing, study-guide, blog-post, custom
notebooklm_generate_video format: explainer, brief, cinematic · style: auto, classic, whiteboard, kawaii, anime, watercolor, retro, heritage, paper-craft

Download Results (Step 2 of 2)

Tool Output
notebooklm_download_audio .mp3
notebooklm_download_quiz .json or .md (inferred from file extension)
notebooklm_download_flashcards .json or .md
notebooklm_download_mind_map .json
notebooklm_download_slides .pdf or .pptx
notebooklm_download_video .mp4

Example Workflows

Upload & Query

"Create a notebook called 'AI Research', add this arxiv paper URL, then summarise the key findings."

Study Mode

"Generate flashcards and a quiz from my 'Biology 101' notebook. Make the quiz hard. Download both to ~/Downloads as JSON files."

Podcast Creation

"Generate a long deep-dive audio overview of my 'Product Strategy' notebook, then download it to ~/Downloads/strategy-podcast.mp3"

Product Feedback Analysis

"Create a 'Q1 Feedback' notebook. Add these 3 URLs from our support forum. Then ask: what are the top 5 complaints? Finally generate a briefing report."

Research Pipeline

"Research 'gen AI product management trends'. Import the results into my 'PM Research' notebook. Then generate a detailed slide deck from those sources."

With Filesystem MCP (composability)

If you also have the filesystem MCP server active:

"List all PDFs in ~/Documents/reports. Add each one to my 'Annual Reviews' notebook. Then ask: what were the key outcomes across all reports?"


File Upload Guidelines

Supported formats: PDF, DOCX, TXT, audio (MP3, WAV, M4A), video (MP4, MOV), images (PNG, JPG)

Approximate size limits:

  • Documents (PDF, DOCX, TXT): up to ~100 MB
  • Audio/Video: up to ~500 MB (processing can take 5–10 minutes)
  • Images: up to ~50 MB

Tips:

  • For large PDFs, consider splitting into sections first
  • ~ paths are supported (e.g. ~/Downloads/paper.pdf)
  • Video uploads are slower — extracting audio with ffmpeg first can speed things up

Limitations & Caveats

  • Unofficial APInotebooklm-py reverse-engineers NotebookLM's private API. Google may change it without notice, breaking the server.
  • Experimental only — Not suitable for production or business-critical workflows.
  • Rate limiting — NotebookLM has undocumented rate limits. If you hit errors, wait a few minutes and retry.
  • Audio generation is slow — Expect 3–7 minutes per audio overview.
  • Research polling — The notebooklm_research tool polls for up to 5 minutes. Deep research may occasionally time out; check notebooklm_list_sources afterward to verify.
  • No official Google support — This project is not affiliated with or endorsed by Google.

Session Management

Check if your session is active:

notebooklm auth check

Re-authenticate (session expired):

notebooklm login

Reset and start fresh:

rm -rf ~/.notebooklm/
notebooklm login

Clean up test notebooks:

"List my notebooks and delete the ones with 'test' in the name."


Troubleshooting

Authentication failed Your session has expired. Run notebooklm login again.

Browser not installed / Playwright error

playwright install chromium

File not found Use the full absolute path (e.g. /Users/you/docs/paper.pdf or ~/docs/paper.pdf).

Output directory does not exist Make sure the parent directory of your output_path exists before downloading.

mkdir -p ~/Downloads

Audio/video generation times out Audio takes 3–7 minutes; video can take longer. Retry once — the task may still be running in NotebookLM. You can also check https://notebooklm.google.com directly to see if generation completed.

The underlying APIs changed Check for a new release of notebooklm-py and update:

pip install --upgrade notebooklm-py
# or with uv:
uv sync --upgrade

Python version too old

python3 --version   # must be 3.10+

Install Python 3.10+ from python.org or via your package manager.


License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选