Skip to main content
Glama
notebooklm-mcp-rpc

notebooklm-mcp-rpc

by sanjeev7e

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 the notebooklm-py CLI 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 batchexecute wire format ported faithfully from notebooklm-py's _core.py and rpc/.

  • Native chat client — POSTs to the streaming GenerateFreeFormStreamed endpoint 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 / FdrFJe on 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.js

Hooking 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 check

Vercel

Push to Vercel — vercel.json and api/mcp.ts are already wired:

vercel deploy
# Endpoint: https://<your-project>.vercel.app/mcp

Set 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.json

Now choose one of:

Variable

Use when

NOTEBOOKLM_STORAGE_PATH

Local dev. Path to storage_state.json.

NOTEBOOKLM_AUTH_JSON

Serverless / CI. Inline JSON contents of the same file.

NOTEBOOKLM_COOKIES + NOTEBOOKLM_CSRF_TOKEN + NOTEBOOKLM_SESSION_ID

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

auth_status

Notebooks

notebook_list, notebook_create, notebook_rename, notebook_delete, notebook_raw

Sources

source_list, source_add_url, source_add_text, source_delete, source_rename, source_refresh, source_fulltext, source_guide, source_wait

Chat

chat_ask, chat_history, chat_last_conversation_id, chat_configure

Artifacts

artifact_list, artifact_get, artifact_delete, artifact_rename, artifact_wait

Generation

generate_audio, generate_video, generate_cinematic_video, generate_report, generate_quiz, generate_flashcards, generate_infographic, generate_slide_deck, generate_data_table, generate_mind_map, revise_slide

Downloads

download_artifact (one tool, dispatches by artifact type — writes to outputPath or returns inline base64/text)

Notes

note_list, note_create, note_update, note_delete

Research

research_start, research_poll, research_wait, research_import_all

Sharing

share_status, share_set_public, share_set_view_level, share_add_user, share_remove_user

Language

language_get, language_set

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 adapter

Limitations (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) or source_add_text. File support tracked under _core.py's o4cbdc method.

  • Sharing payload parsing is shallow — share_status returns 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 by download_artifact); other artifact types extract URLs from the artifact_list response.

Why two MCPs?

notebooklm-mcp

notebooklm-mcp-rpc

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 tools
artifact_deleteDelete artifactA
Destructive

Delete an artifact. Destructive.

Inputs: artifact (required), notebook (required).

artifact_getGet artifact detailsA
Read-only

Return details for a single artifact.

Inputs: artifact (required), notebook (required).

artifact_listList artifactsA
Read-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 artifactA
Read-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 authenticationA
Read-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 questionA
Read-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 turnsB
Read-only

Return the question/answer turns of a conversation.

Inputs: notebook (required), conversationId (required), limit.

chat_last_conversation_idGet last conversation IDA
Read-only

Return the most recent conversation ID for a notebook.

Inputs: notebook (required).

download_artifactDownload an artifactA
Read-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 languageA
Read-only

Return the GLOBAL default output language code used for artifact generation.

Inputs: no named parameters.

language_setSet default output language (GLOBAL)A
Idempotent

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 notebookA
Destructive

Permanently delete a notebook. Destructive.

Inputs: notebook (required).

notebook_listList notebooksA
Read-only

List every notebook owned by the authenticated user.

Inputs: no named parameters.

notebook_rawGet raw notebook payloadA
Read-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 noteB
Destructive

Delete a note. Destructive.

Inputs: note (required), notebook (required).

note_listList notesA
Read-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 statusA
Read-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 researchA
Read-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).

share_add_userShare with a userC

Grant a Google account access to the notebook.

Inputs: email (required), notebook (required), notify, message, +1 more.

share_remove_userRemove a userB
DestructiveIdempotent

Revoke a user's access to the notebook.

Inputs: email (required), notebook (required).

share_set_publicToggle public sharingC
Idempotent

Enable or disable the notebook's public link.

Inputs: enabled (required), notebook (required), viewLevel.

share_set_view_levelSet view levelC
Idempotent

Set what link viewers can access (full notebook or chat only).

Inputs: level (required), notebook (required).

share_statusGet sharing statusA
Read-only

Return the raw share status payload (access level, view level, users).

Inputs: notebook (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 sourceC
Destructive

Remove a source from a notebook. Destructive.

Inputs: source (required), notebook (required).

source_fulltextGet source fulltextA
Read-only

Retrieve the indexed plaintext content of a source.

Inputs: source (required), notebook (required).

source_guideGet the AI source guideA
Read-only

Return the auto-generated summary and keywords for a source.

Inputs: source (required), notebook (required).

source_listList sourcesA
Read-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 processingA
Read-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

    B3.4/5.0

    Scored across 52 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count2/5

    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).

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      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.
      19
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A robust MCP server for NotebookLM that provides auto-healing authentication, zero-config setup, and tools to list, query, create notebooks, and manage sources.
      6
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for querying Google NotebookLM notebooks, enabling AI assistants to list notebooks, read sources, and ask questions about them.
      MIT