notebooklm-mcp

notebooklm-mcp

An unofficial MCP server for Google NotebookLM that enables users to manage notebooks, add sources, ask questions with citations, and generate audio podcasts via a Playwright-based automation layer.

Category
访问服务器

README

notebooklm-mcp

An unofficial NotebookLM MCP server and CLI — inspired by jacob-bd/notebooklm-mcp-cli.

⚠️ NotebookLM has no public API. This project talks to NotebookLM's internal batchexecute / GenerateFreeFormStreamed RPCs through a Playwright persistent-context session. It is not affiliated with Google.

What works today

Tool Status Notes
notebook_list ✅ Returns "mine" + "shared" notebooks. Pagination for many owned notebooks not yet discovered (shows most-recent owned).
notebook_create ✅ Untitled empty notebook.
notebook_delete ✅ Permanent, no undo.
notebook_query ✅ Streams the answer with inline [1][2] citations.
source_add ⚠️ kind="text" and kind="url" work. drive / file stubs.
research_start ✅ NotebookLM Discover → returns candidate URLs (does not auto-import).
research_and_ask ✅ One-shot: create → research → import → ask N questions → (optional) delete.
studio_create ⚠️ artifact="audio" (podcast) works. video / slides / mindmap / etc. stubs.
download_artifact ✅ Saves completed audio as .m4a.
refresh_auth ✅ Checks whether the stored Google session is still live.

Stubs (raise NotImplementedError): notebook_share_public, notebook_share_invite, source_sync_drive, source_get_content, studio_revise, cross_notebook_query, batch, pipeline, tag.

End-to-end workflow this supports

Manual orchestration:

notebook_create()              → empty notebook
research_start(nid, topic)     → ~10 candidate URLs
source_add(nid, kind="url")×N  → import the ones you want
notebook_query(nid, question)  → grounded answer with citations
studio_create(nid, "audio")    → start podcast generation (2-5 min)
download_artifact(nid)         → .m4a file on disk

Or, in a single call:

research_and_ask(
    topic="history of the Cold War space race",
    questions=["Who reached space first?", "Key consequences?"],
    max_sources=3,
    keep_notebook=False,  # ephemeral — delete after
)
# → { sources_imported: [...], qa: [{question, answer, ...}, ...] }

Install

Quick start (from PyPI)

uv tool install notebooklm-mcp-lisa
uvx --from notebooklm-mcp-lisa playwright install chromium
nlm login                       # one-time Google sign-in (opens a browser)
nlm setup add claude-code       # or: claude-desktop

The setup add command edits the target's config file so the MCP server is registered — no JSON editing by hand. Restart the client to pick it up.

Verify registration any time:

nlm setup list

Dev setup (from source)

git clone https://github.com/gracelee087/notebooklm-mcp-lisa.git
cd notebooklm-mcp
uv sync
uv run playwright install chromium
uv run nlm login

First-time Google login

NotebookLM requires a signed-in Google session. Run once, headed:

uv run nlm login

A Chromium window opens. Complete Google OAuth; the session is saved to the OS user-data dir (NLM_PROFILE_DIR to override). Subsequent runs are headless.

Verify:

uv run nlm status
# {'logged_in': True}

Run the MCP server

uv run notebooklm-mcp
# or
uv run nlm serve

Claude Code (project-scoped, auto-picked-up)

.mcp.json in this repo is already configured. When you open the project in Claude Code it prompts you to trust and loads notebooklm automatically.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/this/repo", "run", "notebooklm-mcp"]
    }
  }
}

Repo layout

src/notebooklm_mcp/
  server.py          # FastMCP entry
  cli.py             # `nlm` CLI (login/status/serve)
  browser.py         # Playwright persistent context
  config.py          # paths, env
  tools/
    notebook.py source.py studio.py research.py workflow.py auth.py

Status

  • [x] Package scaffold, MCP server, CLI
  • [x] Playwright session with persistent Google login
  • [x] All tools registered (stubs)
  • [ ] notebook_list DOM scrape
  • [ ] notebook_query chat flow
  • [ ] source_add (url/text/drive/file)
  • [ ] studio_create audio (podcast) + download
  • [ ] remaining tools

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选