github jacob-bd/notebooklm-mcp-cli v0.6.14
v0.6.14 — Auth & Memory Reliability

latest release: v0.6.15
4 hours ago

Highlights

Auth finally tells the truth

You know that weird thing where the CLI says "Authenticated" but then the next API call fails anyway? Two PRs kill that flow:

  • PR #211 by @insane66613: nlm login no longer crashes when your existing auth is already expired. It used to throw an internal stack trace. Now it walks you through re-auth cleanly.
  • PR #212 by @idankatz64-commits: When the auth check fails, studio tools used to return a fake status: success and let the API call surface a cryptic downstream error. Now they return status: error with a clear error_reason (expired, no_tokens, stale_heuristic, etc.) and tell you to run nlm login. Way easier to debug from an agent loop.

Long-lived MCP servers won't OOM anymore (Issue #213)

If you run notebooklm-mcp as a persistent server (Claude Code, long-lived stdio, anything that keeps the process alive across many chats) and hit multiple notebooks in parallel, the in-process conversation history cache used to grow without bound. After a few hours of heavy use, the process could eat a few GB of RAM.

Fix: bounded cache with three env-var knobs, all 0 = unlimited:

Variable Default Purpose
NOTEBOOKLM_CONVERSATION_TURNS_PER_NOTEBOOK 50 Max turns kept per notebook (FIFO trim)
NOTEBOOKLM_CONVERSATION_MAX_NOTEBOOKS 50 Max notebooks in the cache (LRU eviction)
NOTEBOOKLM_CONVERSATION_MAX_CHARS_PER_TURN 100,000 Per-turn cap to keep single mega-responses in check

After a trim, turn_number renumbers to 1..N so the first turn is always turn_number=1. New get_conversation_cache_stats() exposes counts for monitoring. The 12 new tests cover the FIFO behavior, LRU promotion, env-var parsing (including negative values, which clamp to 0 with a warning), and the stats method's lock-release window.

Auth check cached for 60s

Every studio_create call used to re-validate auth over HTTP. That roundtrip adds up across a long agent run, especially on the CLI side. The new ca85fae commit caches the "auth is valid" result for 60 seconds, and the cache clears the instant auth flips to invalid. So you get the speedup without the stale-TTL trap. This is per-process, not per-profile, and resets cleanly on any auth failure.

Improved docs

The bundled SKILL.md (and the user-level nlm-skill) got a new Section 16: Long-Lived MCP Server Configuration covering all the new env vars, the --stateless flag (HTTP transport only, not a cache control as the name might suggest), the error_reason field, and the pre-flight auth behavior. If you run this as a server in production, read that section. There's also a new Error Recovery row for the login crash so agents know what to do when they see the new error shape.

Update

uv tool install --upgrade notebooklm-mcp-cli
# or
pip install --upgrade notebooklm-mcp-cli

Contributors

Huge thanks to @insane66613 (PR #211) and @idankatz64-commits (PR #212) for the auth fixes. Community PRs are the whole reason this project stays reliable. If you've been sitting on a bug report or a fix, the next release window is open.

Don't miss a new notebooklm-mcp-cli release

NewReleases is sending notifications on new releases.