NotebookLM MCP Server
Authenticates with a Google account and automates Google NotebookLM's web UI to manage notebooks and sources, run AI queries, and generate study guides or audio overviews.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
NotebookLM MCP Server
Connect Claude Code to Google NotebookLM using browser automation.
π₯οΈ Claude Code Integration | π€ Browser Automation | π NotebookLM Tools
β οΈ Important Notes
No Official API: This uses browser automation and may break with UI changes
Terms of Service: May violate NotebookLM ToS; for personal/educational use only
Authentication Required: Requires Google account with NotebookLM access
Maintenance Required: UI selectors need updates when NotebookLM changes
Related MCP server: NotebookLM MCP Server
Why Browser Automation (Playwright + Chromium)?
No Public API Available
NotebookLM (free version at https://notebooklm.google.com) provides no programmatic access:
β No REST API
β No Python SDK
β No webhooks or integrations
The only interface is the web UI, which requires browser automation.
Technical Requirements
NotebookLM is a JavaScript single-page application (SPA). To automate it, we need:
JavaScript execution - The UI renders dynamically via JavaScript
DOM manipulation - Click buttons, fill forms, extract data
Google OAuth - Authenticate with Google account
Session management - Maintain cookies and authentication state
Simple HTTP clients cannot work because:
Without JavaScript execution, you get empty HTML:
<div id="root"></div>No access to rendered DOM elements
Cannot handle OAuth authentication flow
Why Playwright + Chromium?
Playwright is the best browser automation tool for Python:
Modern async API with auto-waiting
Python-native support
Multi-architecture (ARM64/AMD64)
Active development
Chromium is required as the browser engine:
Executes JavaScript and renders UI
Handles Google authentication
Provides full browser capabilities
Alternative: NotebookLM Enterprise API
Google offers NotebookLM Enterprise with an official API, but it:
Requires Google Cloud project and enterprise licensing
Only works with enterprise version, not free NotebookLM
API is in alpha (v1alpha)
This project targets free NotebookLM to remain accessible without enterprise requirements.
Reference: NotebookLM Enterprise API Docs
π Quick Start
# 1. Install dependencies
uv sync
uv run playwright install chromium
# 2. Authenticate with Google
uv run python scripts/setup_auth.py
# 3. The .mcp.json file is already configured
# Just use Claude Code and start interacting with NotebookLM!Example Usage in Claude Code
Once configured, try these prompts in Claude Code:
Create and populate a notebook:
Create a new NotebookLM notebook called "AI Research" and add these sources:
- https://arxiv.org/abs/2301.00001
- https://www.youtube.com/watch?v=exampleQuery your notebooks:
List all my NotebookLM notebooks, then query the "AI Research" notebook about
the main findings and create a summary.Generate study materials:
For my "Course Notes" notebook, generate a FAQ study guide and then
generate an audio overview.Organize sources:
Show me all sources in my "Research Papers" notebook and tell me
which ones are YouTube videos vs websites.Transport Modes
The NotebookLM MCP server supports two transport modes:
Stdio Transport (Default - Recommended)
The server is automatically started and stopped by Claude Code. Each project spawns its own instance.
Use when:
β Working on one project at a time
β You want automatic server lifecycle management
β You prefer simplicity
Configuration: Already set up in .mcp.json
HTTP Transport (Advanced - Multi-Project)
Run one server instance and connect to it from multiple projects.
Use when:
β Working on multiple projects simultaneously
β You want to share one server across projects
β You need to reduce resource usage
Quick setup:
# Terminal 1: Start server once
cd /path/to/notebooklm-mcp
MCP_TRANSPORT=streamable-http uv run notebooklm-mcp
# Terminal 2+: In any project, create .mcp.json
{
"mcpServers": {
"notebooklm": {
"type": "http",
"url": "http://localhost:8080/mcp"
}
}
}π Full guide: See HTTP Transport Guide for detailed instructions, background services, and best practices.
Testing the MCP Server
Test the server with MCP Inspector before using with Claude Code:
# Install and run MCP Inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/notebooklm-mcp run notebooklm-mcp
# Opens web interface at http://localhost:5173
# Try calling tools like list_notebooks(), create_notebook(), etc.Watch browser automation (debugging):
# Run with visible browser to see what's happening
NOTEBOOKLM_HEADLESS=false uv run notebooklm-mcpFeatures
Phase 1 - Essential Operations
β List all notebooks
β Create new notebook
β Add sources (website, YouTube, text)
β Query notebook with AI
Phase 2 - Advanced Features
β Generate study guides (FAQ, briefing doc, table of contents)
β Generate audio overview (podcast)
β Get notebook sources
Installation
cd /path/to/notebooklm-mcp
# Install dependencies
uv sync
# Install Playwright browsers
uv run playwright install chromiumAuthentication Setup
Run this once to authenticate with your Google account:
uv run python scripts/setup_auth.pyThis opens a browser where you:
Sign in to your Google account
Navigate to https://notebooklm.google.com
Verify access, then press Enter
Your session is saved to chrome-user-data/ (gitignored).
Configuration
Environment Variables (Optional)
You can configure the MCP server using environment variables. There are two ways to set them:
Option 1: Set Directly in Terminal (Quick Testing)
# Run with custom settings
NOTEBOOKLM_HEADLESS=false LOG_LEVEL=DEBUG uv run notebooklm-mcpOption 2: Use .env File (Persistent Configuration)
Create a .env file in the project root directory (next to README.md):
# From the project root directory
cd /path/to/notebooklm-mcp
cp .env.example .envEdit .env with your preferred settings:
# Example .env file content
NOTEBOOKLM_HEADLESS=true
LOG_LEVEL=INFOThe .env file is automatically loaded when you run the server.
File Location:
notebooklm-mcp/
βββ .env # Your configuration file (create this)
βββ .env.example # Template (already exists)
βββ README.md
βββ pyproject.toml
βββ ...Available Settings
Variable | Default | Description |
|
| Run browser in headless mode. Set to |
|
| Logging verbosity: |
Note: For Claude Code usage, you typically don't need a .env file - the default settings work fine. The .env file is mainly useful for debugging.
Claude Code Integration
The .mcp.json file in the project root configures the MCP server:
{
"mcpServers": {
"notebooklm": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/notebooklm-mcp",
"run",
"notebooklm-mcp"
],
"env": {
"NOTEBOOKLM_HEADLESS": "true"
}
}
}
}Important: Update the --directory path to match your actual project location.
Once configured, Claude Code will automatically load the MCP server when you work in this directory.
Testing
With MCP Inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/notebooklm-mcp run notebooklm-mcpWatch Browser Automation
NOTEBOOKLM_HEADLESS=false uv run notebooklm-mcpIn Claude Code
Try these prompts:
"List my NotebookLM notebooks"
"Create a notebook called 'Test'"
"Add https://example.com to notebook [ID]"
"Ask notebook [ID]: What are the main topics?"
Available Tools
list_notebooks()
List all available NotebookLM notebooks.
Returns: List of notebooks with id, title, and url
Example Output:
[
{
"id": "abc123def456",
"title": "Research Notes",
"url": "https://notebooklm.google.com/notebook/abc123def456"
}
]create_notebook(name: str)
Create a new NotebookLM notebook.
Args:
name: Name for the notebook
Returns: Created notebook details
add_source(notebook_id: str, source_type: str, content: str)
Add a source to a notebook.
Args:
notebook_id: Notebook IDsource_type: "website", "youtube", or "text"content: URL for website/youtube, or raw text
Returns: Status message
query_notebook(notebook_id: str, query: str)
Ask NotebookLM's AI a question about the notebook's sources.
Args:
notebook_id: Notebook IDquery: Question to ask
Returns: AI-generated response as string
generate_study_guide(notebook_id: str, guide_type: str)
Generate a study guide from notebook sources.
Args:
notebook_id: Notebook IDguide_type: "faq", "briefing_doc", or "table_of_contents"
Returns: Status message
generate_audio_overview(notebook_id: str)
Generate an audio overview (podcast) from notebook sources.
Note: This is an async operation in NotebookLM. Audio generation may take several minutes to complete.
Args:
notebook_id: Notebook ID
Returns: Status message
get_notebook_sources(notebook_id: str)
Get list of sources in a notebook.
Args:
notebook_id: Notebook ID
Returns: List of sources with index and title
Troubleshooting
Common Issues
MCP server not showing in Claude Code
Check that
.mcp.jsonexists in the project rootVerify JSON syntax is valid (no trailing commas)
Check the path in config points to your project directory
Restart Claude Code
Run
claude mcp listto verify the server is registered
Authentication expired
# Re-run authentication setup
uv run python scripts/setup_auth.py
# Or delete chrome-user-data and start fresh
rm -rf chrome-user-data
uv run python scripts/setup_auth.pyPlaywright/Chromium issues
# Reinstall Playwright browsers
uv run playwright install chromium --force
uv run playwright install-deps chromium
# On Linux, you may need system dependencies
sudo apt-get install -y \
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libdrm2 libxkbcommon0 libxcomposite1 \
libxdamage1 libxfixes3 libxrandr2 libgbm1 \
libpango-1.0-0 libcairo2 libasound2UI selectors not working
NotebookLM UI may have changed. Inspect the UI in DevTools and update selectors in src/notebooklm_mcp/selectors.py.
Browser automation fails
# Run with visible browser to see what's happening
NOTEBOOKLM_HEADLESS=false uv run notebooklm-mcp
# Enable debug logging
LOG_LEVEL=DEBUG uv run notebooklm-mcpTools not responding in Claude Code
Check if MCP server is registered:
claude mcp listTry simple tool first: "List my NotebookLM notebooks"
Check for errors in the output
Restart Claude Code
Project Structure
notebooklm-mcp/
βββ src/notebooklm_mcp/
β βββ __init__.py
β βββ server.py # FastMCP server with tool definitions
β βββ browser.py # Playwright browser manager
β βββ selectors.py # NotebookLM UI selectors
β βββ utils.py # Helper functions
βββ scripts/
β βββ setup_auth.py # Interactive Google login
βββ chrome-user-data/ # Persistent browser profile (gitignored)
βββ .mcp.json # Claude Code MCP server configuration
βββ pyproject.toml
βββ .env
βββ README.mdLicense
MIT License - Personal/Educational use only
Disclaimer
This project is not affiliated with, endorsed by, or sponsored by Google. Use at your own risk.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Playwright browser automation β navigate, click, fill forms, extract, screenshot β 17 agent tools.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iβ¦
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables automated interactions with Google's NotebookLM through browser automation. Supports persistent sessions, document uploads, notebook management, and streaming chat responses for AI-powered document analysis.83MIT
- FlicenseNot gradedqualityFmaintenanceEnables AI agents to programmatically access Google NotebookLM through browser automation for managing notebooks, sources, and chat interactions. It supports automated content generation including audio overviews, study guides, and quizzes directly within AI workflows.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Google NotebookLM through browser automation, supporting notebook management, source addition, question answering, and audio overview generation.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables browser automation and web interaction control through Playwright, allowing Claude Code to navigate, click, fill forms, take screenshots, and manage sessions.79 npm9MIT