NotebookBrain MCP put the right note first on 10 of 12 questions, every quote verbatim
An MCP server for cited project memory with a local BM25 backend and opt-in Gemini File Search or notebooklm-py. Keyless, on synthetic notes, 23 of 23 quotes matched the source text.
By David Discua
Measured in the lab
- 10/12
- expected note first (hit@1)
- 12/12
- expected note cited (hit@3)
- 23/23
- quotes equal to source[start:end]
- 3/3
- unanswerable questions declined
- 3 of 3 unanswerable questions declined with no citations
- Every [n] marker mapped to a citation in 15 of 15 answers
- Official-backend policy refused 5 of 5 secret cases
- Unofficial-backend policy refused 9 of 9 risky cases
- notebooklm-py backend refused to start without the ToS flag
From reports/notebookbrain.json · run on October 21, 2026. Local BM25 backend through the stdio MCP server over 8 synthetic notes and 15 questions; the report is deterministic and carries no timestamp
How it is wired
01/04Your agent calls ask over MCP stdio.
NotebookBrain MCP gives an agent cited project memory through three tools, add_source, ask and list_sources. The default backend is a local BM25 store, and Gemini File Search or notebooklm-py can be switched in. Every backend returns the same shape, text with [n] markers plus numbered citations that quote the source. On 8 synthetic notes, the local backend put the expected note first on 10 of 12 answerable questions and declined all 3 unanswerable ones. The catch is that neither remote backend answered a live question in this lab.
The catch
The numbers measure local BM25 over our own synthetic notes. They say nothing about Gemini File Search or NotebookLM answer quality. The Gemini backend is tested against a mocked REST transport, and its live path was not run in this lab. File Search also returns the retrieved chunk text without a span in your document, so start and end come back null for that backend.
notebooklm-py drives undocumented Google endpoints with your browser session. The backend refuses to start unless NOTEBOOKBRAIN_ACCEPT_UNOFFICIAL=i-accept-unofficial-google-api-risk is set exactly, it was never run live here, and we did not verify whether automating consumer NotebookLM is allowed for your account. We checked the NotebookLM Enterprise API on October 21, 2026 and found methods to manage notebooks and sources but no documented way to ask a notebook a question, so the official backend uses the Gemini API instead.
The risk gate is a regex scan for cloud keys, tokens, private keys, JWTs, emails, card numbers, US SSNs and confidentiality markers. Names, addresses and phone numbers pass.
What we ran (keyless)
uv sync --frozen
uv run notebookbrain add-dir fixtures/notes
uv run notebookbrain ask "What canary error rate triggers a rollback?"
uv run notebookbrain list
uv run python scripts/report.py
From reports/notebookbrain.json, written by the report script through the real stdio MCP server on October 21, 2026:
| Metric | Result |
|---|---|
| Synthetic notes added / listed back | 8 / 8 |
| Expected note is citation [1] (hit@1) | 10/12 |
| Expected note among citations (hit@3) | 12/12 |
| Cited quote from that note contains the key fact | 11/12 |
| Unanswerable questions declined with no citations | 3/3 |
| Citations whose quote equals source[start:end] | 23/23 |
| Answers where every [n] maps to a citation | 15/15 |
| Risk gate, official policy | 5/5 refused, 7/7 allowed |
| Risk gate, unofficial policy | 9/9 refused, 3/3 allowed |
The two hit@1 misses show where BM25 falls short on paraphrase. Asked which days deploys are allowed, it ranked an API rate-limit note first and the deploy runbook second. On the other miss it ranked the glossary ahead of the runbook. The local policy refused nothing and allowed 12 of 12 gate cases, by design, since nothing leaves the machine.
How it is wired
The server runs over stdio with the MCP Python SDK 2.3.0 and returns structured JSON. The risk gate runs on sources and questions before any backend call, with a policy per backend kind: local reports findings, official refuses secrets, and unofficial also refuses personal data and sources over 200,000 characters. Findings never include the matched value. normalize() renumbers citations by first marker, drops dangling markers and merges duplicates for every backend, and a parity test checks that all three return identical keys. A missing key, login or ToS flag returns an unavailable status instead of crashing.
Minilab (open source)
The unofficial backend pins teng-lin/notebooklm-py 0.8.5 (19,872 stars, MIT, Python, as of October 24, 2026). Point add-dir at your own notes, add questions to fixtures/questions.yaml, re-run uv run python scripts/report.py, and compare hit@1 with hit@3 in reports/notebookbrain.json.
Run it yourself
SkilledDragonCorp/notebookbrain-mcp
Clone, install and run the report with no API keys. The numbers above are what that run writes.
uv sync --frozen && uv run notebookbrain add-dir fixtures/notes && uv run notebookbrain ask "What canary error rate triggers a rollback?"SkilledDragon is not affiliated with Google (NotebookLM, Gemini) or the notebooklm-py authors. Numbers are from our own keyless run on synthetic notes; re-run the report before relying on them. Marks belong to their owners.
All labs