Thanks for this skill + MCP server. Reporting a root cause (with a one-line fix) for AUTH_REQUIRED errors that now happen on every tool call.
Summary
Every MCP tool call — including read-only nlm_list — returns [AUTH_REQUIRED], even though the Google session is valid (notebooklm doctor passes). The cause is a pre-flight check on a hardcoded flat storage path that current notebooklm-py no longer uses and actively deletes.
Root cause
mcp_server/tools.py:2 — the server is written against notebooklm-py v0.3.4, but uvx resolves a current notebooklm-py (0.7.0 here) at runtime.
mcp_server/tools.py:19 — _STORAGE_PATH = ~/.notebooklm/storage_state.json (flat).
mcp_server/tools.py:48 — _get_client() raises AUTH_REQUIRED if that flat file is missing, before every tool call.
- Since
notebooklm-py ≥ 0.4.0, the canonical auth location moved to ~/.notebooklm/profiles/<profile>/storage_state.json. Its migration (notebooklm/migration.py, ensure_profiles_dir() → migrate_to_profiles()) treats a flat file at the root as legacy and removes it on every CLI run. So the flat path the gate checks no longer persists.
Proof the gate is the only blocker
With no flat file present at all, the very call the server makes one line later succeeds:
# ~/.notebooklm/storage_state.json does NOT exist
async with await NotebookLMClient.from_storage() as c:
... # authenticates fine via profiles/default/
from_storage() already resolves the current layout. The pre-flight _STORAGE_PATH.exists() check is therefore both redundant and wrong.
Impact
As soon as any notebooklm CLI command runs (which deletes the flat file), every MCP tool fails with AUTH_REQUIRED, despite valid auth. The MCP server is effectively unusable alongside a current notebooklm-py.
Suggested fix
Drop the redundant pre-flight gate and let from_storage() be the single source of truth (it already resolves profiles/ and honors NOTEBOOKLM_AUTH_JSON). The existing except block at tools.py:53-57 already turns auth failures into the friendly message, so nothing is lost:
async def _get_client():
try:
async with await NotebookLMClient.from_storage() as client:
yield client
except Exception as exc:
msg = str(exc).lower()
if any(k in msg for k in ("auth", "login", "credential", "session", "storage")):
raise RuntimeError(_AUTH_ERROR_MESSAGE) from exc
raise
(Alternatively, resolve the path through notebooklm-py's own path API rather than hardcoding the flat path.) Either way, _AUTH_ERROR_MESSAGE should stop pointing at ~/.notebooklm/storage_state.json, since that file no longer exists by design.
Environment
notebooklm-skill 1.2.1 (MCP server)
notebooklm-py 0.7.0 (resolved at runtime via uvx)
- Python 3.13, Linux
Happy to open a PR if useful. Thanks!
Summary
Every MCP tool call — including read-only
nlm_list— returns[AUTH_REQUIRED], even though the Google session is valid (notebooklm doctorpasses). The cause is a pre-flight check on a hardcoded flat storage path that currentnotebooklm-pyno longer uses and actively deletes.Root cause
mcp_server/tools.py:2— the server is written againstnotebooklm-py v0.3.4, butuvxresolves a currentnotebooklm-py(0.7.0 here) at runtime.mcp_server/tools.py:19—_STORAGE_PATH = ~/.notebooklm/storage_state.json(flat).mcp_server/tools.py:48—_get_client()raisesAUTH_REQUIREDif that flat file is missing, before every tool call.notebooklm-py≥ 0.4.0, the canonical auth location moved to~/.notebooklm/profiles/<profile>/storage_state.json. Its migration (notebooklm/migration.py,ensure_profiles_dir()→migrate_to_profiles()) treats a flat file at the root as legacy and removes it on every CLI run. So the flat path the gate checks no longer persists.Proof the gate is the only blocker
With no flat file present at all, the very call the server makes one line later succeeds:
from_storage()already resolves the current layout. The pre-flight_STORAGE_PATH.exists()check is therefore both redundant and wrong.Impact
As soon as any
notebooklmCLI command runs (which deletes the flat file), every MCP tool fails withAUTH_REQUIRED, despite valid auth. The MCP server is effectively unusable alongside a currentnotebooklm-py.Suggested fix
Drop the redundant pre-flight gate and let
from_storage()be the single source of truth (it already resolvesprofiles/and honorsNOTEBOOKLM_AUTH_JSON). The existingexceptblock attools.py:53-57already turns auth failures into the friendly message, so nothing is lost:(Alternatively, resolve the path through
notebooklm-py's own path API rather than hardcoding the flat path.) Either way,_AUTH_ERROR_MESSAGEshould stop pointing at~/.notebooklm/storage_state.json, since that file no longer exists by design.Environment
notebooklm-skill1.2.1 (MCP server)notebooklm-py0.7.0 (resolved at runtime viauvx)Happy to open a PR if useful. Thanks!