An MCP server and agent integration kit that lets AI coding assistants (Cursor, Claude Code) interact with Google NotebookLM.
| Component | Path | Purpose |
|---|---|---|
| MCP server | mcp-server/ |
Stdio MCP server exposing NotebookLM operations as tools |
| Cookie extractor | scripts/extract_cookies.py |
Extracts session cookies from Firefox/Chrome for auth |
| Cursor hooks | hooks/ |
Auto-refreshes auth before MCP calls |
| Cursor rule | rules/ |
Instructs the agent to delegate NotebookLM work to subagents |
| Cursor skill | skills/ |
Teaches the agent how to use the NotebookLM tools |
| Claude Code config | CLAUDE.md |
Instructions for Claude Code agents |
git clone https://github.com/amp-rh/notebooklm-agent-plugin.git
cd notebooklm-agent-plugin
./install.shThis installs the notebooklm-mcp command via pip (editable mode).
Log into NotebookLM in Firefox or Chrome, then extract cookies:
python3 scripts/extract_cookies.py \
--domains .google.com notebooklm.google.com \
--required SID OSID __Secure-OSID \
--host-filter '%notebooklm%' \
--output ~/.notebooklm/storage_state.jsonAdd the MCP server to your project's .cursor/mcp.json:
{
"mcpServers": {
"notebooklm": {
"command": "notebooklm-mcp",
"args": []
}
}
}Optional enhancements (recommended for best experience):
-
Hooks — Merge
hooks/hooks.jsonentries into~/.cursor/hooks.json, updating paths to point to this repo'shooks/directory. The auth hook auto-refreshes cookies before every NotebookLM MCP call. -
Rule — Copy
rules/notebooklm-subagent.mdcto your project's.cursor/rules/to teach the agent the subagent delegation pattern. -
Skill — Register
skills/notebooklm/SKILL.mdin your Cursor skills configuration.
Add the MCP server to your .mcp.json:
{
"mcpServers": {
"notebooklm": {
"command": "notebooklm-mcp",
"args": []
}
}
}Claude Code will automatically discover tools from the CLAUDE.md file in this repo.
| Tool | Description |
|---|---|
notebooklm_auth_status |
Check if credentials exist (local, no network) |
notebooklm_list_notebooks |
List all notebooks |
notebooklm_get_notebook |
Get notebook details by ID |
notebooklm_create_notebook |
Create a new notebook |
notebooklm_rename_notebook |
Rename a notebook |
notebooklm_delete_notebook |
Delete a notebook |
notebooklm_chat |
Send a message and get an AI response |
notebooklm_get_chat_history |
Get conversation history |
notebooklm_get_notebook_description |
Get AI-generated summary and topics |
notebooklm_open_notebook |
Open a notebook in the default browser |
NotebookLM has no public API — it uses Google session cookies for authentication. The included extract_cookies.py script reads cookies directly from your browser's cookie database:
- Firefox (preferred): Reads
cookies.sqlitedirectly (unencrypted on Linux) - Chrome: Uses rookiepy to decrypt cookies
The Cursor auth hook (hooks/notebooklm-auth.sh) runs this extraction automatically before every NotebookLM MCP call, so credentials stay fresh as long as your browser session is active.
Build and run the MCP server in a container:
cd mcp-server
docker build -t notebooklm-mcp .Mount your credentials when running:
docker run -i --rm -v ~/.notebooklm:/root/.notebooklm notebooklm-mcp- Python 3.11+
- Linux (cookie extraction reads browser databases directly)
- Firefox or Chrome with an active NotebookLM session
jq(for hook scripts)
- notebooklm-py — Python client for NotebookLM
- mcp — Model Context Protocol SDK
- httpx — HTTP client
Apache License 2.0