通过命令行接口 (CLI)、模型上下文协议 (MCP) 服务器和 AI 代理技能来程序化访问 Gemini 记事本。
通过命令行接口 (CLI)、模型上下文协议 (MCP) 服务器和 AI 代理技能来程序化访问 Gemini 记事本。
Programmatic access to Gemini Notebook — via command-line interface (CLI) or Model Context Protocol (MCP) server.
Note: Personal/consumer accounts are tested regularly. Gemini Notebook Enterprise support is experimental. The documented
notebook.cloud.google.comhost has been live-verified with a project-qualifiedglobaldeployment; other Enterprise host variants may require additional validation.
☕ If you find notebooklm-mcp-cli useful, consider buying me a coffee. It's free and built in my spare time — but testing every Gemini Notebook feature takes real time and resources. A coffee helps me cover it and keep shipping. Thank you!
Watch the Demos
Use nlm directly in your terminal for scripting, automation, or interactive use:
nlm notebook list # List all notebooks
nlm notebook create "Research Project" # Create a notebook
nlm source add <notebook> --url "https://..." # Add sources
nlm audio create <notebook> --confirm # Generate podcast
nlm download audio <notebook> --id <artifact-id> # Download audio file
nlm download all <notebook> -d ./exports # Download every artifact
nlm share public <notebook> # Enable public link
Run nlm --ai for comprehensive AI-assistant documentation.
Connect AI assistants (Claude, Gemini, Cursor, etc.) to Gemini Notebook:
# Automatic setup — picks the right config for each tool
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 cline
nlm setup add antigravity
# Generate JSON config for any other tool
nlm setup add json
Then use natural language: "Create a notebook about quantum computing and generate a podcast"
nlm notebook list
notebook_list
Create notebook
nlm notebook create
notebook_create
Add Sources (URL, Text, Drive, File)
nlm source add
source_add
Query notebook (persists to web UI)
nlm notebook query
notebook_query
List/view/export chat sessions
nlm chats list/get/export
chat_list/chat_get/chat_export
Create Studio Content (Audio, Video, etc.)
nlm studio create
studio_create
Revise slide decks
nlm slides revise
studio_revise
Download artifacts
nlm download <type>
download_artifact
Download all artifacts (one or all notebooks)
nlm download all
download_all_artifacts
Web/Drive research
nlm research start
research_start
Share notebook
nlm share public/invite
notebook_share_*
Sync Drive sources
nlm source sync
source_sync_drive
Batch operations
nlm batch query/create/delete
batch
Cross-notebook query
nlm cross query
cross_notebook_query
Pipelines (multi-step workflows)
nlm pipeline run/list
pipeline
Tag & smart select
nlm tag add/list/select
tag
Configure AI tools
nlm setup add/remove/list
—
Install AI Skills
nlm skill install/update
—
Diagnose issues
nlm doctor
—
Check remaining plan usage
nlm usage [--profile <name>]
usage_get
More Documentation:
This MCP and CLI use internal APIs that:
Use at your own risk for personal/experimental purposes.
Claude Desktop users: Download the extension (
.mcpbfile) → double-click → done! One-click install, no config needed.
Install from PyPI. This single package includes both the CLI and MCP server:
uv tool install notebooklm-mcp-cli
uvx --from notebooklm-mcp-cli nlm --help
uvx --from notebooklm-mcp-cli notebooklm-mcp
pip install notebooklm-mcp-cli
pipx install notebooklm-mcp-cli
After installation, you get:
nlm — Command-line interfacenotebooklm-mcp — Gemini Notebook MCP server for AI assistants# Clone the repository
git clone https://github.com/jacob-bd/gemini-notebook-mcp-cli.git
cd notebooklm-mcp
# Install with uv
uv tool install .
# Using uv
uv tool upgrade notebooklm-mcp-cli
# Using pip
pip install --upgrade notebooklm-mcp-cli
# Using pipx
pipx upgrade notebooklm-mcp-cli
After upgrading, restart your AI tool to reconnect to the updated MCP server:
/mcp to reconnectIf you previously installed the separate CLI and MCP packages, you need to migrate to the unified package.
uv tool list | grep notebooklm
Legacy packages to remove:
Package What it wasnotebooklm-cli
Old CLI-only package
notebooklm-mcp-server
Old MCP-only package
# Remove old CLI package (if installed)
uv tool uninstall notebooklm-cli
# Remove old MCP package (if installed)
uv tool uninstall notebooklm-mcp-server
After removing legacy packages, reinstall to fix symlinks:
uv tool install --force notebooklm-mcp-cli
Why
--force? When multiple packages provide the same executable,uvcan leave broken symlinks after uninstalling. The--forceflag ensures clean symlinks.
uv tool list | grep notebooklm
You should see only:
notebooklm-mcp-cli v0.2.0
- nlm
- notebooklm-mcp
Your existing cookies should still work, but if you encounter auth issues:
nlm login
Note: The configured MCP server name is now
gemini-notebook-mcp. The executable remainsnotebooklm-mcpfor compatibility with existing installations.
If you are setting up the tool for the first time — or migrating from a browser-based Gemini Notebook MCP — see the Getting Started Guide. It covers install, login, agent registration, and a step-by-step migration path that avoids the "two Gemini Notebook servers registered" trap.
To completely remove the MCP:
# Using uv
uv tool uninstall notebooklm-mcp-cli
# Using pip
pip uninstall notebooklm-mcp-cli
# Using pipx
pipx uninstall notebooklm-mcp-cli
# Remove cached auth tokens and data (optional)
rm -rf ~/.notebooklm-mcp-cli
Also remove from your AI tools:
nlm setup remove claude-code
nlm setup remove cursor
# ... or any configured tool
Before using the CLI or MCP, you need to authenticate with Gemini Notebook:
# Auto mode: launches your browser, you log in, cookies extracted automatically
nlm lo
暂无开放 Issues,或尚未同步最近议题。