Skip to content
Conduit

mcp server

notebooklm-mcp

Secure MCP server for Google NotebookLM — 16 tools, AES-256-GCM encrypted cookies, macOS Keychain, browser sandbox enabled

ers123/notebooklm-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 22, 2026

notebooklm-mcp

A secure MCP (Model Context Protocol) server for Google NotebookLM. Enables AI assistants to interact with NotebookLM notebooks — manage notebooks, query sources, create audio/video/reports, run research, and more.

v2 uses direct HTTP API calls (no browser automation at runtime), making it significantly faster than v1 while maintaining all security hardening.

Security

Issue in existing MCPsOur fix
Plaintext cookie storageAES-256-GCM encrypted, key in macOS Keychain
No file permissions0o700 dirs, 0o600 files, verified on read
--no-sandbox ChromeSandbox enabled; --no-sandbox in blocklist
Remote debug port exposed--remote-debugging-port in blocklist
Stored Google passwordManual login only — no credential storage
No URL validationAll URLs validated against notebooklm.google.com
Prompt injection via DOMResponse sanitizer strips zero-width chars, flags injection patterns
All cookies storedOnly .google.com + notebooklm.google.com persisted
exec() for shell commandsexecFile() to prevent shell injection

Tools (35)

Authentication (3)

ToolDescription
setup_authInteractive login (headful browser, one-time setup)
check_authValidate auth status
clear_authClear all stored auth data

Notebook Management (7)

ToolDescription
notebook_listList all notebooks in your account
notebook_createCreate a new notebook
notebook_getGet notebook details including sources
notebook_describeGet AI-generated summary and suggested topics
notebook_renameRename a notebook
notebook_deleteDelete a notebook (requires confirm=true)
chat_configureConfigure AI chat settings (goal, response length, custom prompt)

Source Management (8)

ToolDescription
source_add_urlAdd a URL or YouTube link as source
source_add_textAdd text content as source
source_add_driveAdd a Google Drive document as source
source_describeGet AI-generated source summary
source_get_contentGet original text content of a source
source_list_driveList Drive sources with sync status
source_sync_driveSync a Drive source to latest version
source_deleteDelete a source (requires confirm=true)

AI Query (1)

ToolDescription
notebook_queryAsk questions about notebook sources (supports follow-ups)

Research (3)

ToolDescription
research_startStart web research (fast or deep mode)
research_statusCheck research task progress
research_importImport research results as notebook source

Studio Content (10)

ToolDescription
audio_createGenerate audio podcast (format, length, language, focus)
video_createGenerate video overview (visual style, language, focus)
report_createGenerate report (briefing doc, study guide, FAQ, timeline, blog)
flashcards_createGenerate flashcards (difficulty)
quiz_createGenerate quiz (question count, difficulty)
infographic_createGenerate infographic (orientation, detail level)
slide_deck_createGenerate slide deck (format, length)
data_table_createGenerate data table
studio_statusCheck generation status of any studio artifact
studio_deleteDelete a studio artifact (requires confirm=true)

Mind Map (3)

ToolDescription
mind_map_createGenerate a mind map from sources (synchronous, returns immediately)
mind_map_listList all mind maps in a notebook
mind_map_deleteDelete a mind map (requires confirm=true)

Requirements

  • Node.js 18+
  • macOS (uses Keychain for key storage)
  • Google account with NotebookLM access

Installation

git clone https://github.com/ers123/notebooklm-mcp.git
cd notebooklm-mcp
npm install
npm run build
npx patchright install chromium   # needed for one-time setup_auth only

Configuration

Claude Code

Add to ~/.claude/mcp_config.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "node",
      "args": ["/path/to/notebooklm-mcp/dist/index.js"]
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "node",
      "args": ["/path/to/notebooklm-mcp/dist/index.js"]
    }
  }
}

Any MCP Client (stdio)

node /path/to/notebooklm-mcp/dist/index.js

Usage

First-time setup

  1. Connect the MCP server to your AI assistant
  2. Run setup_auth — a browser window opens
  3. Sign in to your Google account manually
  4. The browser closes automatically after successful login
  5. Cookies are encrypted and stored securely
  6. All subsequent API calls use HTTP directly (no browser needed)

Example workflows

# List your notebooks
Use notebook_list

# Create a notebook and add sources
Use notebook_create with title "AI Research"
Use source_add_url with notebookId "..." and url "https://example.com/paper.pdf"
Use source_add_text with notebookId "..." and title "Notes" and content "..."

# Query your notebook
Use notebook_query with notebookId "..." and question "What are the key findings?"
Use notebook_query with notebookId "..." and question "Tell me more" and followUp true

# Generate content
Use audio_create with notebookId "..." and format "conversation" and length "medium"
Use report_create with notebookId "..." and reportFormat "briefing_doc"
Use studio_status with notebookId "..." and artifactId "..." to check progress

# Run web research
Use research_start with notebookId "..." and query "latest AI developments" and mode "deep"
Use research_status with notebookId "..." and taskId "..." to check progress
Use research_import with notebookId "..." and taskId "..." to add results as source

Architecture

src/
├── index.ts                    # Entry point + stdio transport
├── server.ts                   # 35 MCP tools registered
├── config.ts                   # Constants, API endpoints, timeouts
├── types.ts                    # Shared interfaces
├── errors.ts                   # Error class hierarchy
├── api/                        # HTTP API layer (v2 core)
│   ├── rpc-client.ts           # batchexecute RPC client
│   ├── query-client.ts         # Streaming query client
│   ├── response-parser.ts      # Anti-XSSI removal + chunk parsing
│   └── constants.ts            # RPC IDs + code mappings
├── security/                   # Keychain, AES-256-GCM, file perms, URL validation, sanitizer
├── auth/                       # Manual login flow, encrypted cookie store
├── browser/                    # Patchright launcher (setup_auth only)
└── tools/                      # 35 MCP tool handlers
    ├── notebook/               # list, create, get, describe, rename, delete, chat-configure
    ├── source/                 # add-url, add-text, add-drive, describe, get-content, list-drive, sync-drive, delete
    ├── query/                  # notebook-query (AI Q&A with follow-ups)
    ├── research/               # start, status, import
    ├── studio/                 # audio, video, report, flashcards, quiz, infographic, slide-deck, data-table, mind-map, status, delete
    └── auth-tools/             # setup, check, clear auth

Development

npm run dev          # Run with tsx (hot reload)
npm run build        # Compile TypeScript
npm test             # Run unit tests
npm run test:watch   # Run tests in watch mode

Dependencies

Only 2 runtime dependencies:

  • @modelcontextprotocol/sdk — MCP server framework
  • zod — Input validation

Optional:

  • patchright — Browser automation (only needed for setup_auth)

No native modules. Encryption via Node.js built-in crypto. Keychain via child_process.execFile.

Acknowledgments

The NotebookLM internal API structure (RPC IDs, parameter formats, response schemas) was informed by community reverse-engineering efforts, including wonseokjung/notebooklm-mcp. All implementation code is original.

License

MIT

↑↓ navigate openesc close