notebooklm-mcp
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/GenerateFreeFormStreamedRPCs through a Playwright persistent-context session. It is not affiliated with Google.
What works today
Tool | Status | Notes |
| ✅ | Returns "mine" + "shared" notebooks. Pagination for many owned notebooks not yet discovered (shows most-recent owned). |
| ✅ | Untitled empty notebook. |
| ✅ | Permanent, no undo. |
| ✅ | Streams the answer with inline |
| ⚠️ |
|
| ✅ | NotebookLM Discover → returns candidate URLs (does not auto-import). |
| ✅ | One-shot: create → research → import → ask N questions → (optional) delete. |
| ⚠️ |
|
| ✅ | Saves completed audio as |
| ✅ | 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 diskOr, 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-desktopThe 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 listDev 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 loginFirst-time Google login
NotebookLM requires a signed-in Google session. Run once, headed:
uv run nlm loginA 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 serveClaude 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.pyStatus
Package scaffold, MCP server, CLI
Playwright session with persistent Google login
All tools registered (stubs)
notebook_listDOM scrapenotebook_querychat flowsource_add(url/text/drive/file)studio_createaudio (podcast) + downloadremaining tools
License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gracelee087/notebooklm-mcp-lisa'
If you have feedback or need assistance with the MCP directory API, please join our Discord server