Skip to main content

🚀 NotebookLM MCP

Professional MCP server for Google NotebookLM automation • Available on PyPI • Production Ready

Python 3.10+DeepWikiTestscodecovLicense: MIT

✨ Key Features

  • 🔥 FastMCP v2: Modern decorator-based MCP framework
  • ⚡ UV Python Manager: Lightning-fast dependency management
  • 🚀 Multiple Transports: STDIO, HTTP, SSE support
  • 🎯 Type Safety: Full Pydantic validation
  • 🔒 Persistent Auth: Automatic Google session management
  • 📊 Rich CLI: Beautiful terminal interface with Taskfile automation
  • 🐳 Production Ready: Docker support with monitoring

🏃‍♂️ Quick Start

🎯 For End Users (Recommended)

# Install UV (modern Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install NotebookLM MCP from PyPI
uv add notebooklm-mcp

# Initialize with your NotebookLM URL
uv run notebooklm-mcp init https://notebooklm.google.com/notebook/YOUR_NOTEBOOK_ID

What happens after init:

  • ✅ Creates notebooklm-config.json with your settings
  • ✅ Creates chrome_profile_notebooklm/ folder for persistent authentication
  • ✅ Opens browser for one-time Google login (if needed)
  • ✅ Saves session for future headless operation
# Start server (STDIO for MCP clients)
uv run notebooklm-mcp --config notebooklm-config.json server

# Start HTTP server for web testing
uv run notebooklm-mcp --config notebooklm-config.json server --transport http --port 8001

# Interactive chat mode
uv run notebooklm-mcp --config notebooklm-config.json chat  --message "Who are you ?"

👨‍💻 For Developers

If you're contributing to this project, check out our Taskfile for enhanced developer experience:

git clone https://github.com/khengyun/notebooklm-mcp.git
cd notebooklm-mcp

# Complete setup with development tools
task setup

# Show all available development tasks
task --list

🔧 Alternative Installation

If you prefer pip over UV:

# Install with pip
pip install notebooklm-mcp

# Initialize
notebooklm-mcp init https://notebooklm.google.com/notebook/YOUR_NOTEBOOK_ID

# Start server
notebooklm-mcp --config notebooklm-config.json server

� Project Structure After Init

After running init, your working directory will contain:

your-project/
├── notebooklm-config.json          # Configuration file
├── chrome_profile_notebooklm/      # Browser profile (persistent auth)
│   ├── Default/                    # Chrome profile data
│   ├── SingletonSocket             # Session files
│   └── ...                         # Other Chrome data
└── your-other-files

Key files:

  • notebooklm-config.json: Contains notebook ID, server settings, auth configuration
  • chrome_profile_notebooklm/: Stores Google authentication session (enables headless operation)

�🛠️ Available Tools

Tool Description Parameters
healthcheck Server health status None
send_chat_message Send message to NotebookLM message: str, wait_for_response: bool
get_chat_response Get response with timeout timeout: int
chat_with_notebook Complete interaction message: str, notebook_id?: str
navigate_to_notebook Switch notebooks notebook_id: str
get_default_notebook Current notebook None
set_default_notebook Set default notebook_id: str
get_quick_response Instant response None

👨‍💻 Developer Workflow

For contributors and advanced users who want enhanced productivity, we provide a comprehensive Taskfile with 20+ automation tasks:

# 📦 Dependency Management
task deps-add -- requests       # Add dependency
task deps-add-dev -- pytest     # Add dev dependency
task deps-remove -- requests    # Remove dependency
task deps-list                  # List dependencies
task deps-update                # Update all dependencies

# 🧪 Testing & Quality
task test                       # Run all tests
task test-quick                 # Quick validation test
task test-coverage              # Coverage analysis
task enforce-test               # MANDATORY after function changes
task lint                       # Run all linting
task format                     # Format code (Black + isort + Ruff)

# 🏗️ Build & Release
task build                      # Build package
task clean                      # Clean artifacts

# 🚀 Server Commands
task server-stdio              # STDIO server
task server-http               # HTTP server
task server-sse                # SSE server

# Show all available tasks
task --list

💡 Pro Tip: Install Task for the best developer experience: go install github.com/go-task/task/v3/cmd/task@latest

🌐 Transport Options

STDIO (Default)

task server-stdio
# For: LangGraph, CrewAI, AutoGen

HTTP

task server-http  
# Access: http://localhost:8001/mcp
# For: Web testing, REST APIs

SSE

task server-sse
# Access: http://localhost:8002/
# For: Real-time streaming

🧪 Testing & Development

HTTP Client Testing

from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport

transport = StreamableHttpTransport(url="http://localhost:8001/mcp")
async with Client(transport) as client:
    tools = await client.list_tools()
    result = await client.call_tool("healthcheck", {})

Command Line Testing

# Test with curl
curl -X POST http://localhost:8001/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}'

📊 Client Integration

LangGraph

from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport

# HTTP transport
transport = StreamableHttpTransport(url="http://localhost:8001/mcp")
client = Client(transport)
tools = await client.list_tools()

CrewAI

from crewai_tools import BaseTool
from fastmcp import Client

class NotebookLMTool(BaseTool):
    name = "notebooklm"
    description = "Chat with NotebookLM"
    
    async def _arun(self, message: str):
        client = Client("http://localhost:8001/mcp")
        result = await client.call_tool("chat_with_notebook", {"message": message})
        return result

🔒 Authentication

Automatic Setup

# First time - opens browser for login
notebooklm-mcp init https://notebooklm.google.com/notebook/abc123

# Subsequent runs - uses saved session
notebooklm-mcp --config notebooklm-config.json server

Manual Setup

# Interactive browser login
notebooklm-mcp --config notebooklm-config.json server

# Check connection
notebooklm-mcp --config notebooklm-config.json test --notebook YOUR_NOTEBOOK_ID

🐳 Docker Deployment

Quick Start

# 1. Generate config + Chrome profile with guided login
uv run notebooklm-mcp init https://notebooklm.google.com/notebook/YOUR_NOTEBOOK_ID
# If you installed via pip, run: notebooklm-mcp init https://notebooklm.google.com/notebook/YOUR_NOTEBOOK_ID

# 2. Build the container image
docker build -t notebooklm-mcp .

# 3. Run the server with your mounted config/profile
docker run -d \
  --name notebooklm-mcp \
  --restart unless-stopped \
  -v $(pwd)/notebooklm-config.json:/app/notebooklm-config.json:ro \
  -v $(pwd)/chrome_profile_notebooklm:/app/chrome_profile_notebooklm \
  notebooklm-mcp:latest

With Compose

version: '3.8'
services:
  notebooklm-mcp:
    image: notebooklm-mcp:latest
    build: .
    restart: unless-stopped
    volumes:
      - ./notebooklm-config.json:/app/notebooklm-config.json:ro
      - ./chrome_profile_notebooklm:/app/chrome_profile_notebooklm

Start the stack with docker compose up -d after running the init command once so that notebooklm-config.json and chrome_profile_notebooklm/ exist. The server runs in STDIO mode by default; uncomment the HTTP/SSE ports in docker-compose.yml if your client requires them.

⚙️ Configuration

Config File (notebooklm-config.json)

{
  "default_notebook_id": "your-notebook-id",
  "headless": true,
  "timeout": 30,
  "auth": {
    "profile_dir": "./chrome_profile_notebooklm"
  },
  "debug": false
}

Environment Variables

export NOTEBOOKLM_NOTEBOOK_ID="your-notebook-id"
export NOTEBOOKLM_HEADLESS=true
export NOTEBOOKLM_DEBUG=false

🚀 Performance

FastMCP v2 Benefits

  • ⚡ 5x faster tool registration with decorators
  • 📋 Auto-generated schemas from Python type hints
  • 🔒 Built-in validation with Pydantic
  • 🧪 Better testing and debugging capabilities
  • 📊 Type safety throughout the stack

Benchmarks

Feature Traditional MCP FastMCP v2
Tool registration Manual schema Auto-generated
Type validation Manual Automatic
Error handling Basic Enhanced
Development speed Standard 5x faster
HTTP support Limited Full

🛠️ Development

Setup

git clone https://github.com/khengyun/notebooklm-mcp
cd notebooklm-mcp

# With UV (recommended)
uv sync --all-groups

# Or with pip
pip install -e ".[dev]"

Testing

# Run tests with UV
uv run pytest

# With coverage
uv run pytest --cov=notebooklm_mcp

# Integration tests  
uv run pytest tests/test_integration.py

# Or use Taskfile for development
task test
task test-coverage

Code Quality

# Format code with UV
uv run black src/ tests/
uv run ruff check src/ tests/

# Type checking
uv run mypy src/

# Or use Taskfile shortcuts
task format
task lint

📚 Documentation

🔗 Related Projects

📄 License

MIT License - see LICENSE file for details.

🆘 Support


Built with ❤️ using FastMCP v2 - Modern MCP development made simple!

Metadata

Release files for iflow-mcp_khengyun-notebooklm-mcp 2.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_khengyun-notebooklm-mcp 2.0.11
File Size Uploaded
iflow_mcp_khengyun_notebooklm_mcp-2.0.11.tar.gz 37.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_khengyun-notebooklm-mcp 2.0.11
File Interpreter ABI Platform
iflow_mcp_khengyun_notebooklm_mcp-2.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 64.9 kB

Release files / iflow_mcp_khengyun_notebooklm_mcp-2.0.11.tar.gz

Download URL iflow_mcp_khengyun_notebooklm_mcp-2.0.11.tar.gz
Size 37.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c8360cfe6e704a340b727bcdfd9e5b50334c16122797fce359d1e3c83f670ab1
BLAKE2b-256 checksum
How to use checksums
cd7b07cb92de7741104bfabebba3eb265d0a6c7a485766c6f90b900d8bca3f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_khengyun_notebooklm_mcp-2.0.11-py3-none-any.whl

Download URL iflow_mcp_khengyun_notebooklm_mcp-2.0.11-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
709864b06cdecacc5f5d9ac924a82be741f6be3176ea7221fbccddbfecd5c3d7
BLAKE2b-256 checksum
How to use checksums
08012c8cdfc6239560c1874907f55d3056fbe0e7ac518c4ddcbb2bf6d4047f1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

2.0.11 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page