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 "Install 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-rpclist 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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/sanjeev7e/notebooklm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server