notebooklm-codex
NotebookLM for Codex
Use Google NotebookLM from Codex through a local MCP connector.
This repo wraps the unofficial notebooklm-py command-line tool as an MCP server, so Codex can list notebooks, switch notebooks, inspect sources, ask questions, and add sources without relying on ad hoc shell commands.
What This Enables
List your NotebookLM notebooks from Codex
Switch the active NotebookLM notebook
Check NotebookLM authentication
List notebook sources and generated artifacts
Ask a notebook questions
Add URLs, YouTube links, PDFs, docs, and other files as sources
Trigger audio overview generation
Install a Codex skill that teaches Codex when and how to use NotebookLM
Use Cases
Ask Codex to query a research notebook before answering a strategy question
Build a project research notebook from URLs, PDFs, or YouTube videos
Turn a NotebookLM notebook into an audio overview
Inspect whether shared notebooks are accessible
Use NotebookLM as a second brain for business, research, content, or sales strategy
Give Codex repeatable access to NotebookLM without pasting Google cookies into prompts
Architecture
Codex
-> MCP stdio connector
-> local Python server in this repo
-> notebooklm-py CLI
-> Google NotebookLMYour Google credentials stay on your Mac in the notebooklm-py local auth profile. The MCP server calls the local CLI; it does not store Google cookies or tokens in this repo.
Requirements
macOS or Linux
Python 3.10+
Codex with custom MCP server support
A Google account with NotebookLM access
notebooklm-pyinstalled and authenticated locally
Step 1: Install And Authenticate NotebookLM CLI
Install notebooklm-py in a virtual environment:
python3 -m venv ~/.notebooklm-venv
source ~/.notebooklm-venv/bin/activate
pip install "notebooklm-py[browser]"
playwright install chromium
mkdir -p ~/bin
ln -sf ~/.notebooklm-venv/bin/notebooklm ~/bin/notebooklm
export PATH="$HOME/bin:$PATH"
notebooklm --helpAuthenticate:
notebooklm login
notebooklm auth check
notebooklm listIf notebooklm login does not work in your terminal environment, use the browser-auth flow documented in the bundled Codex skill reference:
codex-skill/notebooklm/references/notebooklm-cli-and-mcp.mdStep 2: Install This MCP Connector
Clone this repo:
git clone https://github.com/knowingdoing/notebooklm-codex.git
cd notebooklm-codexCreate the connector environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtSmoke test:
NOTEBOOKLM_BIN="$(command -v notebooklm)" \
.venv/bin/python -c "from notebooklm_mcp.server import run_cli; print(run_cli('auth', 'check'))"You should see Authentication is valid.
Step 3: Add The MCP Server To Codex
Open your Codex config:
open ~/.codex/config.tomlAdd this block, replacing /absolute/path/to/notebooklm-codex with the actual cloned repo path:
[mcp_servers.notebooklm]
command = "/absolute/path/to/notebooklm-codex/.venv/bin/python"
args = ["/absolute/path/to/notebooklm-codex/notebooklm_mcp/server.py"]
startup_timeout_sec = 30
[mcp_servers.notebooklm.env]
NOTEBOOKLM_BIN = "/Users/YOUR_USER/bin/notebooklm"Restart Codex after editing the config.
Step 4: Test In Codex
In a new Codex thread, ask:
Use $notebooklm to list my NotebookLM notebooks.Or:
List my NotebookLM notebooks and open the one called Client Retention.Available MCP Tools
Tool | Purpose |
| Check local NotebookLM authentication |
| List notebooks |
| Show the active notebook |
| Set the active notebook |
| List sources in the active notebook |
| Add a URL, YouTube URL, or local file source |
| Ask the active notebook a question |
| List generated artifacts |
| Generate an audio overview |
Example Prompts
Use $notebooklm to list my notebooks.Use $notebooklm to open my Client Retention notebook and list its sources.Use $notebooklm to ask my Eric Siu Single Brain notebook: what are the major themes?Use $notebooklm to create a NotebookLM notebook for this research and add these URLs as sources.Use $notebooklm to generate an audio overview from the active notebook.Optional: Install The Codex Skill
This repo includes a Codex skill at:
codex-skill/notebooklmInstall it into your Codex skills folder:
cp -R codex-skill/notebooklm ~/.codex/skills/notebooklmRestart Codex after installing the skill.
The skill helps Codex recognize NotebookLM-related requests and choose the right workflow.
Notes And Limits
This uses the unofficial
notebooklm-pypackage.Google can change NotebookLM behavior without notice.
Generation actions can take minutes and may hit Google rate limits.
This connector runs locally. Your Mac must be online and authenticated.
Do not commit Google cookies, browser profiles, or local auth files.
Security
Credentials are handled by notebooklm-py on your machine. This repo does not require storing NotebookLM cookies, Google tokens, or account credentials in source control.
For shared machines, review your local NotebookLM auth profile before exposing the connector to other tools.