NotebookLM MCP Server

NotebookLM MCP Server

Enables 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.

Category
Visit Server

README

NotebookLM MCP Server

A remote Model Context Protocol (MCP) server that gives AI agents (Claude, Cursor, Copilot, etc.) full programmatic access to Google NotebookLM via browser automation.

Hosted on Vercel Β· Browser powered by Browserless.io


πŸ—ΊοΈ Architecture

AI Agent (Claude / Cursor)
        β”‚  MCP (Streamable HTTP)
        β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  Vercel Function    β”‚  ← Next.js App Router
  β”‚  (TypeScript / MCP) β”‚     mcp-handler adapter
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚  WebSocket (CDP)
            β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  Browserless.io     β”‚  ← Remote headless Chromium
  β”‚  (free tier)        β”‚     stealth mode enabled
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚  Playwright
            β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  Google NotebookLM  β”‚  ← Authenticated via stored cookies
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⚑ Quick Start

Prerequisites

  • Node.js 18+
  • A free Browserless.io account β†’ get your API token
  • A Google account with access to NotebookLM
  • A Vercel account

Step 1 β€” Clone & install

git clone <your-repo-url>
cd notebooklm-mcp
npm install

Step 2 β€” Extract Google cookies (one-time)

This step opens a browser window for you to sign in. Runs locally only.

# Install playwright for local cookie extraction
npm install playwright --save-dev
npx playwright install chromium

# Run the extractor
npm run get-cookies
  1. A Chrome browser will open β†’ sign in to your Google account
  2. Navigate to NotebookLM and verify you can see your notebooks
  3. Switch back to the terminal and press Enter
  4. The script prints a NOTEBOOKLM_STORAGE_STATE=... value β€” copy it

Step 3 β€” Configure environment variables

Copy .env.example to .env.local and fill in your values:

cp .env.example .env.local
# From https://browserless.io β†’ your dashboard
BROWSERLESS_TOKEN=your_token_here

# From the get-cookies script output
NOTEBOOKLM_STORAGE_STATE=eyJjb29...

# Optional: closest region (sfo | lon | sea | fra)
BROWSERLESS_REGION=sfo

Step 4 β€” Test locally

npm run dev
# MCP endpoint: http://localhost:3000/api/mcp

Step 5 β€” Deploy to Vercel

# Install Vercel CLI
npm i -g vercel

# Deploy (follow the prompts)
vercel

# Add your environment variables (or use the Vercel dashboard)
vercel env add BROWSERLESS_TOKEN
vercel env add NOTEBOOKLM_STORAGE_STATE
vercel env add BROWSERLESS_REGION

# Deploy to production
vercel --prod

Your MCP server will be live at:

https://your-project.vercel.app/api/mcp

Step 6 β€” Connect your AI agent

Claude Desktop (~/Library/Application\ Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "notebooklm": {
      "url": "https://your-project.vercel.app/api/mcp"
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "notebooklm": {
      "url": "https://your-project.vercel.app/api/mcp"
    }
  }
}

πŸ› οΈ Available MCP Tools

Notebooks

Tool Description
notebooklm_list_notebooks List all notebooks in your account
notebooklm_create_notebook Create a new notebook
notebooklm_get_notebook Get details of a notebook by ID
notebooklm_delete_notebook Delete a notebook permanently

Sources

Tool Description
notebooklm_list_sources List all sources in a notebook
notebooklm_add_source_url Add a website URL as a source
notebooklm_add_source_youtube Add a YouTube video as a source
notebooklm_add_source_text Add plain text as a source
notebooklm_remove_source Remove a source from a notebook

Chat / Query

Tool Description
notebooklm_ask Ask a question (single turn)
notebooklm_conversation Multi-turn conversation (up to 10 questions)

Content Generation

Tool Description
notebooklm_generate_audio Generate an Audio Overview (podcast)
notebooklm_generate_quiz Generate a quiz
notebooklm_generate_flashcards Generate flashcards
notebooklm_generate_mindmap Generate a mind map
notebooklm_generate_slideshow Generate a slide deck
notebooklm_generate_study_guide Generate a study guide
notebooklm_generate_briefing Generate a briefing document

Utility

Tool Description
notebooklm_health_check Verify Browserless.io connection and session validity

πŸ”‘ Session Management

Google sessions typically last 30–90 days. When your session expires:

  1. Run npm run get-cookies again on your local machine
  2. Copy the new NOTEBOOKLM_STORAGE_STATE value
  3. Update it in Vercel: vercel env rm NOTEBOOKLM_STORAGE_STATE && vercel env add NOTEBOOKLM_STORAGE_STATE
  4. Re-deploy: vercel --prod

The notebooklm_health_check tool will tell you if the session is still valid.


πŸ’° Browserless.io Free Tier

The free tier gives you ~1,000 units/month.

Operation Approx. cost
List notebooks ~1 unit
Add a URL source ~2–3 units
Ask a question ~2 units
Generate audio ~2 units

For typical personal use (~50–100 tool calls/month), the free tier is more than sufficient.


⚠️ Limitations

  • Vercel Hobby timeout: Functions are limited to 60 seconds. Long-running operations (audio generation) are started asynchronously and must be checked in the NotebookLM UI.
  • Session expiry: Google cookies expire. Re-run get-cookies when authentication fails.
  • UI changes: NotebookLM is a product under active development. If selectors break, open an issue.
  • Unofficial: This uses browser automation, not an official API. Google could change NotebookLM's interface at any time.

πŸ”§ Troubleshooting

"Session has expired" error β†’ Re-run npm run get-cookies and update NOTEBOOKLM_STORAGE_STATE in Vercel.

"BROWSERLESS_TOKEN is not set" error β†’ Add the token in Vercel dashboard β†’ Settings β†’ Environment Variables.

Tool returns "Could not find button" error β†’ NotebookLM's UI may have been updated. Check the notebooklm-py repo for updated selectors.

Timeout errors β†’ Browserless.io free tier may be under load. Wait a few minutes and retry.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured