NotebookLM MCP Server

NotebookLM MCP Server

Enables AI agents like Claude and Cursor to directly query Google's NotebookLM for zero-hallucination answers based on your uploaded documents, eliminating the need for manual copy-pasting and providing expert-level synthesized responses with source citations.

Category
Visit Server

README

<div align="center">

NotebookLM MCP Server

讓您的 CLI 代理 (Claude, Cursor, Codex...) 直接與 NotebookLM 對話,根據您的筆記本獲得零幻覺的答案

TypeScript MCP npm Claude Code Skill GitHub

安裝快速開始為什麼選擇-notebooklm範例文件

</div>


注意:本專案 fork 自 PleasePrompto/notebooklm-mcp.git,此版本為修改版。


問題

當您告訴 Claude Code 或 Cursor「搜尋我的本地文件」時,會發生以下情況:

  • 大量 Token 消耗:搜尋文件意味著重複讀取多個檔案
  • 檢索不準確:關鍵字搜尋會錯過文件之間的上下文和關聯
  • 幻覺:當它找不到東西時,它會編造聽起來合理的 API
  • 昂貴且緩慢:每個問題都需要重新讀取多個檔案

解決方案

讓您的本地代理直接與 NotebookLM 對話 — Google 的 零幻覺知識庫,由 Gemini 2.5 提供支援,可從您的文件中提供智慧、綜合的答案。

您的任務 → 本地代理詢問 NotebookLM → Gemini 綜合答案 → 代理編寫正確的程式碼

真正的優勢:不再需要在 NotebookLM 和您的編輯器之間手動複製貼上。您的代理直接詢問 NotebookLM 並在 CLI 中直接獲得答案。它可以通過自動追問建立深刻的理解 — Claude 會按順序詢問多個問題,每個問題都建立在上一個問題的基礎上,獲取具體的實作細節、邊緣情況和最佳實踐。您可以將 NotebookLM 連結儲存到帶有標籤和描述的本地庫中,Claude 會根據您當前的任務自動選擇相關的筆記本。


為什麼選擇 NotebookLM 而不是本地 RAG?

方法 Token 成本 設定時間 幻覺 答案品質
將文件餵給 Claude 🔴 非常高 (多次讀取檔案) 即時 有 - 會填補空白 檢索變數
網路搜尋 🟡 中等 即時 高 - 來源不可靠 時好時壞
本地 RAG 🟡 中-高 數小時 (嵌入, 切塊) 中 - 檢索缺漏 取決於設定
NotebookLM MCP 🟢 極低 5 分鐘 - 未知則拒絕 專家級綜合

NotebookLM 有何過人之處?

  1. 由 Gemini 預處理:上傳文件一次,即可獲得即時的專家知識
  2. 自然語言問答:不僅僅是檢索 — 而是真正的理解和綜合
  3. 多來源關聯:連接 50 多個文件中的資訊
  4. 引用支援:每個答案都包含來源引用
  5. 無基礎設施:無需向量資料庫、嵌入或切塊策略

安裝

Claude Code

claude mcp add notebooklm npx notebooklm-mcp-zh@latest

Cursor

新增至 ~/.cursor/mcp.json:

{
  "mcpServers": {
    "notebooklm": {
      "command": "npx",
      "args": ["-y", "notebooklm-mcp-zh@latest"]
    }
  }
}

快速開始

1. 安裝 MCP 伺服器 (見上方 安裝)

2. 驗證 (一次性)

在您的聊天 (Claude/Cursor) 中說:

"Log me in to NotebookLM" (登入 NotebookLM)

Chrome 視窗將開啟 → 使用 Google 登入

3. 建立您的知識庫

前往 notebooklm.google.com → 建立筆記本 → 上傳您的文件:

  • 📄 PDF, Google Docs, markdown 檔案
  • 🔗 網站, GitHub 儲存庫
  • 🎥 YouTube 影片
  • 📚 每個筆記本支援多個來源

分享:⚙️ Share (分享) → Anyone with link (任何擁有連結的人) → Copy (複製)

4. 讓 Claude 使用它

"I'm building with [library]. Here's my NotebookLM: [link]"
(我正在使用 [library] 進行開發。這是我的 NotebookLM:[連結])

就這樣。 Claude 現在會詢問 NotebookLM 它需要的任何資訊,在編寫程式碼之前建立專業知識。


真實案例

建立 n8n 工作流程而不產生幻覺

挑戰:n8n 的 API 很新 — Claude 經常對節點名稱和功能產生幻覺。

解決方案

  1. 下載完整的 n8n 文件 → 合併成易於管理的區塊
  2. 上傳到 NotebookLM
  3. 告訴 Claude:"幫我建立一個 Gmail 垃圾郵件過濾工作流程。使用這個 NotebookLM:[連結]"

結果:第一次嘗試就獲得完美的工作流程。無需除錯幻覺產生的 API。


核心功能

零幻覺

如果資訊不在您的文件中,NotebookLM 會拒絕回答。不會有發明的 API。

自主研究

Claude 會自動詢問後續問題,在編碼前建立完整的理解。

智慧庫管理

使用標籤和描述儲存 NotebookLM 連結。Claude 會為您的任務自動選擇正確的筆記本。

"Add [link] to library tagged 'frontend, react, components'"

跨工具共享

設定一次,隨處使用。Claude Code, Codex, Cursor — 均共享同一個庫。

深度清理工具

隨時重新開始。掃描整個系統的 NotebookLM 資料並提供分類預覽。


工具設定檔 (Tool Profiles)

透過僅載入您需要的工具來減少 Token 使用量。

設定檔 工具數量 用途
minimal 5 僅查詢:ask_question, get_health, list_notebooks, select_notebook, get_notebook
standard 10 + 庫管理:setup_auth, list_sessions, add_notebook, update_notebook, search_notebooks
full 16 所有工具,包含 cleanup_data, re_auth

設定方式:

npx notebooklm-mcp-zh config set profile minimal

常見指令

意圖 指令 (範例) 結果
驗證 "Log me in to NotebookLM" 開啟 Chrome 登入
新增筆記本 "Add [link] to library" 儲存筆記本與中繼資料
列出筆記本 "Show our notebooks" 列出所有儲存的筆記本
先行研究 "Research this in NotebookLM before coding" 多問題會話
選擇筆記本 "Use the React notebook" 設定當前活動筆記本

免責聲明

此工具自動化與 NotebookLM 的瀏覽器互動。

關於瀏覽器自動化: 雖然我已經加入了擬人化功能(真實的打字速度、自然延遲、滑鼠移動)以使自動化行為更自然,但我不能保證 Google 不會檢測或標記自動化使用。建議使用專用的 Google 帳戶進行自動化,而不是您的主要帳戶。

關於 CLI 工具和 AI 代理: 請謹慎使用:

  • 在提交或部署之前務必審查變更
  • 先在安全環境中測試
  • 備份重要工作

貢獻

發現錯誤?有功能想法?歡迎在 GitHub 上提交 issue 或 PR!

授權

MIT — 可在您的專案中自由使用。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured