Notebooklm-Unofficial-API-MCP
# Notebooklm-Unofficial-API-MCP
A thin wrapper around [`notebooklm-py`](https://github.com/teng-lin/notebooklm-py)
(MIT licensed, by Teng Lin) — the unofficial Python client/MCP server for Google
NotebookLM. This project depends on `notebooklm-py` rather than vendoring it, and
adds project-specific MCP tools on top of its stock tool set (notebooks, sources,
chat, studio artifact generation, deep research, sharing).
## Why a wrapper
`notebooklm-py` already ships a complete MCP server (`notebooklm-mcp`). This
wrapper exists so custom tools can be layered on without forking upstream —
`notebooklm.mcp.server.create_server()` is called and its returned `FastMCP`
instance is extended in `src/notebooklm_wrapper/server.py`.
## Getting started
Each person who runs this needs **their own** authenticated session — there is
no shared credential in this repo, and none is possible: `notebooklm-py` is
unofficial and works by driving your own Google account, not a documented API.
### 1. Prerequisites
- Python 3.10+
- [`uv`](https://docs.astral.sh/uv/) (recommended) or `pip`
### 2. Clone and install
```bash
git clone https://github.com/DevstackK/Notebooklm-Unoffical-API-MCP.git
cd Notebooklm-Unoffical-API-MCP
uv sync
# or: pip install -e .
```
### 3. Authenticate with your own Google account
Pick one:
**A — Browser login (Playwright), simplest first run:**
```bash
uv run playwright install chromium # one-time browser download
uv run notebooklm login
```
This opens a Chromium window; sign in to the Google account whose NotebookLM
notebooks you want the server to access, then close it. The session is saved
to a local profile (`storage_state.json`) — nothing is uploaded anywhere.
**B — Import cookies from a browser you're already logged into:**
```bash
uv pip install "notebooklm-py[cookies]"
uv run notebooklm login --browser-cookies # reads from Chrome by default
uv run notebooklm login --browser-cookies=firefox # or another supported browser
```
Skips the Playwright/Chromium download entirely — useful if you're already
signed into NotebookLM in your regular browser.
Verify it worked:
```bash
uv run notebooklm status
```
If you ever need to switch Google accounts: `uv run notebooklm login --fresh`.
### 4. Run the MCP server
```bash
uv run notebooklm-unofficial-mcp
```
### 5. Point Claude Code (or another MCP client) at it
```bash
claude mcp add notebooklm-unofficial -- uv run --directory /path/to/Notebooklm-Unoffical-API-MCP notebooklm-unofficial-mcp
```
Swap `/path/to/Notebooklm-Unoffical-API-MCP` for wherever you cloned it. Any
MCP-compatible client (Claude Desktop, etc.) can point at the same
`notebooklm-unofficial-mcp` command over stdio.
## Adding a tool
Add `@mcp.tool()`-decorated functions inside `_register_custom_tools` in
`src/notebooklm_wrapper/server.py`.
## License
MIT — see [LICENSE](LICENSE). Not affiliated with Google or the `notebooklm-py`
project; "unofficial" in the name reflects that both this wrapper and its
upstream dependency use NotebookLM's undocumented web API.
TDQS
Scored across 39 tools
Several tools overlap in purpose: source_add, source_add_drive_file, and source_add_play_book all add sources, while source_wait and await_upload both wait for source readiness, and chat_ask/chat_start/chat_status form a related set. The detailed descriptions clarify routing, but an agent can still face misselection across these families.
Most names follow a clear domain_action convention (notebook_*, source_*, chat_*, share_*, studio_*, research_*). A few outliers like ping, await_upload, server_info, and suggest_prompts break the pattern, but the set is largely predictable.
At 39 tools, the surface is well above the typical 15-tool sweet spot and includes several specialized variants that could be consolidated. While NotebookLM is a broad domain, the count feels over-granular rather than tightly scoped.
The set covers notebook, source, chat, sharing, studio, research, and note lifecycles, including add/read/rename/delete and async polling. Minor gaps remain, such as direct notebook metadata updates or source reprocessing/resync, but most core workflows are supported.