Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NotebookLM MCP Servergenerate a study guide for my 'Machine Learning' notebook"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 installStep 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-cookiesA Chrome browser will open β sign in to your Google account
Navigate to NotebookLM and verify you can see your notebooks
Switch back to the terminal and press Enter
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=sfoStep 4 β Test locally
npm run dev
# MCP endpoint: http://localhost:3000/api/mcpStep 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 --prodYour MCP server will be live at:
https://your-project.vercel.app/api/mcpStep 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 |
| List all notebooks in your account |
| Create a new notebook |
| Get details of a notebook by ID |
| Delete a notebook permanently |
Sources
Tool | Description |
| List all sources in a notebook |
| Add a website URL as a source |
| Add a YouTube video as a source |
| Add plain text as a source |
| Remove a source from a notebook |
Chat / Query
Tool | Description |
| Ask a question (single turn) |
| Multi-turn conversation (up to 10 questions) |
Content Generation
Tool | Description |
| Generate an Audio Overview (podcast) |
| Generate a quiz |
| Generate flashcards |
| Generate a mind map |
| Generate a slide deck |
| Generate a study guide |
| Generate a briefing document |
Utility
Tool | Description |
| Verify Browserless.io connection and session validity |
π Session Management
Google sessions typically last 30β90 days. When your session expires:
Run
npm run get-cookiesagain on your local machineCopy the new
NOTEBOOKLM_STORAGE_STATEvalueUpdate it in Vercel:
vercel env rm NOTEBOOKLM_STORAGE_STATE && vercel env add NOTEBOOKLM_STORAGE_STATERe-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-cookieswhen 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.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.