notebooklm-mcp-rpc
Provides tools for interacting with Google NotebookLM, enabling AI agents to manage notebooks, sources, chat, artifacts, notes, research, sharing, and language settings through Google's undocumented batchexecute RPC protocol.
Allows adding YouTube videos as sources to NotebookLM notebooks via the source_add_url tool.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@notebooklm-mcp-rpc list my notebooks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
notebooklm-mcp-rpc
A pure-TypeScript Model Context Protocol server for Google NotebookLM. Speaks Google's undocumented batchexecute RPC protocol directly — no Python runtime, no notebooklm CLI, no shelling out. Deploys cleanly to Vercel Node functions.
Companion / sibling project to
notebooklm-mcp, which wraps thenotebooklm-pyCLI as a subprocess. Pick this one if you want zero Python dependencies and seamless serverless deployment.
What's in the box
Native RPC client — encoder/decoder for the
batchexecutewire format ported faithfully fromnotebooklm-py's_core.pyandrpc/.Native chat client — POSTs to the streaming
GenerateFreeFormStreamedendpoint and parses the chunked response.51 MCP tools spanning notebooks, sources, chat, artifacts (all 9 generation types + downloads), notes, research, sharing, and language settings.
Auth refresh — concurrent-safe re-scrape of
SNlM0e/FdrFJeon 401/403.Stdio + Streamable-HTTP transports. Vercel adapter included.
Strict TypeScript:
exactOptionalPropertyTypes,noUncheckedIndexedAccess,verbatimModuleSyntax, full Zod input validation.
Related MCP server: notebooklm-mcp
Quick start
npm install
npm run build
# Provide auth (one of the three options below) — see "Authentication".
export NOTEBOOKLM_STORAGE_PATH=/Users/me/.notebooklm/storage_state.json
# Run the server (stdio, default).
node dist/index.jsHooking up Claude Desktop / Cursor / Windsurf
{
"mcpServers": {
"notebooklm": {
"command": "node",
"args": ["/absolute/path/to/notebooklm-mcp-rpc/dist/index.js"],
"env": {
"NOTEBOOKLM_STORAGE_PATH": "/Users/me/.notebooklm/storage_state.json"
}
}
}
}Remote / HTTP
MCP_TRANSPORT=http PORT=3000 node dist/index.js
# POST JSON-RPC to http://localhost:3000/mcp
# GET http://localhost:3000/healthz for a liveness checkVercel
Push to Vercel — vercel.json and api/mcp.ts are already wired:
vercel deploy
# Endpoint: https://<your-project>.vercel.app/mcpSet NOTEBOOKLM_AUTH_JSON (the inline contents of storage_state.json) as a project env var. The Vercel Node runtime supports everything we need; no custom container.
Authentication
You need a valid Google session. The simplest path is to bootstrap it once with the Python notebooklm CLI, then point this server at the resulting file:
pip install "notebooklm-py[browser]"
playwright install chromium
notebooklm login # writes ~/.notebooklm/storage_state.jsonNow choose one of:
Variable | Use when |
| Local dev. Path to |
| Serverless / CI. Inline JSON contents of the same file. |
| You already have tokens from another pipeline. |
Cookies do expire. When they do, auth_status will return an isError: true result with reason: "auth" and a reminder to re-run the login step.
Tool catalog (51)
Group | Tools |
Auth / status |
|
Notebooks |
|
Sources |
|
Chat |
|
Artifacts |
|
Generation |
|
Downloads |
|
Notes |
|
Research |
|
Sharing |
|
Language |
|
Architecture
src/
├── auth.ts # storage_state → cookies → CSRF + session-id
├── rpc/
│ ├── types.ts # method IDs + enum codes (source of truth)
│ ├── encoder.ts # encode_rpc_request, build_request_body
│ ├── decoder.ts # strip_anti_xssi, parse_chunked_response, extract_rpc_result
│ └── client.ts # RpcClient — fetch + auth refresh + chat streaming
├── api/
│ ├── _helpers.ts # asString / getPath / sourceIdsTriple etc.
│ ├── notebooks.ts # list/create/rename/delete/raw
│ ├── sources.ts # add_url/add_text/list/delete/rename/wait/fulltext/guide
│ ├── chat.ts # ask (streaming), history, configure
│ ├── artifacts.ts # list/wait + 11 generation paths + download URL extraction
│ ├── notes.ts # CRUD over GET_NOTES_AND_MIND_MAPS
│ ├── research.ts # start/poll/import/wait
│ ├── sharing.ts # public link, view level, per-user
│ ├── settings.ts # language get/set
│ └── client.ts # NotebookLMClient — namespaced facade
├── tools/ # MCP tool registrations (one file per domain)
├── transport/{stdio,http}.ts
├── server.ts # createServer, registerAllTools
├── config.ts # env-driven config (zod-validated)
├── errors.ts # AuthError, RateLimitError, ProtocolError, …
├── logger.ts # stderr-only structured logger
└── index.ts # bin entry
api/mcp.ts # Vercel function adapterLimitations (v0.1)
No file uploads. Adding PDFs / audio / images via the resumable upload protocol is not implemented yet — use
source_add_url(web URLs and YouTube) orsource_add_text. File support tracked under_core.py'so4cbdcmethod.Sharing payload parsing is shallow —
share_statusreturns the raw RPC payload alongside best-effort fields. Public-link toggle and per-user invite/remove all work end-to-end.Slide deck downloads require
EXPORT_ARTIFACT(handled automatically bydownload_artifact); other artifact types extract URLs from theartifact_listresponse.
Why two MCPs?
|
| |
Python runtime needed | Yes (CLI subprocess) | No |
Vercel-deployable | Only with custom container | Plain Node function |
Tracks upstream protocol fixes | Automatic | Manual (rare; method IDs change a few times a year) |
Setup steps | install Python + CLI + login | login once, then JS-only |
This project (-rpc) is the right pick when you want an autonomous, single-runtime deploy.
License
MIT — see LICENSE.
Available Tools
52 toolsartifact_deleteDelete artifactADestructive
Delete an artifact. Destructive.
Inputs: artifact (required), notebook (required).
artifact_getGet artifact detailsARead-only
Return details for a single artifact.
Inputs: artifact (required), notebook (required).
artifact_listList artifactsARead-only
List all generated artifacts in a notebook.
Inputs: notebook (required).
artifact_renameRename artifactB
Change an artifact's display title.
Inputs: title (required), artifact (required), notebook (required).
artifact_waitWait for artifactARead-only
Poll the artifact until it reaches COMPLETED status. Long-running — raise timeoutSeconds for video jobs.
Inputs: artifact (required), notebook (required), timeoutSeconds.
auth_statusCheck NotebookLM authenticationARead-only
Verify the current cookies / CSRF token / session ID are valid by hitting the homepage and listing notebooks. Use this first when debugging.
Inputs: no named parameters.
chat_askAsk NotebookLM a questionARead-only
Send a question to NotebookLM and return the answer plus citations. If conversationId is omitted the server starts a new conversation.
Inputs: notebook (required), question (required), sourceIds, conversationId, +1 more.
chat_configureConfigure chat behaviorB
Set the notebook's chat mode, persona, and response-length preference.
Inputs: notebook (required), mode, persona, responseLength.
chat_historyGet conversation turnsBRead-only
Return the question/answer turns of a conversation.
Inputs: notebook (required), conversationId (required), limit.
chat_last_conversation_idGet last conversation IDARead-only
Return the most recent conversation ID for a notebook.
Inputs: notebook (required).
download_artifactDownload an artifactARead-only
Resolve and download an artifact's content. If outputPath is provided the bytes/text are written there and the absolute path is returned. If omitted, small artifacts are returned inline (text directly, binaries as base64). Slide decks accept a format of pdf or pptx.
Inputs: artifact (required), notebook (required), format, outputPath.
generate_audioGenerate an audio overview (podcast)B
Kick off audio generation. Returns a task/artifact ID; pair with artifact_wait.
Inputs: notebook (required), format, length, language, +2 more.
generate_cinematic_videoGenerate a cinematic video (Veo 3, Ultra-tier only)A
Generate an AI-rendered cinematic documentary-style video using Veo 3. Requires a Google AI Ultra subscription on the authenticated account; without it the call returns a server error. Style options are not supported for cinematic video.
Inputs: notebook (required), language, sourceIds, instructions.
generate_data_tableGenerate a data tableB
Generate a structured data table. instructions describes the desired columns.
Inputs: notebook (required), instructions (required), language, sourceIds.
generate_flashcardsGenerate flashcardsB
Generate a flashcard deck from notebook content.
Inputs: notebook (required), quantity, sourceIds, difficulty, +1 more.
generate_infographicGenerate an infographicC
Generate a poster-style infographic.
Inputs: notebook (required), style, detail, language, +3 more.
generate_mind_mapGenerate a mind mapB
Generate a mind map. Returns the JSON content directly (mind maps are stored as notes).
Inputs: notebook (required), sourceIds, contextLabel.
generate_quizGenerate a quizC
Generate a quiz from notebook content.
Inputs: notebook (required), quantity, sourceIds, difficulty, +1 more.
generate_reportGenerate a reportB
Generate a structured markdown report (briefing doc, study guide, etc.).
Inputs: title (required), notebook (required), description (required), prompt, +2 more.
generate_slide_deckGenerate a slide deckC
Generate a slide deck (PDF or PPTX, configurable later via download_artifact).
Inputs: notebook (required), format, length, language, +2 more.
generate_videoGenerate a video overviewA
Kick off video generation. Long-running (15-45 min) — use artifact_wait separately.
Inputs: notebook (required), style, format, language, +2 more.
language_getGet default output languageARead-only
Return the GLOBAL default output language code used for artifact generation.
Inputs: no named parameters.
language_setSet default output language (GLOBAL)AIdempotent
Set the GLOBAL default output language for artifact generation. Affects every notebook in the account.
Inputs: code (required).
notebook_createCreate a notebookA
Create a new NotebookLM notebook with the given title.
Inputs: title (required).
notebook_deleteDelete a notebookADestructive
Permanently delete a notebook. Destructive.
Inputs: notebook (required).
notebook_listList notebooksARead-only
List every notebook owned by the authenticated user.
Inputs: no named parameters.
notebook_rawGet raw notebook payloadARead-only
Return the raw GET_NOTEBOOK response (useful for debugging when the parsed shape is missing a field you need).
Inputs: notebook (required).
notebook_renameRename a notebookB
Change a notebook's title.
Inputs: title (required), notebook (required).
note_createCreate a noteC
Create a new note with title and content.
Inputs: title (required), content (required), notebook (required).
note_deleteDelete a noteBDestructive
Delete a note. Destructive.
Inputs: note (required), notebook (required).
note_listList notesARead-only
List notes (and mind-maps) inside a notebook.
Inputs: notebook (required).
note_updateUpdate a noteA
Update a note's title and/or content.
Inputs: note (required), notebook (required), title, content.
research_import_allImport all research resultsA
Import every result from the latest finished research task as sources in the notebook. This works even when research_poll shows a task that the server hasn't formally marked completed — as long as it has results attached, they're safe to import. Re-list sources afterwards to confirm.
Inputs: notebook (required).
research_import_selectedImport selected research resultsA
Import a subset of research results by URL. Useful when you want to skip irrelevant sources from a fast-research result set. Pass either the full URLs to import, or pass taskId explicitly if you want to import from a non-latest task.
Inputs: urls (required), notebook (required), taskId.
research_pollPoll research statusARead-only
Non-blocking check on every research task in a notebook. Returns each task's status, the synthesized summary if any, and the discovered results (URLs + titles for fast research, markdown reports for deep).
Inputs: notebook (required).
research_startStart a research jobA
Kick off web/Drive research. mode=fast returns ~5-10 sources in seconds; mode=deep runs 15-30 minutes (web only).
Inputs: query (required), notebook (required), from, mode.
research_waitWait for researchARead-only
Block until a research task completes (or timeoutSeconds elapses). Returns the completed task with its results so they can be imported via research_import_all or research_import_selected in a follow-up call.
Inputs: notebook (required), timeoutSeconds.
revise_slideRevise a slideA
Submit a natural-language revision for one slide of an existing deck.
Inputs: prompt (required), artifact (required), notebook (required), slideIndex (required).
source_add_textAdd a text sourceC
Paste raw text as a source.
Inputs: content (required), notebook (required), title.
source_add_urlAdd a URL sourceA
Add a web URL or YouTube link as a source. NotebookLM auto-detects YouTube URLs.
Inputs: url (required), notebook (required), title.
source_deleteDelete a sourceCDestructive
Remove a source from a notebook. Destructive.
Inputs: source (required), notebook (required).
source_fulltextGet source fulltextARead-only
Retrieve the indexed plaintext content of a source.
Inputs: source (required), notebook (required).
source_guideGet the AI source guideARead-only
Return the auto-generated summary and keywords for a source.
Inputs: source (required), notebook (required).
source_listList sourcesARead-only
List the sources currently attached to a notebook.
Inputs: notebook (required).
source_refreshRefresh a URL/Drive sourceA
Re-fetch and re-index a URL or Google Drive source so the notebook has the latest version.
Inputs: source (required), notebook (required).
source_renameRename a sourceB
Change a source's display title.
Inputs: title (required), source (required), notebook (required).
source_waitWait for source processingARead-only
Poll until the source reaches READY status, or fail with a TimeoutError after the configured timeout.
Inputs: source (required), notebook (required), timeoutSeconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 52 tools
Each tool has a clearly distinct purpose, targeting a specific resource and action. Even within the many 'generate' tools, the output type (audio, video, quiz, etc.) uniquely identifies each. No two tools appear to do the same thing.
Tool names predominantly follow the 'resource_action' pattern (e.g., artifact_delete, notebook_list), but a few use 'action_resource' (e.g., download_artifact, generate_audio). The mixing is minor and names remain descriptive and predictable.
With 52 tools, the count far exceeds the 'too many' threshold of 25+. While NotebookLM is a complex product, such a large tool surface can overwhelm an agent and suggests opportunities for consolidation (e.g., parameterizing generation types).
The tool set covers the full lifecycle of notebooks, sources, artifacts, notes, chat, research, sharing, and content generation. Every major operation (CRUD, import, export, configuration) is addressed with no obvious gaps for the domain.
Maintenance
Related MCP Connectors
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProduction-grade Model Context Protocol server for Google NotebookLM that lets any MCP-capable client (Claude, ChatGPT, Cursor, etc.) interact with NotebookLM notebooks, sources, chats, and artifacts.MIT
- AlicenseAqualityDmaintenanceAn 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.19MIT
- AlicenseAqualityDmaintenanceA robust MCP server for NotebookLM that provides auto-healing authentication, zero-config setup, and tools to list, query, create notebooks, and manage sources.63MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for querying Google NotebookLM notebooks, enabling AI assistants to list notebooks, read sources, and ask questions about them.MIT