NotebookLM MCP Server - First Stable Release
Let your CLI agents (Claude Code, Codex, Cursor) chat directly with NotebookLM for zero-hallucination answers based on your own notebooks.
This is the first stable release after thorough testing and feature refinement. The server is production-ready and actively used in real-world projects.
Installation
Quick Start
Claude Code:
claude mcp add notebooklm npx notebooklm-mcp@latestCodex:
codex mcp add notebooklm -- npx notebooklm-mcp@latestCursor:
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"notebooklm": {
"command": "npx",
"args": ["-y", "notebooklm-mcp@latest"]
}
}
}See README for more installation options (Gemini, amp, VS Code).
What This Solves
When you tell Claude or Cursor to "search through my documentation", here's what happens:
- Massive token consumption: Reading multiple files repeatedly
- Inaccurate retrieval: Keyword search misses context and connections
- Hallucinations: Invents plausible-sounding APIs when it can't find something
- Expensive and slow: Each question requires re-reading files
Solution: Let your local agents chat directly with NotebookLM — Google's zero-hallucination knowledge base powered by Gemini 2.5 that provides intelligent, synthesized answers from your docs.
Your Task → Local Agent asks NotebookLM → Gemini synthesizes answer → Agent writes correct code
No more manual copy-paste between NotebookLM and your editor. Your agent asks NotebookLM directly and gets answers straight back in the CLI.
Core Features
Zero Hallucinations
NotebookLM refuses to answer if information isn't in your docs. No invented APIs.
Autonomous Research
Claude asks follow-up questions automatically, building complete understanding before coding.
Smart Library Management
Save NotebookLM links with tags and descriptions. Claude auto-selects the right notebook for your task.
Deep Cleanup Tool
Fresh start anytime. Scans entire system for NotebookLM data with categorized preview.
Persistent Sessions
Browser sessions stay alive across multiple queries for faster responses.
Human-Like Automation
Realistic typing speeds, natural delays, and mouse movements to avoid detection.
What's New in v1.1.2
Version History Overview
v1.1.x - Feature Additions:
- Added reference to companion Claude Code Skill version
- Fixed binary execution permissions across platforms
- Expanded installation guides (Cursor, Gemini, amp, VS Code)
- Major library management improvements
v1.0.x - Stability Refinements:
- Initial public release with core functionality
- Multiple bug fixes and documentation improvements
- Authentication flow hardening
- Browser automation reliability improvements
Full Changelog
v1.1.2 (Latest)
- Add Claude Code Skill reference to README
- Include package-lock.json in repository
- Clean up gitignore for CLAUDE.md
v1.1.1
- Fix binary permissions across npm installations
- Add postbuild script for executable setup
v1.1.0
- Major feature update with enhanced library management
- Improved session handling
v1.0.5
- Add installation guides for multiple clients (Cursor, Gemini, amp, VS Code)
v1.0.1 - v1.0.4
- Documentation improvements
- Authentication flow fixes
- Browser automation stability enhancements
v1.0.0
- Initial public release
- Core MCP server functionality
- Browser automation with Patchright
- Smart library management
- Deep cleanup tool
Quick Start Guide
1. Install the MCP server
See Installation section above for your specific client.
2. Authenticate (one-time)
Say in your chat:
"Log me in to NotebookLM"
A Chrome window opens → log in with Google → Done.
3. Create your knowledge base
Go to notebooklm.google.com:
- Create notebook
- Upload your docs (PDFs, Google Docs, markdown, websites, YouTube videos)
- Share: ⚙️ Share → Anyone with link → Copy
4. Let your agent use it
"I'm building with [library]. Here's my NotebookLM: [link]"
That's it. Your agent now asks NotebookLM whatever it needs, building expertise before writing code.
Real-World Example
Building an n8n Workflow Without Hallucinations
Challenge: n8n's API is new — Claude hallucinates node names and functions.
Solution:
- Downloaded complete n8n documentation → merged into manageable chunks
- Uploaded to NotebookLM
- Told Claude: "Build me a Gmail spam filter workflow. Use this NotebookLM: [link]"
Watch the AI-to-AI conversation:
Claude → "How does Gmail integration work in n8n?"
NotebookLM → "Use Gmail Trigger with polling, or Gmail node with Get Many..."
Claude → "How to decode base64 email body?"
NotebookLM → "Body is base64url encoded in payload.parts, use Function node..."
Claude → "How to parse OpenAI response as JSON?"
NotebookLM → "Set responseFormat to json, use {{ $json.spam }} in IF node..."
Claude → "What about error handling if the API fails?"
NotebookLM → "Use Error Trigger node with Continue On Fail enabled..."
Claude → ✓ "Here's your complete workflow JSON..."
Result: Perfect workflow on first try. No debugging hallucinated APIs.
Why NotebookLM, Not Local RAG?
| Approach | Token Cost | Setup Time | Hallucinations | Answer Quality |
|---|---|---|---|---|
| Feed docs to Claude | Very high | Instant | Yes - fills gaps | Variable retrieval |
| Web search | Medium | Instant | High - unreliable sources | Hit or miss |
| Local RAG | Medium-High | Hours | Medium - retrieval gaps | Depends on setup |
| NotebookLM MCP | Minimal | 5 minutes | Zero - refuses if unknown | Expert synthesis |
What Makes NotebookLM Superior
- Pre-processed by Gemini: Upload docs once, get instant expert knowledge
- Natural language Q&A: Not just retrieval — actual understanding and synthesis
- Multi-source correlation: Connects information across 50+ documents
- Citation-backed: Every answer includes source references
- No infrastructure: No vector DBs, embeddings, or chunking strategies needed
Alternative: Claude Code Skill
Prefer Claude Code Skills over MCP? This server is now also available as a native Claude Code Skill:
NotebookLM Claude Code Skill - Clone to ~/.claude/skills and start using immediately
Key differences:
- MCP Server (this repo): Persistent sessions, works with Claude Code, Codex, Cursor, and other MCP clients
- Claude Code Skill: Simpler setup, Python-based, stateless queries, works only with Claude Code
Both use the same browser automation technology and provide zero-hallucination answers from your NotebookLM notebooks.
Documentation
- README - Complete overview and quick start
- Usage Guide - Patterns, workflows, tips
- Tool Reference - Complete MCP API
- Configuration - Environment variables
- Troubleshooting - Common issues
Technical Details
Requirements
- Node.js 18.0.0 or higher
- Chrome/Chromium browser (installed automatically if needed)
- Google account for NotebookLM access
Architecture
- TypeScript-based MCP server
- Browser automation via Patchright
- Persistent session management
- Local data storage via env-paths
Platform Support
- Linux
- macOS
- Windows
FAQ
Is it really zero hallucinations?
Yes. NotebookLM is specifically designed to only answer from uploaded sources. If it doesn't know, it says so.
What about rate limits?
Free tier has daily query limits per Google account. Quick account switching supported for continued research.
How secure is this?
Chrome runs locally. Your credentials never leave your machine. Use a dedicated Google account if concerned.
Can I see what's happening?
Yes. Say "Show me the browser" to watch the live NotebookLM conversation.
What makes this better than Claude's built-in knowledge?
Your docs are always current. No training cutoff. No hallucinations. Perfect for new libraries, internal APIs, or fast-moving projects.
Disclaimer
This tool automates browser interactions with NotebookLM to make your workflow more efficient. However, a few important notes:
About Browser Automation
While this server includes humanization features (realistic typing speeds, natural delays, mouse movements) to make automation behave naturally, I cannot guarantee Google won't detect or flag automated usage. I recommend using a dedicated Google account for automation rather than your primary account — think of it like web scraping: probably fine, but better safe than sorry.
About CLI Tools and AI Agents
CLI tools like Claude Code, Codex, and similar AI-powered assistants are incredibly powerful, but they can make mistakes. Please use them with care and awareness:
- Always review changes before committing or deploying
- Test in safe environments first
- Keep backups of important work
- Remember: AI agents are assistants, not infallible oracles
I built this tool for myself because I was tired of the copy-paste dance between NotebookLM and my editor. I'm sharing it in the hope it helps others too, but I cannot take responsibility for any issues, data loss, or account problems that might occur. Use at your own discretion and judgment.
That said, if you run into problems or have questions, feel free to open an issue. I'm happy to help troubleshoot.
The Bottom Line
Without NotebookLM MCP: Write code → Find it's wrong → Debug hallucinated APIs → Repeat
With NotebookLM MCP: Claude researches first → Writes correct code → Ship faster
Stop debugging hallucinations. Start shipping accurate code.
Contributing
Found a bug? Have a feature idea? Open an issue or submit a PR.
License
MIT - Use freely in your projects.
Built with frustration about hallucinated APIs, powered by Google's NotebookLM.
Star on GitHub if this saves you debugging time!