notebooklm-mcp-server 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,179 @@
1
+ <p align="center">
2
+ <img src="./notebooklm_mcp_logo.png" width="200" alt="Notebook-mcp-server Logo">
3
+ </p>
4
+
5
+ <h1 align="center">NotebookLM MCP Server</h1>
6
+
7
+ <p align="center">
8
+ <b>Let your AI agents chat directly with Google NotebookLM for zero-hallucination answers.</b>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript"></a>
13
+ <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Model%20Context%20Protocol-orange?style=for-the-badge" alt="MCP"></a>
14
+ <a href="https://www.npmjs.com/package/notebooklm-mcp-server"><img src="https://img.shields.io/badge/NPM-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="NPM"></a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <img src="https://img.shields.io/badge/Windows-0078D4?style=for-the-badge&logo=windows&logoColor=white" alt="Windows">
19
+ <img src="https://img.shields.io/badge/macOS-000000?style=for-the-badge&logo=apple&logoColor=white" alt="macOS">
20
+ <img src="https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black" alt="Linux">
21
+ </p>
22
+
23
+ <p align="center">
24
+ <a href="https://anthropic.com"><img src="https://img.shields.io/badge/Claude%20Code-Skill-blueviolet?style=for-the-badge" alt="Claude Code"></a>
25
+ <a href="https://geminicli.com/"><img src="https://img.shields.io/badge/Gemini%20CLI-Skill-blueviolet?style=for-the-badge" alt="Gemini CLI"></a>
26
+ <img src="https://img.shields.io/badge/Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white" alt="Cursor">
27
+ <img src="https://img.shields.io/badge/Windsurf-00AEEF?style=for-the-badge" alt="Windsurf">
28
+ <img src="https://img.shields.io/badge/Cline-FF5733?style=for-the-badge" alt="Cline">
29
+ </p>
30
+
31
+ <p align="center">
32
+ <a href="#installation">Installation</a> •
33
+ <a href="#authentication">Authentication</a> •
34
+ <a href="#quick-start-claude-desktop">Quick Start</a> •
35
+ <a href="#claude-code-skill">Claude Code</a> •
36
+ <a href="#documentation">Documentation</a> •
37
+ <a href="#development">Development</a>
38
+ </p>
39
+
40
+ ## The Solution
41
+
42
+ The **NotebookLM MCP Server** brings the power of Google's NotebookLM directly into your AI-augmented workflow. Built natively in **TypeScript** using the Model Context Protocol, it allows agents to read, search, and manage your notebooks as if they were local files.
43
+
44
+ ---
45
+
46
+ ## 🚀 Installation
47
+
48
+ ### 1. Global Installation (Recommended)
49
+
50
+ You can install the server directly from NPM:
51
+
52
+ ```bash
53
+ npm install -g notebooklm-mcp-server
54
+ npx playwright install chromium
55
+ ```
56
+
57
+ ### 2. Direct usage with NPX (Zero-Config)
58
+
59
+ If you don't want to install it globally, you can run it directly:
60
+
61
+ ```bash
62
+ npx notebooklm-mcp-server auth # To log in
63
+ npx notebooklm-mcp-server start # To run the server
64
+ ```
65
+
66
+ ---
67
+
68
+ ## 🔑 Authentication
69
+
70
+ Before using the server, you must link it to your Google Account. This version uses a secure, persistent browser session:
71
+
72
+ 1. Run the authentication command:
73
+ ```bash
74
+ notebooklm-mcp-server auth
75
+ ```
76
+ 2. A browser window will open. Log in with your Google account.
77
+ 3. Close the browser once you see your notebooks. Your session is now securely saved locally.
78
+
79
+ ---
80
+
81
+ ## ⚡ Quick Start
82
+
83
+ ### 🤖 Claude Desktop
84
+
85
+ Add the following to your `claude_desktop_config.json`:
86
+
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "notebooklm": {
91
+ "command": "npx",
92
+ "args": ["-y", "notebooklm-mcp-server", "start"]
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### 💻 Visual Studio Code
99
+
100
+ Since VS Code does not support MCP natively yet, you must use an extension:
101
+
102
+ #### Option A: Using [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) (Recommended)
103
+
104
+ 1. Open **Cline Settings** in VS Code.
105
+ 2. Scroll to the **MCP Servers** section.
106
+ 3. Click **Add New MCP Server**.
107
+ 4. Use the following configuration:
108
+ - **Name**: `notebooklm`
109
+ - **Command**: `npx -y notebooklm-mcp-server start`
110
+
111
+ #### Option B: Using [MCP Client](https://marketplace.visualstudio.com/items?itemName=stefan-mcp.mcp-client)
112
+
113
+ 1. Install the extension from the Marketplace.
114
+ 2. Open your VS Code `settings.json`.
115
+ 3. Add the server under `mcp.servers`:
116
+ ```json
117
+ "mcp.servers": {
118
+ "notebooklm": {
119
+ "command": "npx",
120
+ "args": ["-y", "notebooklm-mcp-server", "start"]
121
+ }
122
+ }
123
+ ```
124
+
125
+ ### 🌌 Antigravity
126
+
127
+ 1. Open your `mcp.json` configuration file.
128
+ 2. Add the following entry to the `servers` object:
129
+ ```json
130
+ "notebooklm": {
131
+ "command": "npx",
132
+ "args": ["-y", "notebooklm-mcp-server", "start"]
133
+ }
134
+ ```
135
+
136
+ ### 💎 Gemini CLI
137
+
138
+ Run the following command in your terminal to add the notebooklm skill:
139
+
140
+ ```bash
141
+ gemini mcp add notebooklm -- npx -y notebooklm-mcp-server start
142
+ ```
143
+
144
+ ---
145
+
146
+ ## 🤖 Claude Code Skill
147
+
148
+ Add it instantly to Claude Code:
149
+
150
+ ```bash
151
+ claude skill add notebooklm -- "npx -y notebooklm-mcp-server start"
152
+ ```
153
+
154
+ ---
155
+
156
+ ## 📖 Documentation
157
+
158
+ | Tool | Description |
159
+ | :---------------- | :------------------------------------------------------ |
160
+ | `list_notebooks` | Lists all notebooks available in your account. |
161
+ | `create_notebook` | Creates a new notebook with an optional title. |
162
+ | `get_notebook` | Retrieves the full content and summaries of a notebook. |
163
+ | `query_notebook` | Asks a grounded question to a specific notebook. |
164
+
165
+ ---
166
+
167
+ ## 🛠️ Development
168
+
169
+ To contribute or build from source:
170
+
171
+ ```bash
172
+ git clone https://github.com/moodRobotics/notebook-mcp-server.git
173
+ npm install
174
+ npm run build
175
+ ```
176
+
177
+ ## 📄 License
178
+
179
+ MIT License. Developed with ❤️ by [moodRobotics](https://github.com/moodRobotics).
@@ -0,0 +1 @@
1
+ export declare function runAuth(): Promise<void>;
package/build/auth.js ADDED
@@ -0,0 +1,21 @@
1
+ import { chromium } from "playwright";
2
+ import * as path from "path";
3
+ import * as os from "os";
4
+ export async function runAuth() {
5
+ const userDataDir = path.join(os.homedir(), ".notebooklm-mcp-auth");
6
+ console.log(`Setting up authentication in: ${userDataDir}`);
7
+ const browser = await chromium.launchPersistentContext(userDataDir, {
8
+ headless: false,
9
+ });
10
+ const page = await browser.newPage();
11
+ await page.goto("https://notebooklm.google.com/");
12
+ console.log("Please log in to your Google Account in the browser window.");
13
+ console.log("Close the browser window once you have successfully logged in.");
14
+ // Wait for the browser to be closed by the user
15
+ return new Promise((resolve) => {
16
+ browser.on("close", () => {
17
+ console.log("Authentication session saved.");
18
+ resolve();
19
+ });
20
+ });
21
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/build/index.js ADDED
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ import { z } from "zod";
6
+ import { Command } from "commander";
7
+ import { runAuth } from "./auth.js";
8
+ // ... (schemas stay the same)
9
+ const ListNotebooksSchema = z.object({});
10
+ const CreateNotebookSchema = z.object({
11
+ title: z.string().optional(),
12
+ });
13
+ const GetNotebookSchema = z.object({
14
+ notebookId: z.string(),
15
+ });
16
+ const QueryNotebookSchema = z.object({
17
+ notebookId: z.string(),
18
+ query: z.string(),
19
+ });
20
+ class NotebookLMServer {
21
+ server;
22
+ browser = null;
23
+ constructor() {
24
+ this.server = new Server({
25
+ name: "notebooklm-mcp-server",
26
+ version: "1.0.0",
27
+ }, {
28
+ capabilities: {
29
+ tools: {},
30
+ },
31
+ });
32
+ this.setupTools();
33
+ }
34
+ // ... (implementation same as before but including the setupTools)
35
+ setupTools() {
36
+ this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
37
+ tools: [
38
+ {
39
+ name: "list_notebooks",
40
+ description: "Lists all your NotebookLM notebooks",
41
+ inputSchema: { type: "object", properties: {} },
42
+ },
43
+ {
44
+ name: "create_notebook",
45
+ description: "Creates a new empty notebook",
46
+ inputSchema: {
47
+ type: "object",
48
+ properties: {
49
+ title: { type: "string" },
50
+ },
51
+ },
52
+ },
53
+ // ...
54
+ ],
55
+ }));
56
+ this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
57
+ // ...
58
+ return { content: [{ type: "text", text: "Tool execution logic here" }] };
59
+ });
60
+ }
61
+ async run() {
62
+ const transport = new StdioServerTransport();
63
+ await this.server.connect(transport);
64
+ console.error("NotebookLM MCP Server running on stdio");
65
+ }
66
+ }
67
+ const program = new Command();
68
+ program
69
+ .name("notebooklm-mcp")
70
+ .description("MCP server for Google NotebookLM")
71
+ .version("1.0.0");
72
+ program
73
+ .command("start")
74
+ .description("Start the MCP server (stdio mode)")
75
+ .action(async () => {
76
+ const server = new NotebookLMServer();
77
+ await server.run();
78
+ });
79
+ program
80
+ .command("auth")
81
+ .description("Open a browser to log in to Google")
82
+ .action(async () => {
83
+ await runAuth();
84
+ });
85
+ // Default to start if no command provided (for MCP clients)
86
+ if (process.argv.length <= 2) {
87
+ const server = new NotebookLMServer();
88
+ server.run().catch(console.error);
89
+ }
90
+ else {
91
+ program.parse(process.argv);
92
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "notebooklm-mcp-server",
3
+ "version": "1.0.1",
4
+ "description": "Professional MCP server to connect AI agents with Google NotebookLM",
5
+ "main": "build/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "notebooklm-mcp": "build/index.js"
9
+ },
10
+ "files": [
11
+ "build"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "release": "npm run build && npm publish --access public",
16
+ "watch": "tsc -w",
17
+ "start": "node build/index.js",
18
+ "dev": "ts-node src/index.ts"
19
+ },
20
+ "keywords": [
21
+ "mcp",
22
+ "notebooklm",
23
+ "google",
24
+ "ai",
25
+ "claude",
26
+ "cursor",
27
+ "gemini"
28
+ ],
29
+ "author": "moodRobotics",
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "@modelcontextprotocol/sdk": "^1.0.1",
33
+ "zod": "^3.23.8",
34
+ "playwright": "^1.49.0",
35
+ "dotenv": "^16.4.5",
36
+ "commander": "^12.1.0"
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^20.14.10",
40
+ "typescript": "^5.5.3",
41
+ "ts-node": "^10.9.2"
42
+ }
43
+ }