Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.07 KB

File metadata and controls

60 lines (44 loc) · 2.07 KB

NotebookLM Agent Plugin

This project provides an MCP server that lets AI agents interact with Google NotebookLM.

MCP Server

The notebooklm MCP server exposes these tools:

  • notebooklm_auth_status — Check if credentials exist (local check, no network)
  • notebooklm_list_notebooks — List all notebooks for the authenticated user
  • notebooklm_get_notebook — Get details of a specific notebook
  • notebooklm_create_notebook — Create a new notebook
  • notebooklm_rename_notebook — Rename a notebook
  • notebooklm_delete_notebook — Delete a notebook
  • notebooklm_chat — Send a message to a notebook and get the AI response
  • notebooklm_get_chat_history — Get conversation history for a notebook
  • notebooklm_get_notebook_description — Get AI-generated summary and suggested topics
  • notebooklm_open_notebook — Open a notebook in the default browser

Authentication

NotebookLM has no public API. Authentication uses session cookies extracted from your browser.

To authenticate, run:

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

You must be logged into https://notebooklm.google.com in Firefox or Chrome first.

Configuration

Add to your Claude Code MCP config (.mcp.json):

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

Cookie Expiration

Session cookies expire periodically. If operations start failing with auth errors or redirects to accounts.google.com, re-authenticate by running notebooklm login or re-running the cookie extraction command above.

Best Practices

  • Call notebooklm_auth_status before other operations to verify credentials
  • Use notebooklm_list_notebooks to find notebook IDs before operating on them
  • Chat operations return a conversation_id — pass it to follow-up calls for multi-turn conversations
  • NotebookLM responses can be large; summarize before presenting to the user