Back to Blog
NotebookLM
Antigravity
MCP
Model Context Protocol
Google NotebookLM
AI Tools
MCP Server
Automation
Knowledge Management
AI Integration

How to Connect NotebookLM to Antigravity (MCP)

TechNext Team
June 9, 2026
0 views

Key Takeaways

Learn how to connect Google NotebookLM to Antigravity using the NotebookLM MCP Server, enabling direct access to your notebooks and sources from within Antigravity.

How to Connect NotebookLM to Antigravity (MCP)

This guide walks you through connecting your Google NotebookLM account to Antigravity using the NotebookLM MCP Server, allowing Antigravity to query your notes and sources directly. Whether you are a researcher, a project manager, or a developer building the next generation of AI-powered workflows, integrating NotebookLM with Antigravity unlocks a powerful synergy: your personal knowledge base becomes instantly accessible to your agentic assistant.

In an era where AI-powered automation is revolutionizing how we interact with data, bridging the gap between proprietary note-taking and agentic workflows is a game-changer. NotebookLM, Google’s AI‑powered research assistant, stores notes, summaries, sources, and notebooks. By connecting it to Antigravity via the Model Context Protocol (MCP), you allow the Antigravity agent to search, retrieve, and synthesize that information—eliminating the need to manually copy and paste context between tools.

This integration is ideal for teams practicing agile custom software development, where quick access to meeting notes, technical specs, and research documents can dramatically speed up feedback loops. It also exemplifies how low-code platforms can be extended with custom connectors to unlock proprietary data silos.


1. Prerequisites

Before starting, ensure you have:

  • Google Account: A valid Google account with access to NotebookLM.

Tip: It is recommended to use a secondary or dedicated Google account for automation to avoid potential security flags on your main account. Google’s automated systems may occasionally challenge accounts that use automation tools, so having a dedicated account reduces friction.

  • Python or Node.js installed on your system.
    • Python: Version 3.10 or later. Check with python --version.
    • Node.js: Version 18 or later. Check with node --version.
  • uv (recommended for Python) or npm (Node.js).
    • uv is a fast Python package installer and resolver. Install it from astral.sh/uv.
    • npm typically comes bundled with Node.js.

Additional considerations:

  • Operating System: The instructions work on macOS, Linux, and Windows (see Windows‑specific notes in §6).
  • Network Access: The authentication step opens a local browser window; ensure that local port 9222 (used for Chrome debugging) is not blocked by a firewall.
  • Disk Space: The MCP server and its dependencies require about 50 MB of disk space.
  • Permissions: You must have read/write access to your home directory’s ~/.notebooklm-mcp folder where authentication cookies are stored.

2. Installing notebooklm-mcp-server

We recommend using uv for a clean, isolated installation. The server is a thin wrapper around NotebookLM’s internal API. It authenticates using session cookies and exposes MCP tools for listing notebooks, querying notes, and retrieving source content.

Option A: Using uv (Recommended)

# Install uv if you haven't already
curl -LsSf https://github.com/astral-sh/uv/install.sh | sh

# Install the server tool
uv tool install notebooklm-mcp-server

Why uv?
uv creates a virtual environment automatically and resolves dependencies in record time. It also supports tool isolation, meaning the MCP server and its dependencies won’t interfere with your global Python environment.

Option B: Using pipx

pipx install notebooklm-mcp-server

pipx is similar to uv tool but slightly slower and more mature. It installs the package in an isolated environment and adds the executable to your PATH.

Option C: Using npm

npm install -g @roomi-fields/notebooklm-mcp

The npm package is a Node.js port of the Python server. It offers identical functionality but may have slightly different command names (see §3 for authentication). If your team already uses Node.js, this option avoids adding a second runtime.

Pros and Cons of Each Installation Method

Method Pros Cons
uv (Python) Fastest installation, automatic isolation, excellent error messages Requires Python 3.10+; uv is newer and less widely adopted
pipx (Python) Mature, widely documented, robust dependency handling Slower than uv, requires pipx pre‑installation
npm (Node.js) No Python needed; same codebase used for both CLI and server Slightly larger footprint; npm global installs can conflict with project dependencies

Installation Verification
After installation, run:

notebooklm-mcp-server --help
# or for npm:
npx -y @roomi-fields/notebooklm-mcp --help

You should see a list of available commands and options.


3. Authenticating with NotebookLM

Authentication is handled by launching a browser to capture your session cookies. This is a secure, token‑based approach that does not require you to expose your Google password.

Run the authentication command

# If installed via uv/pipx:
notebooklm-mcp-auth

# If installed via npm:
npx -y @roomi-fields/notebooklm-mcp auth

Log In

A Chrome window will open. Log in to your Google Account. Do not use an incognito window – the server needs to read the browser’s cookie store.

Complete Authentication

Once the terminal displays a success message, you can close the browser window. The server will save the cookies to a local file.

Note: Cookies are typically saved to ~/.notebooklm-mcp/auth.json. Keep this file secure. It contains a valid session token that can access your NotebookLM data. Treat it like a password.

How Cookie‑Based Auth Works (Architectural Insight)
NotebookLM does not offer a public OAuth API. The MCP server bypasses this limitation by using browser cookies that are valid for a certain period (usually several hours to a few days, depending on Google’s session lifetime). When the cookies expire, you must re‑authenticate. Some community forks of the server support token refresh using Google’s internal refresh tokens, but this is experimental.

Security Best Practices

  • Never commit auth.json to version control. Add it to your .gitignore or equivalent.
  • Rotate your Google account password periodically to invalidate old cookies.
  • Consider using a dedicated Google account (as mentioned in §1) to limit the blast radius if the cookie file is compromised.
  • For enterprise deployments, explore using a headless Chrome with a separate browser profile to automate cookie renewal.

4. Configuring MCP in Antigravity

  1. Open Antigravity.
  2. Navigate to Agent Side Panel → MCP Servers.
  3. Click Configure or View Raw Config to open mcp_config.json.
  4. Add the notebooklm entry to the mcpServers object.

For uv/pipx installations

{
  "mcpServers": {
    "notebooklm": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "notebooklm-mcp-server"
      ],
      "env": {}
    }
  }
}

For npm installations

{
  "mcpServers": {
    "notebooklm": {
      "command": "npx",
      "args": [
        "-y",
        "@roomi-fields/notebooklm-mcp"
      ]
    }
  }
}
  1. Save the file. Antigravity should automatically attempt to connect.

Look for a green status indicator next to notebooklm in the MCP server list.

Understanding the Configuration Fields

  • command: The executable to run. Use the full path if uv or npx is not in the PATH of the Antigravity process (common in Docker or service deployments).
    Example (Linux): "command": "/home/user/.local/bin/uv"
    Example (Windows): "command": "C:\\Users\\YourName\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\uv.exe"

  • args: Arguments passed to the command. For uv tool run, the tool name must be the exact package name (notebooklm-mcp-server). For npx, the package name is @roomi-fields/notebooklm-mcp.

  • env: Optional environment variables. You can override the path to the auth file via NOTEBOOKLM_MCP_AUTH_FILE. This is useful when running multiple instances or in CI/CD environments.

Profile Selection (Advanced)
Some versions of the MCP server support a --profile flag to control the extent of data exposed:

{
  "mcpServers": {
    "notebooklm": {
      "command": "uv",
      "args": ["tool", "run", "notebooklm-mcp-server", "--profile", "full"],
      "env": {}
    }
  }
}

Profile options:

  • minimal – Only expose the list_notebooks tool.
  • standard – Expose list_notebooks, query, and get_source.
  • full – Expose all tools, including list_sources and list_notes.

Choose the profile that matches your context window requirements and the level of access you need.

Configuration Troubleshooting

  • If Antigravity shows a red status, check the server logs (accessible from the MCP server UI). Common errors include:
    • ModuleNotFoundError – Python dependency missing. Reinstall the tool.
    • Command not found – Use the full executable path.
    • Connection refused – Antigravity cannot spawn the subprocess; check file permissions.

5. Verifying the Connection

  1. In the Antigravity chat interface, type / to view available tools.
  2. Confirm tools such as notebooklm_list_notebooks or notebooklm_query appear.
  3. Ask:
List my notebooks in NotebookLM.

If the connection is successful, Antigravity will return your available notebooks.

Testing More Advanced Queries

Query my NotebookLM for notes about "project roadmap" and summarize the key milestones.

The agent will call notebooklm_query with appropriate parameters, retrieve matching content, and present a summary.

Expected Output Formats

  • list_notebooks returns a JSON array of notebook objects (id, title, creation date).
  • query returns text snippets from relevant notes, along with source references.
  • get_source returns the full text of a source document (e.g., PDF, web page) that has been saved to a notebook.

Performance Considerations

  • Queries that scan many notebooks may take several seconds. The MCP server is currently synchronous; future versions may support streaming.
  • Large source documents (e.g., 100-page PDFs) can consume significant context window. Use the minimal profile or filter sources explicitly.

6. Common Issues & Fixes

Authentication Failures (401/403)

Symptoms:

  • "Unauthenticated" errors
  • Immediate query failures

Fixes:

  • Re-run notebooklm-mcp-auth to refresh expired cookies.
  • Ensure authentication completed successfully before closing the browser. Sometimes the browser window closes before the cookies are fully written; wait for the terminal to display “Authentication saved” before closing.
  • Check the auth.json file size: a valid file is typically 1–2 KB. If it is empty or contains only {}, re-authenticate.

Root Cause: Google session cookies have a limited lifetime (usually 24 hours). The MCP server does not automatically refresh them – you must re-authenticate periodically. In a production setting, automate the auth process via a cron job or scheduled task.

MCP Configuration Errors (Red Status)

Symptoms:

  • Antigravity displays a disconnected or red status icon.

Fixes:

  • Verify the command path.
  • Run:
which uv

and use the full executable path in your configuration.

  • Check configuration and log files for permission-related errors. Antigravity may run as a different user (e.g., _antigravity) that does not have access to your home directory’s auth file. Change the env field to point to a globally readable location:
"env": { "NOTEBOOKLM_MCP_AUTH_FILE": "/var/lib/antigravity/notebooklm_auth.json" }

Diagnostic Steps

  1. Open Antigravity’s built-in MCP server log viewer.
  2. Look for lines containing Error, Traceback, or stderr.
  3. Common messages:
    • Error: Cannot find module '@roomi-fields/notebooklm-mcp' – NPM package not installed globally.
    • Error: [Errno 13] Permission denied – The user running Antigravity cannot execute the command or read the auth file.

Connection Closed (-32000)

Symptoms:

  • "Connection closed unexpectedly" error.

Fix:
Run the server manually:

uv tool run notebooklm-mcp-server

Review the terminal output for missing dependencies, authentication issues, or startup failures. Common causes:

  • The server fails to start because a required Python package (e.g., requests, selenium) is missing. Reinstall with uv tool install --reinstall notebooklm-mcp-server.
  • Google’s API rate‑limits the server after too many rapid queries. Wait a few minutes and retry.

Advanced Debugging
To run the server with full verbose logging:

uv tool run notebooklm-mcp-server --log-level DEBUG

This will print every MCP request and response to the console.

Windows-Specific Issues

  • Use full executable paths such as:
C:\\Users\\YourName\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\uv.exe
  • Escape backslashes properly when editing JSON files: use \\ instead of \.
  • Chrome automation on Windows may require the ChromeDriver to be in PATH. The MCP server uses Selenium; install the ChromeDriver version that matches your Chrome version.

7. Best Practices

Use a Dedicated Account

A separate Google account reduces the likelihood of security challenges and cookie expiration issues. It also simplifies cookie management: you can clear cookies frequently without affecting your primary account.

Disable When Not in Use

Remove the MCP configuration when idle to conserve resources and avoid unnecessary authentication refreshes. MCP servers consume a small amount of system memory and keep a background process running. If you only need NotebookLM access during specific research sessions, toggle the server on and off via Antigravity’s MCP configuration.

Profile Selection

Some versions support profiles such as:

  • minimal
  • standard
  • full

Choose the profile that best matches your needs and context window requirements. For example, if you only need to list notebooks (e.g., to confirm the connection), minimal is sufficient. For full research queries, use full.

Version Pinning

To avoid unexpected breaking changes, pin the version of notebooklm-mcp-server:

uv tool install notebooklm-mcp-server==0.2.3

Similarly, for npm:

npm install -g @roomi-fields/notebooklm-mcp@0.2.3

Automate Cookie Renewal

Write a small cron job that runs notebooklm-mcp-auth every 12 hours and notifies you if it fails. For headless environments, consider using the --headless flag (if supported by the server) to run Chrome without a display.

Logging and Monitoring

Enable MCP server logging and forward logs to your observability stack. In Antigravity, you can set environment variables like NOTEBOOKLM_MCP_LOG_FILE to capture logs to a file:

"env": {
  "NOTEBOOKLM_MCP_LOG_FILE": "/var/log/antigravity/notebooklm-mcp.log"
}

Then monitor that file for ERROR lines.

Ethical and Privacy Considerations

When connecting NotebookLM to an agentic system, be mindful of the data flowing through it. NotebookLM may contain personal notes, proprietary research, or confidential client information. Ensure that:

  • Your Antigravity instance is behind a secure network.
  • The MCP server is not exposed to the public internet.
  • You comply with your organization’s data governance policies.
  • If you are handling sensitive healthcare or financial data, consult a specialist in AI ethics to ensure your implementation respects privacy and transparency standards.

Conclusion

Connecting NotebookLM to Antigravity through the NotebookLM MCP Server enables seamless access to your notebooks, notes, and sources directly from your AI workflows. With proper authentication and configuration, you can query NotebookLM content without leaving Antigravity, making research and knowledge management significantly more efficient.

This integration is a prime example of how AI-powered automation can be layered onto existing tools to create custom software solutions that adapt to your workflow. Whether you are building the next super app for urban mobility or analyzing patient outcomes in healthcare, the ability to query your personal knowledge base through an agentic assistant reduces friction and accelerates decision‑making.

By following the detailed steps, troubleshooting advice, and best practices outlined here, you can deploy a reliable, secure connection between NotebookLM and Antigravity – and unlock the full potential of your research notes.

For teams looking to extend this pattern further, consider combining MCP servers for multiple data sources (databases, wikis, CRMs) to build a unified knowledge graph. And as always, stay up to date with the latest MCP standards – they are evolving rapidly, and the ecosystem is growing with new servers for everything from blockchain identity to IoT device queries.

Happy building!

T
Written By

TechNext Team

Software Engineering Team