# Notebooklm Agent Plugin

> MCP server + agent integration kit for Google NotebookLM — works with Cursor and Claude Code.

- **Type:** MCP server
- **Install:** `agentstack add mcp-amp-rh-notebooklm-agent-plugin`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [amp-rh](https://agentstack.voostack.com/s/amp-rh)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [amp-rh](https://github.com/amp-rh)
- **Source:** https://github.com/amp-rh/notebooklm-agent-plugin

## Install

```sh
agentstack add mcp-amp-rh-notebooklm-agent-plugin
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# NotebookLM Agent Plugin

An MCP server and agent integration kit that lets AI coding assistants (Cursor, Claude Code) interact with [Google NotebookLM](https://notebooklm.google.com).

## What's included

| 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 |

## Quick start

### 1. Install

```bash
git clone https://github.com/amp-rh/notebooklm-agent-plugin.git
cd notebooklm-agent-plugin
./install.sh
```

This installs the `notebooklm-mcp` command via pip (editable mode).

### 2. Authenticate

Log into [NotebookLM](https://notebooklm.google.com) in Firefox or Chrome, then extract cookies:

```bash
python3 scripts/extract_cookies.py \
    --domains .google.com notebooklm.google.com \
    --required SID OSID __Secure-OSID \
    --host-filter '%notebooklm%' \
    --output ~/.notebooklm/storage_state.json
```

### 3. Configure your agent

#### Cursor

Add the MCP server to your project's `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "notebooklm": {
      "command": "notebooklm-mcp",
      "args": []
    }
  }
}
```

**Optional enhancements** (recommended for best experience):

- **Hooks** — Merge `hooks/hooks.json` entries into `~/.cursor/hooks.json`, updating paths to point to this repo's `hooks/` directory. The auth hook auto-refreshes cookies before every NotebookLM MCP call.

- **Rule** — Copy `rules/notebooklm-subagent.mdc` to your project's `.cursor/rules/` to teach the agent the subagent delegation pattern.

- **Skill** — Register `skills/notebooklm/SKILL.md` in your Cursor skills configuration.

#### Claude Code

Add the MCP server to your `.mcp.json`:

```json
{
  "mcpServers": {
    "notebooklm": {
      "command": "notebooklm-mcp",
      "args": []
    }
  }
}
```

Claude Code will automatically discover tools from the `CLAUDE.md` file in this repo.

## Available tools

| 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 |

## Authentication details

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.sqlite` directly (unencrypted on Linux)
- **Chrome**: Uses [rookiepy](https://github.com/niccokunzmann/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.

## Docker

Build and run the MCP server in a container:

```bash
cd mcp-server
docker build -t notebooklm-mcp .
```

Mount your credentials when running:

```bash
docker run -i --rm -v ~/.notebooklm:/root/.notebooklm notebooklm-mcp
```

## Requirements

- Python 3.11+
- Linux (cookie extraction reads browser databases directly)
- Firefox or Chrome with an active NotebookLM session
- `jq` (for hook scripts)

## Dependencies

- [notebooklm-py](https://pypi.org/project/notebooklm-py/) — Python client for NotebookLM
- [mcp](https://pypi.org/project/mcp/) — Model Context Protocol SDK
- [httpx](https://pypi.org/project/httpx/) — HTTP client

## License

Apache License 2.0

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [amp-rh](https://github.com/amp-rh)
- **Source:** [amp-rh/notebooklm-agent-plugin](https://github.com/amp-rh/notebooklm-agent-plugin)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-amp-rh-notebooklm-agent-plugin
- Seller: https://agentstack.voostack.com/s/amp-rh
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
