关于 notebooklm
通过 notebooklm-mcp-cli 管理 NotebookLM 笔记本、来源、查询和生成内容的技能。它还介绍批量工作流与基于来源的研究,并通过浏览器向 Google API 进行身份验证。
主要功能
- 01创建和管理笔记本
- 02添加、整理和查询来源
- 03生成并导出 Studio 内容
- 04跨笔记本执行批量操作
- 05运行研究与多步骤流水线
- 06按主题标记来源
适用场景
- 01收集项目研究资料并提出有据可查的问题
- 02汇总多个笔记本中的发现
- 03生成报告、幻灯片、音频或视频
- 04用主题标签整理来源
MCP 相关
使用 notebooklm-mcp-cli MCP 服务管理笔记本、来源、查询、生成内容和批量工作流,并说明 MCP 配置与身份验证方法。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ yonatangross/ orchestkit --skill notebooklm安装后在 Claude Code 中输入/notebooklm确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
test-cases.jsonrules/_sections.md_template.mdsetup-quickstart.mdworkflow-batch-pipelines.mdworkflow-knowledge-base.mdworkflow-research-discovery.mdworkflow-research-offload.mdworkflow-second-brain.mdworkflow-sharing-collaboration.mdworkflow-studio-content.mdworkflow-versioned-notebooks.md详细介绍
NotebookLM
NotebookLM = 外部 RAG 引擎,可将阅读任务移出你的上下文窗口。使用 notebooklm-mcp-cli MCP 服务(PyPI,v0.6.1+)创建笔记本、管理来源、生成内容、按主题为来源添加标签,并通过有据可依的 AI 响应进行查询。支持跨笔记本批量操作、管道以及多语言内容生成。
免责声明:通过浏览器身份验证使用 Google 内部未公开的 API。会话持续约 20 分钟。API 可能会随时更改,恕不另行通知。
新增内容(2026 年 4 月 — v0.6.1)
- 来源标签(v0.6.0 新增) — 将来源整理为主题类别。新增
labelMCP 工具和nlm labelCLI:auto(根据来源由 AI 生成,至少需要 5 个)、list、create、rename、delete、assign、unassign。标签会显示在 NotebookLM 网页版的来源筛选器中。 - 重新整理标签(v0.6.1 新增) —
nlm label reorganize(或使用action="reorganize"的labelMCP)可在已有标签时强制 AI 重新分类。支持两种模式:所有来源(替换现有标签,需使用--confirm)或仅未标记来源(保留现有标签)。 - 视频格式 — 3 种格式(讲解、简报、电影感)+ 9 种视觉风格
- 音频时长 —
audio_length参数:short、default、long - PPTX 导出 — 除 PDF 外,还可使用
download_artifact(slide_deck_format="pptx") - 批量来源操作 —
source_add(urls=[...])、source_delete(source_ids=[...])、source_add(wait=True) - 工作室成品重命名 —
studio_status(action="rename", artifact_id="...", new_title="...") - 幻灯片/报告/测验参数 —
slide_format、report_format、difficulty+question_count - 信息图选项 —
orientation、detail_level、11 种infographic_style选项 - 音频来源 — 上传 m4a、wav、mp3、aac、ogg、opus
- 大型查询异步处理 — 针对含 50 个以上来源的笔记本使用
notebook_query_start/notebook_query_status - 多浏览器身份验证 — Arc、Brave、Edge、Chromium、Vivaldi、Opera + WSL2(
nlm login --wsl) - 企业版 — Google Workspace 部署可使用
NOTEBOOKLM_BASE_URL环境变量 - 安全性 — 下载路径遍历防护、
0o600身份验证文件、Chrome 来源限制为 localhost
前提条件
- 安装:
uv tool install notebooklm-mcp-cli(或pip install notebooklm-mcp-cli) - 身份验证:
nlm login(打开浏览器,会话持续约 20 分钟) - 配置 MCP:
nlm setup add claude-code(自动配置.mcp.json),或使用nlm setup add all配置多个工具 - 验证:使用
nlm login --check确认会话有效 - 升级:
uv tool upgrade notebooklm-mcp-cli— 升级后重启 MCP 服务
重要:必须管理任务(CC 2.1.16)
在进行任何其他操作之前,先创建任务以跟踪进度:
# 1. Create main task IMMEDIATELY
TaskCreate(
subject="NotebookLM: {operation}",
description="Managing notebooks, sources, and content generation",
activeForm="Managing NotebookLM resources"
)
# 2. Create subtasks for the notebook workflow
TaskCreate(subject="Notebook setup", activeForm="Creating/configuring notebook")
TaskCreate(subject="Source management", activeForm="Adding sources to notebook")
TaskCreate(subject="Content generation", activeForm="Generating studio content")
# 3. Set dependencies for sequential steps
TaskUpdate(taskId="3", addBlockedBy=["2"])
TaskUpdate(taskId="4", addBlockedBy=["3"])
# 4. Before starting each task, verify it's unblocked
task = TaskGet(taskId="2") # Verify blockedBy is empty
# 5. Update status as you progress
TaskUpdate(taskId="2", status="in_progress") # When starting
TaskUpdate(taskId="2", status="completed") # When done
决策树 — 阅读哪些规则
What are you trying to do?
│
├── Create / manage notebooks
│ ├── List / get / rename ──────► notebook_list, notebook_get, notebook_rename
│ ├── Create new notebook ──────► notebook_create
│ └── Delete notebook ──────────► notebook_delete (irreversible!)
│
├── Add sources to a notebook
│ ├── URL / YouTube ────────────► source_add(type=url)
│ ├── Plain text ───────────────► source_add(type=text)
│ ├── Local file ───────────────► source_add(type=file)
│ ├── Google Drive ─────────────► source_add(type=drive)
│ ├── Rename a source ──────────► source_rename
│ └── Manage sources ──────────► rules/setup-quickstart.md
│
├── Query a notebook (AI chat)
│ ├── Ask questions ────────────► notebook_query
│ └── Configure chat style ────► chat_configure
│
├── Generate studio content
│ ├── 10 artifact types ───────► rules/workflow-studio-content.md
│ ├── Revise slides ───────────► studio_revise (creates new deck)
│ └── Export to Docs/Sheets ──► export_artifact
│
├── Research & discovery
│ └── Web/Drive research ──────► rules/workflow-research-discovery.md
│
├── Notes (capture insights)
│ └── Create/list/update/delete ► note (unified tool)
│
├── Sharing & collaboration
│ └── Public links / invites / batch ► rules/workflow-sharing-collaboration.md
│
├── Batch & cross-notebook
│ ├── Query across notebooks ────► cross_notebook_query
│ ├── Bulk operations ───────────► batch (query, add-source, create, studio)
│ └── Multi-step pipelines ──────► rules/workflow-batch-pipelines.md
│
├── Organization
│ └── Tag notebooks ─────────────► tag
│
└── Workflow patterns
├── Second brain ─────────────► rules/workflow-second-brain.md
├── Research offload ─────────► rules/workflow-research-offload.md
└── Knowledge base ──────────► rules/workflow-knowledge-base.md
快速参考
| 类别 | 规则 | 影响 | 关键模式 |
|---|---|---|---|
| 设置 | setup-quickstart.md | 高 | 身份验证、MCP 配置、来源管理、会话刷新 |
| 工作流 | workflow-second-brain.md | 高 | 决策文档、项目中心、Agent 互操作 |
| 工作流 | workflow-research-offload.md | 高 | 综合分析、入门指导、节省令牌 |
| 工作流 | workflow-knowledge-base.md | 高 | 调试知识库、安全手册、团队知识 |
| 工作流 | workflow-studio-content.md | 高 | 10 种成品类型(音频、电影感视频、幻灯片、信息图、思维导图等) |
| 研究 | workflow-research-discovery.md | 高 | 网页/Drive 研究异步流程 |
| 协作 | workflow-sharing-collaboration.md | 中 | 公开链接、协作者邀请、批量共享 |
| 批量处理 | workflow-batch-pipelines.md | 高 | 跨笔记本查询、批量操作、管道 |
| 发布 | workflow-versioned-notebooks.md | 高 | 每个版本配备变更日志和差异的笔记本 |
总计:5 个类别中的 9 条规则
按 API 分组的 MCP 工具
| 分组 | 工具 | 数量 |
|---|---|---|
| 笔记本 | notebook_list, notebook_create, notebook_get, notebook_describe, notebook_rename, notebook_delete | 6 |
| 来源 | source_add, source_rename, source_list_drive, source_sync_drive, source_delete, source_describe, source_get_content | 7 |
| 查询 | notebook_query, chat_configure | 2 |
| Studio | studio_create, studio_status(还包括:list_types, rename), studio_revise, studio_delete | 4 |
| 研究 | research_start, research_status, research_import | 3 |
| 共享 | notebook_share_status, notebook_share_public, notebook_share_invite, notebook_share_batch | 4 |
| 笔记 | note(统一工具:list/create/update/delete) | 1(4 个操作) |
| 下载 | download_artifact | 1 |
| 导出 | export_artifact(Google Docs/Sheets) | 1 |
| 批量 | batch(多笔记本操作), cross_notebook_query | 2 |
| 流水线 | pipeline(操作:run|list;ingest-and-podcast、research-and-report、multi-format) | 1 |
| 标签 | tag(操作:add|remove|list|select) | 1 |
| 身份验证 | save_auth_tokens, refresh_auth, server_info | 3 |
总计:13 个分组中的 36 个工具(v0.6.1+)
关键决策
| 决策 | 建议 |
|---|---|
| 新建笔记本还是使用现有笔记本 | 每个项目/主题使用一个笔记本;将来源添加到现有笔记本 |
| 来源类型 | 网页用 URL,内联内容用文本,本地文档用文件,Google Docs 用 Drive |
| 大型来源 | 将超过 50K 个字符的内容拆分为多个来源,以便更好地检索 |
| 身份验证过期? | nlm login --check;会话约持续 20 分钟,使用 nlm login 重新进行身份验证 |
| Studio 内容 | 使用 studio_create,通过 studio_status 轮询(生成需要 2-5 分钟) |
| 电影风格视频 | studio_create(artifact_type="video", video_format="cinematic") — 需要 Plus/Ultra,仅支持英语,每天 20 个 |
| 音频格式 | 通过 audio_format 选择 brief/critique/debate/deep_dive,通过 audio_length 选择 short/default/long |
| 研究发现 | 使用 research_start 发现网页/Drive 内容,然后使用 research_import(默认 timeout=300s) |
| 深度研究 | 使用 research_start(mode="deep") 进行多来源综合(v0.5.1+,自动重试) |
| 发布笔记本 | 每个次要版本使用一个笔记本;将 CHANGELOG 和关键技能差异上传为来源 |
| 查询还是搜索 | 使用 notebook_query 获取基于 AI 的回答;使用 source_get_content 获取原始文本 |
| 笔记还是来源 | 笔记用于记录你的见解/注释;来源用于外部文档 |
| 信息图风格 | 通过 studio_create 上的 infographic_style 参数选择 11 种视觉风格 |
| 幻灯片修订 | 使用 studio_revise 编辑单张幻灯片(会创建一份新演示文稿) |
| 导出成果 | export_artifact 将报告发送到 Google Docs,将数据表发送到 Sheets |
| 语言 | studio_create 上的 language 参数接受 BCP-47 代码(例如,希伯来语用 he,也可用 en、es、ja) |
| 批量添加来源 | 使用 source_add(urls=["url1","url2"], wait=True) 批量导入多个 URL,并等待处理完成 |
| 批量操作 | 使用 batch 执行多笔记本操作;使用 cross_notebook_query 获取汇总回答 |
| 流水线 | 使用 pipeline(action="run", pipeline_name="ingest-and-podcast") 执行多步骤工作流 |
示例
# 1. Create a notebook for your project
notebook_create(title="Auth Refactor Research")
# 2. Add sources (docs, articles, existing code analysis)
source_add(notebook_id="...", type="url", url="https://oauth.net/2.1/")
source_add(notebook_id="...", type="text", content="Our current auth uses...")
source_add(notebook_id="...", type="file", path="/docs/auth-design.md")
# 3. Query with grounded AI responses
notebook_query(notebook_id="...", query="What are the key differences between OAuth 2.0 and 2.1?")
# 4. Generate a deep dive audio overview (supports language param)
studio_create(notebook_id="...", artifact_type="audio", audio_format="deep_dive", language="he", confirm=True)
studio_status(notebook_id="...") # Poll until complete
# 5. Generate a cinematic video overview (Plus/Ultra, English)
studio_create(notebook_id="...", artifact_type="video", video_format="cinematic", visual_style="classic", confirm=True)
studio_status(notebook_id="...") # Poll — takes 3-8 minutes
# 6. Capture insights as notes
note(notebook_id="...", action="create", content="Key takeaway: PKCE is mandatory in 2.1")
常见错误
- 忘记身份验证过期 — 会话有效期约为 20 分钟。长时间工作流开始前,务必使用
nlm login --check检查状态。使用nlm login重新进行身份验证。 - 只建一个超大的笔记本 — 按项目或主题拆分。一个包含 50 个来源的笔记本会降低检索质量。
- 单个来源过大 — 将超过 50K 个字符的文档拆分为逻辑章节,以改善分块和检索效果。
- 不轮询 studio_status — Studio 内容生成需要 2-5 分钟。请轮询
studio_status,不要假设结果会立即生成。 - 忽略来源类型 — 网页使用
type=url(自动提取内容),本地文件使用type=file。对 URL 使用type=text只会得到 URL 字符串,而不是网页内容。 - 删除笔记本前不检查 —
notebook_delete不可撤销。请先使用source_list_drive和note(action=list)列出内容。 - 跳过 research_import —
research_start会发现内容,但不会将其添加进去。使用research_import将发现结果实际添加为来源。 - 对空笔记本直接查询 — 笔记本中没有来源时,
notebook_query返回的结果质量较差。请先添加来源,再进行查询。 - 忽略 language 参数 —
studio_create支持 BCP-47language代码(例如he、ar、ja)。若未指定,默认使用英语。 - 批处理却没有明确目的 —
batch和cross_notebook_query功能强大,但会增加延迟。请用于多项目综合分析,而非单个笔记本任务。
相关技能
ork:mcp-patterns— MCP 服务构建、安全和组合模式ork:web-research-workflow— 网络研究策略和来源评估ork:memory— 用于跨会话知识持久化的记忆织网ork:security-patterns— 输入清理和分层安全
评论
支持 Markdown