Setup NotebookLM MCP server authentication (first-time setup or re-auth)
From opspal-corenpx claudepluginhub revpalsfdc/opspal-commercial --plugin opspal-core[options]What this command does: Guides first-time setup or re-authentication for the NotebookLM MCP server, enabling AI-queryable client knowledge bases.
When to use it:
/setup-notebooklm
Detect existing setup:
# Check if NotebookLM MCP is already configured
claude mcp list 2>/dev/null | grep -q "notebooklm" && echo "CONFIGURED" || echo "NOT_CONFIGURED"
# Check if auth exists
if [ -f "$HOME/.notebooklm-mcp/auth.json" ]; then
echo "AUTH_EXISTS"
cat "$HOME/.notebooklm-mcp/auth.json" | jq -r '.expires_at // "unknown"'
else
echo "NO_AUTH"
fi
Report current state to user:
Check installation:
# Check if notebooklm-mcp is installed
which notebooklm-mcp 2>/dev/null || uv tool list 2>/dev/null | grep -q notebooklm
Install if missing:
# Recommended: Use uv for fast installation
curl -LsSf https://astral.sh/uv/install.sh | sh # If uv not installed
uv tool install notebooklm-mcp-server
# Alternative: Use pipx
pipx install notebooklm-mcp-server
mkdir -p "$HOME/.notebooklm-mcp/chrome-profile"
Launch browser-based auth:
notebooklm-mcp-auth
What happens:
~/.notebooklm-mcp/Tell user:
š Authentication Process:
1. A Chrome browser will open
2. Navigate to notebooklm.google.com
3. Sign in with your Google account
4. Once signed in, the browser will close automatically
5. Your authentication will be saved for 2-4 weeks
Press Enter when ready to start...
Test connection:
# Try to list notebooks (should work if auth succeeded)
# This uses MCP tool but we verify via a simple test
notebooklm-mcp --test 2>&1 || echo "Run notebook_list to verify"
Check and add to MCP config:
# Check if already in mcp.json
if [ -f ".mcp.json" ]; then
if grep -q "notebooklm" .mcp.json; then
echo "Already configured in .mcp.json"
else
echo "Adding notebooklm to .mcp.json"
# User should manually add or use claude mcp add
fi
fi
Recommended MCP configuration:
{
"mcpServers": {
"notebooklm": {
"command": "notebooklm-mcp",
"args": ["--transport", "stdio"],
"env": {
"NOTEBOOKLM_QUERY_TIMEOUT": "120"
}
}
}
}
ā
NotebookLM Setup Complete!
š Auth Location: ~/.notebooklm-mcp/auth.json
š Auth Expires: ~2-4 weeks (re-run /setup-notebooklm when needed)
š Next Steps:
1. Create a client notebook: /notebook-init <org-alias>
2. Sync sources: /notebook-sync <org-alias> <file-path>
3. Query context: /notebook-query <org-alias> "What are the CPQ findings?"
š” Tip: NotebookLM offers ~50 queries/day on free tier.
Use /generate-client-briefing for weekly updates.
| Error | Resolution |
|---|---|
| Chrome not found | Install Chrome or Chromium |
| Auth timeout | Re-run, ensure Google login completes |
| MCP not installed | Run installation steps above |
| Permission denied | Check ~/.notebooklm-mcp/ permissions |
| Variable | Default | Description |
|---|---|---|
| NOTEBOOKLM_QUERY_TIMEOUT | 120 | Query timeout in seconds |
| NOTEBOOKLM_DEBUG | false | Enable verbose logging |
| NOTEBOOKLM_CHROME_PATH | auto | Custom Chrome path |
NotebookLM uses cookie-based authentication:
To check auth status:
cat ~/.notebooklm-mcp/auth.json | jq '.last_refresh'
Once setup completes, these MCP tools become available:
notebook_create, notebook_list, notebook_querysource_add_text, source_add_url, source_add_drivestudio_briefing_create, studio_audio_createresearch_initiate_drive, research_pollrefresh_authFull tool list: 31 NotebookLM operations