| name | notebooklm-mcp-cli |
| description | Programmatic access to Google NotebookLM via CLI and MCP server for AI agents |
| triggers | ["create a notebooklm notebook","generate a podcast from these sources","add sources to notebooklm","query my notebooklm notebook","setup notebooklm mcp server","create studio content in notebooklm","download notebooklm audio","share a notebooklm notebook"] |
NotebookLM MCP CLI
Skill by ara.so — Devtools Skills collection.
Overview
NotebookLM MCP CLI provides programmatic access to Google NotebookLM through:
- CLI (
nlm): Direct terminal commands for scripting and automation
- MCP Server (
notebooklm-mcp): Model Context Protocol server for AI agents (Claude, Gemini, Cursor, etc.)
Both interfaces access the same NotebookLM API capabilities: notebook management, source addition, audio/video generation, research automation, and sharing.
Important: Uses undocumented internal APIs requiring browser cookie extraction. Supports NotebookLM Pro/free and Google AI Ultra accounts.
Installation
uv tool install notebooklm-mcp-cli
pip install notebooklm-mcp-cli
pipx install notebooklm-mcp-cli
nlm --version
This installs both:
nlm - CLI interface
notebooklm-mcp - MCP server
Authentication
Initial Setup
nlm login
nlm login --check
nlm login --manual --file cookies.txt
Profile Management (Multiple Google Accounts)
nlm login --profile work
nlm login --profile personal
nlm login switch work
nlm login profile list
nlm login profile delete personal
Browser Selection
nlm config set auth.browser brave
CLI Usage
Notebook Management
nlm notebook list
nlm notebook create "Research Project"
nlm notebook get <notebook-id>
nlm notebook delete <notebook-id>
nlm notebook rename <notebook-id> "New Name"
Adding Sources
nlm source add <notebook-id> --url "https://example.com"
nlm source add <notebook-id> --text "Your content here" --title "Notes"
nlm source add <notebook-id> --drive-id "1ABC..." --title "Document"
nlm source add <notebook-id> --file ./document.pdf
nlm source add <notebook-id> \
--url "https://site1.com" \
--url "https://site2.com" \
--text "Summary notes"
nlm source list <notebook-id>
nlm source delete <notebook-id> <source-id>
Querying Notebooks
nlm notebook query <notebook-id> "What are the key findings?"
nlm notebook query <notebook-id> "Summarize this" \
--grounding "Always cite sources" \
--format-as markdown
Studio Content Creation
nlm studio create <notebook-id> --type audio --confirm
nlm studio create <notebook-id> --type video --confirm
nlm studio create <notebook-id> --type slides --confirm
nlm studio create <notebook-id> --type audio
nlm studio list <notebook-id>
Revising Slides
nlm slides revise <notebook-id> <artifact-id> \
--slides 1,3,5 \
--instruction "Add more technical details and code examples"
nlm slides revise <notebook-id> <artifact-id> \
--instruction "Make the tone more casual"
nlm slides status <notebook-id> <revision-id>
Downloading Artifacts
nlm download audio <notebook-id> <artifact-id> --output podcast.wav
nlm download video <notebook-id> <artifact-id> --output presentation.mp4
nlm download slides <notebook-id> <artifact-id> --output deck.pdf
nlm download audio <notebook-id> <artifact-id>
Sharing
nlm share public <notebook-id>
nlm share invite <notebook-id> user@example.com
nlm share status <notebook-id>
nlm share revoke <notebook-id>
Research Automation
nlm research start <notebook-id> \
--query "quantum computing breakthroughs 2024" \
--query "quantum error correction"
nlm research drive <notebook-id> \
--drive-id "1ABC..." \
--query "financial trends"
nlm research status <notebook-id> <research-id>
Batch Operations
nlm batch query "What are the main themes?" \
--notebooks <id1> <id2> <id3>
nlm batch create \
--names "Project A" "Project B" "Project C"
nlm batch delete --notebooks <id1> <id2> <id3> --confirm
Cross-Notebook Queries
nlm cross query "Compare the methodologies" \
--notebooks <id1> <id2> <id3>
nlm cross query "What are common themes?" \
--tags research papers
Tagging
nlm tag add <notebook-id> research important
nlm tag list
nlm tag select research
Pipelines (Multi-Step Workflows)
nlm pipeline run research-to-podcast \
--notebook <notebook-id> \
--urls "https://site1.com,https://site2.com"
nlm pipeline list
cat > my-pipeline.yaml <<EOF
name: research-to-podcast
steps:
- type: source_add
urls: {{ urls }}
- type: studio_create
content_type: audio
EOF
nlm pipeline run my-pipeline.yaml --notebook <id> --urls "https://..."
MCP Server Setup
Automatic Configuration
nlm setup add claude-code
nlm setup add claude-desktop
nlm setup add gemini
nlm setup add github-copilot
nlm setup add cursor
nlm setup add windsurf
nlm setup add cline
nlm setup add antigravity
nlm setup add json
nlm setup list
nlm setup remove claude-code
Manual MCP Configuration
If automatic setup doesn't work, manually add to your MCP client config:
{
"mcpServers": {
"notebooklm-mcp": {
"command": "notebooklm-mcp",
"args": [],
"env": {
"NOTEBOOKLM_PROFILE": "default"
}
}
}
}
Config file locations:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
- Cursor:
~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
- Gemini CLI:
~/.config/gemini-ai/mcp.json
Install AI Skills (Optional)
nlm skill install cline
nlm skill install claude-code
nlm skill install gemini
nlm skill update cline
nlm skill list
MCP Tools Reference
Core Tools
notebook_list()
notebook_create(title="Research Project")
source_add(
notebook_id="abc123",
urls=["https://example.com"],
texts=[{"content": "Notes", "title": "Summary"}],
drive_ids=["1ABC..."],
files=["/path/to/file.pdf"]
)
notebook_query(
notebook_id="abc123",
query="What are the key findings?",
grounding_instruction="Cite sources",
format_as="markdown"
)
studio_create(
notebook_id="abc123",
content_type="audio",
confirm=True
)
download_artifact(
notebook_id="abc123",
artifact_id="xyz789",
artifact_type="audio",
output_path="podcast.wav"
)
notebook_share_public(notebook_id="abc123")
notebook_share_invite(notebook_id="abc123", email="user@example.com")
Advanced Tools
research_start(
notebook_id="abc123",
queries=["topic 1", "topic 2"],
source_type="web"
)
batch_query(
query="Compare approaches",
notebook_ids=["id1", "id2", "id3"]
)
cross_notebook_query(
query="What are common patterns?",
notebook_ids=["id1", "id2"],
tags=["research"]
)
pipeline_run(
pipeline_name="research-to-podcast",
notebook_id="abc123",
params={"urls": ["https://site.com"]}
)
studio_revise(
notebook_id="abc123",
artifact_id="xyz789",
instruction="Add more technical details",
slide_numbers=[1, 3, 5]
)
Common Workflows
Research Paper to Podcast
#!/bin/bash
NOTEBOOK_ID=$(nlm notebook create "Research Summary" | jq -r '.id')
nlm source add $NOTEBOOK_ID \
--url "https://arxiv.org/pdf/2024.12345.pdf" \
--url "https://related-paper.com"
nlm studio create $NOTEBOOK_ID --type audio --confirm
sleep 60
ARTIFACT_ID=$(nlm studio list $NOTEBOOK_ID | jq -r '.[0].id')
nlm download audio $NOTEBOOK_ID $ARTIFACT_ID --output research.wav
Automated Weekly Research Digest
import subprocess
import json
result = subprocess.run(
["nlm", "notebook", "create", "Weekly Digest"],
capture_output=True, text=True
)
notebook_id = json.loads(result.stdout)["id"]
urls = [
"https://news.ycombinator.com/best",
"https://paperswithcode.com/latest",
]
subprocess.run([
"nlm", "source", "add", notebook_id,
*[f"--url={url}" for url in urls]
])
subprocess.run([
"nlm", "notebook", "query", notebook_id,
"Summarize the key developments this week"
])
subprocess.run([
"nlm", "studio", "create", notebook_id,
"--type=video", "--confirm"
])
Multi-Notebook Cross-Analysis
nlm tag add nb1 quarterly-review finance
nlm tag add nb2 quarterly-review finance
nlm tag add nb3 quarterly-review finance
nlm cross query "Compare revenue growth patterns" --tags quarterly-review finance
nlm cross query "What are the common risks?" --notebooks nb1 nb2 nb3
Configuration
nlm config list
nlm config set auth.browser brave
nlm config set download.output_dir ~/Downloads/notebooklm
nlm config set logging.level debug
nlm config reset
Troubleshooting
Diagnose Issues
nlm doctor
nlm login --check
nlm setup list
Common Issues
Authentication expired:
nlm login --force
MCP server not responding:
Rate limiting:
nlm studio create <id> --type audio
sleep 30
nlm studio create <id2> --type audio
Profile switching:
nlm login switch work
nlm login switch personal
Debug Logging
nlm --debug notebook list
tail -f ~/.notebooklm-mcp-cli/logs/nlm.log
Best Practices
- Use profiles for multiple Google accounts to avoid re-authenticating
- Tag notebooks for easier cross-notebook queries and organization
- Wait for studio content - audio/video generation takes 3-5 minutes
- Batch operations for efficiency when working with multiple notebooks
- Disable MCP when not using NotebookLM to preserve AI context window
- Use pipelines for repeatable multi-step workflows
- Check status before downloading - artifacts may still be generating
Environment Variables
export NOTEBOOKLM_PROFILE=work
export NOTEBOOKLM_CONFIG_DIR=~/.config/notebooklm
export NOTEBOOKLM_DEBUG=1
Limitations
- Uses internal APIs that may change without notice
- Requires cookie extraction from browser session
- Rate limits apply (space out studio content creation)
- No official support from Google - personal/experimental use only
- Context window - 35 MCP tools consume significant context in AI assistants
Additional Resources