notebooklm-api
Enables document Q&A with grounded citations using the official Gemini File Search API. Upload documents, create stores, and ask questions that return exact passage citations.
README
@mcpware/notebooklm-api
NotebookLM-quality document Q&A — but through MCP, powered by the official Gemini File Search API.
You upload your documents. You ask a question. Every sentence in the answer cites the exact passage from your files. No hallucination, no guessing, no "I think the document says...". Just grounded answers with receipts.
The problem
Every existing NotebookLM MCP server reverse-engineers Google's internal web UI. They scrape the page with Playwright, steal cookies, and pray Google doesn't change a CSS selector. Spoiler: Google changes things. Your MCP breaks. Your Google account gets flagged.
This one uses the official Gemini File Search API. It doesn't scrape anything. It doesn't need your Google login. Just an API key from aistudio.google.com.
What you get
Upload PDFs, DOCX, TXT, HTML, or any of 80+ supported formats. Ask questions across one or multiple document stores. Get answers like this:
The maximum liability is limited to the total fees paid
in the preceding twelve months [1]. Clients must pay all
invoices within forty-five days of receipt [2].
---
Citations:
[1] Contract_A.pdf: "The maximum liability under this agreement
shall not exceed the total fees paid in the preceding
twelve (12) months." (confidence: 92%)
[2] Contract_A.pdf: "The Client shall pay all invoices within
forty-five (45) days of receipt." (confidence: 88%)
Every [1], [2] maps to the exact passage from your document. Not a summary. The actual text.
Quick start
# Set your Gemini API key
export GEMINI_API_KEY=your-key-from-aistudio.google.com
# Add to Claude Code
claude mcp add notebooklm-api npx @mcpware/notebooklm-api
# Or add to Claude Desktop (~/.claude/mcp.json)
{
"mcpServers": {
"notebooklm-api": {
"command": "npx",
"args": ["@mcpware/notebooklm-api"],
"env": { "GEMINI_API_KEY": "your-key" }
}
}
}
Then just talk to Claude naturally. The three-step workflow:
Step 1: Create a store (one time per topic)
"Create a store called 'Legal Docs'"
Step 2: Upload your files (one time per topic)
"Upload all PDFs from ~/contracts/ to the Legal Docs store"
Step 3: Ask questions (as many as you want)
"What are the liability clauses across all contracts?" "Which contract has the shortest termination notice period?" "Does any contract mention non-compete?"
Claude calls create_store, upload_document, and ask automatically. You don't need to know store names or API details. Each store is independent, so you can have separate stores for different topics (legal docs, tax records, research papers, etc.) and query them individually or together.
Tools
| Tool | What it does |
|---|---|
create_store |
Create a document store |
list_stores |
List all stores |
upload_document |
Upload a file (PDF, DOCX, TXT, etc.) to a store. Waits for indexing to finish. |
list_documents |
List documents in a store |
ask |
Ask a question. Returns answer with per-passage citations. |
delete_document |
Remove a document |
delete_store |
Remove a store |
How citations work
When you call ask, the Gemini File Search API does three things:
- Searches your uploaded documents for relevant passages (vector similarity, not keyword match)
- Generates an answer grounded in those passages
- Returns
groundingSupports— a map from each sentence in the answer to the exact source passage
We parse that map into inline [1], [2] markers and a citation list. This is the part every competitor gets wrong — they dump the raw API response without parsing it. We give you something you can actually read and verify.
Why not just use NotebookLM?
You should, if the web UI works for you. This tool is for when you want:
- Document Q&A inside your coding agent (Claude Code, Cursor, etc.)
- Programmatic access — upload 100 documents, ask 50 questions, extract structured data
- Stability — no browser automation, no cookies, no scraping
- Your own API key — you control the cost and the data
Privacy
On the free tier, Google may use your data to improve products. On the paid tier (link a billing account), they don't. If your documents are sensitive, use the paid tier. Details.
Get an API key
- Go to aistudio.google.com
- Click "Get API key"
- Set it as
GEMINI_API_KEY
The free tier gives you enough to try everything. Paid tier for production use.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。