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
访问服务器

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.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选