Skip to main content
Glama
DevstackK

Notebooklm-Unofficial-API-MCP

by DevstackK
README.md
# 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.

Maintenance

ActivitySlowing
ResponsivenessNo issues