Meta Description: Want to chat with your research notes directly inside your code editor? Learn how to connect Google NotebookLM to Antigravity, Cursor, or Claude Desktop using MCP. A step-by-step guide for non-coders.
Why Connect NotebookLM?
Imagine you are writing code or a blog post, and you need to reference a PDF or a research paper you saved weeks ago. Instead of switching tabs, what if you could just ask your AI editor: “Check my NotebookLM for the Q3 financial report and summarize the key metrics”?
That is the power of the Model Context Protocol (MCP). It bridges your AI editor (like Antigravity or Cursor) with your external data.
Today, I’m going to walk you through exactly how to set this up. I struggled with errors for hours so you don’t have to. Follow these steps, and it will work—guaranteed.
Prerequisites
Before we start, make sure you have Git Bash installed on your Windows computer. We will use it to run the commands.
Step 1: Create a Dedicated Folder
To avoid errors later, we need a clean workspace. Do not hide this deep inside nested folders.
- Open your File Explorer.
- Go to your
D:drive (orC:drive). - Create a new folder named
mcp-servers.- Path:
D:\mcp-servers
- Path:
Step 2: Download the NotebookLM Source Code
We need the actual program that talks to Google.
- Right-click inside your new
mcp-serversfolder. - Select Open Git Bash Here.
- Copy and paste the following commands one by one (press Enter after each):
# 1. Clone the repository (download the code)
git clone https://github.com/sballesteros/notebooklm-mcp.git
# 2. Enter the folder
cd notebooklm-mcpStep 3: Set Up the Python Environment (Crucial!)
This is where most beginners fail. Python needs a “Virtual Environment” (venv) to run correctly without conflicts.
Run these commands inside your Git Bash window:
# 1. Create a virtual environment named 'venv'
python -m venv venv
# 2. Activate the environment (You will see '(venv)' appear on the left)
source venv/Scripts/activate
# 3. Install the required tools
pip install -r requirements.txtNote: If the last command finishes without red error text, you are ready for the next step!
Step 4: Get Your Google “Keys” (Cookies)
NotebookLM doesn’t have an official API key yet. We need to use your browser’s “Cookie” to prove to Google that it’s really you.
- Open Chrome and log in to Google NotebookLM.
- Press
F12on your keyboard to open Developer Tools. - Click the Application tab at the top (if you don’t see it, click the
>>arrows). - On the left sidebar, expand Cookies and click on
https://notebooklm.google.com. - In the list, find the Name
__Secure-1PSID. - Double-click the Value next to it, copy it (Ctrl+C), and paste it into a Notepad for now. It will be a very long string of random characters.
Step 5: Configure Your Editor (Antigravity/Cursor)
Now we tell your AI editor where the Python program is and give it the key.
- Open your editor (Antigravity, Cursor, or Claude Desktop).
- Go to Settings > MCP Servers > Edit Configuration (JSON).
- Add the following code inside the
"mcpServers": { ... }block.
⚠️ Important: Make sure to replace the path and the cookie value with your own.
"notebooklm": {
"command": "d:\\mcp-servers\\notebooklm-mcp\\venv\\Scripts\\python.exe",
"args": [
"d:\\mcp-servers\\notebooklm-mcp\\server.py"
],
"env": {
"GOOGLE_SECURE_1PSID": "PASTE_YOUR_LONG_COOKIE_VALUE_HERE"
}
}Why use this specific path?
Notice that under "command", I pointed directly to venv\\Scripts\\python.exe. This forces the editor to use the specific environment we created in Step 3, preventing 99% of “Module Not Found” errors.
Step 6: Test It Out!
- Save the JSON file (
Ctrl+S). - Click Retry or Refresh in your MCP settings.
- You should see a Green Light (Connected).
Now, go to your chat window and ask:
“Read my NotebookLM notes about [Topic] and write a summary.”
Troubleshooting Tips
- It worked, but stopped working the next day? Your Google Cookie might have expired. Repeat Step 4 to get a fresh
__Secure-1PSIDvalue and update your config file. - “Executable not found” error? Check if you installed Python on your computer. Also, double-check that the path in your JSON config uses double backslashes (
\\) for Windows.
Did this guide help you? Let me know in the comments if you successfully connected your NotebookLM!