Skip to content

Repository files navigation

Strato MCP NotebookLM

An MCP server for Google NotebookLM with agent-story-driven tools — shaped around how people actually use NotebookLM, not raw API endpoints.

Rather than exposing 37 RPC methods as individual tools, this server compresses them into 13 workflow-oriented tools across 5 agent stories. Each tool composes multiple API calls and returns compact, agent-friendly results.

Agent Stories

1. Find and Open a Notebook

"Show me my notebooks" → "Open the Research Notes notebook"

Tool What it does
list_notebooks List all notebooks with compact summaries
open_notebook Open by name or ID — returns AI summary, suggested topics, source digests
create_notebook Create a new notebook with optional initial sources

2. Understand a Source

"What is this PDF about?" → "Read the full text of the third source"

Tool What it does
inspect_source Get AI guide (default) or full indexed text; auto-checks freshness for URLs
manage_source Rename, refresh, or remove via action discriminator

3. Ask Questions

"What are the key findings across all sources?" → "Make the answers more concise"

Tool What it does
ask_notebook Ask questions with enriched citations (source titles, not just IDs)
configure_chat Set mode: default, learning_guide, concise, detailed, or custom

4. Generate Artifacts

"Create a podcast from my research" → "Download the audio file"

Tool What it does
generate_artifact Generate audio, video, reports, quizzes, flashcards, mind maps, infographics, slide decks, or data tables
collect_artifact Check status, download to local file, or export to Google Docs/Sheets
list_artifacts Browse existing artifacts, filterable by kind and status

5. Enrich and Share

"Add these three papers to my notebook" → "Share it with my team"

Tool What it does
add_sources Add URLs, YouTube, text, files, Drive — one tool, auto-detection
research_web Fast or deep web research with auto-poll and optional import
share_notebook Status, set public/private, add/remove users via action discriminator

Design Principles

  • Workflow curation over API completeness — 13 tools instead of 37 raw methods
  • Fuzzy resolution — Every notebook and source parameter accepts names or IDs
  • Human-friendly strings"audio", "deep_dive" instead of integer enum codes
  • Progressive disclosure — Skim first (detail="guide"), deep-dive second (detail="fulltext")
  • Fire-and-return — Artifact generation returns immediately; collect_artifact handles polling
  • Actionable errors — "Did you mean: Research Notes?" instead of raw RPC errors

Prerequisites

  • A Google account with access to NotebookLM
  • NotebookLM auth tokens (see Authentication below)

Authentication

This server uses browser-based authentication via notebooklm-py:

pip install notebooklm-py
notebooklm login

This opens a browser for cookie extraction and saves tokens to ~/.notebooklm/storage_state.json.

To use with Docker, export the token as an environment variable:

NOTEBOOKLM_AUTH_JSON=$(cat ~/.notebooklm/storage_state.json)

Then add it to your .env file (see Quick Start below). Tokens expire every 2–4 weeks — re-run notebooklm login to refresh.

Quick start (Docker)

# Build
docker compose build

# Configure
cp .env.example .env
# Fill in NOTEBOOKLM_AUTH_JSON, then lock down the file:
chmod 600 .env

Register with your AI assistant:

Claude

Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env-file", "/absolute/path/to/.env",
        "strato-mcp-notebooklm:latest",
        "serve"
      ]
    }
  }
}

Use the full path to your .env file. Claude Desktop launches Docker from an unknown working directory, so relative paths won't work.

Claude Code:

claude mcp add --transport stdio notebooklm -- \
  docker run --rm -i \
    --env-file /absolute/path/to/.env \
    strato-mcp-notebooklm:latest serve
Gemini CLI

Edit ~/.gemini/settings.json (or .gemini/settings.json in your project root):

{
  "mcpServers": {
    "notebooklm": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env-file", "/absolute/path/to/.env",
        "strato-mcp-notebooklm:latest",
        "serve"
      ]
    }
  }
}
OpenAI Codex

Edit ~/.codex/config.toml (or .codex/config.toml in your project root):

[[mcp_servers]]
name = "notebooklm"
command = "docker"
args = [
  "run", "--rm", "-i",
  "--env-file", "/absolute/path/to/.env",
  "strato-mcp-notebooklm:latest",
  "serve"
]

Configuration

Environment Variable Description Default
NOTEBOOKLM_AUTH_JSON Auth token JSON (from ~/.notebooklm/storage_state.json) (from file)
NOTEBOOKLM_LOG_LEVEL Log level: DEBUG, INFO, WARNING, ERROR WARNING
NOTEBOOKLM_TIMEOUT HTTP timeout in seconds 30.0
NOTEBOOKLM_SOURCE_WAIT_TIMEOUT Max wait for source indexing in seconds 120.0
NOTEBOOKLM_RESEARCH_FAST_TIMEOUT Max wait for fast web research in seconds 60.0
NOTEBOOKLM_RESEARCH_DEEP_TIMEOUT Max wait for deep web research in seconds 300.0
LOCAL_FILES_PATH Host directory to mount for local file uploads (optional) (disabled)

Local file uploads

To upload local PDFs or other files to NotebookLM, mount a host directory into the container. The server makes it available at /files/ inside the container.

1. Set LOCAL_FILES_PATH in your .env:

LOCAL_FILES_PATH=/Users/alice/papers

2. Add --volume to your AI assistant config:

Claude Desktop
{
  "mcpServers": {
    "notebooklm": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env-file", "/absolute/path/to/.env",
        "--volume", "/Users/alice/papers:/files:ro",
        "strato-mcp-notebooklm-mcp",
        "serve"
      ]
    }
  }
}
Claude Code
claude mcp add --transport stdio notebooklm -- \
  docker run --rm -i \
    --env-file /absolute/path/to/.env \
    --volume /Users/alice/papers:/files:ro \
    strato-mcp-notebooklm-mcp serve

3. Use /files/<filename> paths in add_sources:

Host path:      /Users/alice/papers/foo.pdf
Container path: /files/foo.pdf
add_sources:    {"file_path": "/files/foo.pdf"}

The mount is read-only — the server can read your files but cannot modify them. Remove the volumes: block from docker-compose.yml entirely if you don't need file uploads.

Note: collect_artifact action="download" writes to the container filesystem and the file is lost when the container exits. Use action="export" to send artifacts to Google Docs or Sheets instead.

Comparison with Other NotebookLM MCP Servers

Dimension Typical 1:1 Servers This Project
Tool count 16-35 13
Naming API method names Intent-based
Parameters Raw integers, required IDs Human strings, fuzzy resolution
Returns Raw API objects Compact agent-friendly digests
Multi-step workflows Agent chains 3-5 tools Single tool call
Source adding 5 separate tools per type One tool with auto-detection
Sharing 6 separate tools One tool with action discriminator

Development

# Install dev dependencies
uv sync

# Lint
uv run ruff check src/ tests/

# Test
uv run pytest

License

Apache License 2.0

About

MCP server for interacting with NotebookLM

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages