adlibrary.com Logoadlibrary.com
Share
How-To

How to Integrate NotebookLM with Anti-gravity for Advanced Automation

The notebooklm anti-gravity integration connects Google's knowledge-base tool with Google's agentic browser environment via Model Context Protocol — letting Anti-gravity create notebooks, add sources, and query research programmatically. This guide covers setup, prerequisites, a five-step connection walkthrough, a worked example for paid-media practitioners, and the failure modes worth knowing before you build.

Auto-extracted hero image

What NotebookLM and Anti-gravity each solve

TL;DR: NotebookLM is Google's AI-powered knowledge base that ingests documents, PDFs, and web sources into a queryable corpus. Anti-gravity is Google's browser-based AI agent environment that builds software, connects systems, and executes multi-step tasks. Connect the two via MCP, and you get a research-plus-execution stack — the notebook holds the knowledge, the agent acts on it. For ad researchers, this means querying thousands of in-market ads stored in a notebook and piping the output directly into a production workflow.

Most practitioners hit the same wall: they build a knowledge base — in NotebookLM, in Notion, in a shared drive — and then manually re-enter its contents into every downstream tool. That gap is where most research value leaks out. When an ad researcher wants to build a brief from competitor data, they open one tab for the research, another for writing, a third for the spreadsheet. Each handoff bleeds context.

NotebookLM solves one half of the problem. It gives you a grounded AI agent that only draws from sources you've approved — no hallucinated citations, no out-of-date training data. You ask a question; it answers from your corpus, with source attribution down to the paragraph.

Anti-gravity solves the other half. It's Google's agentic browser environment where you describe a task and the agent executes it — writing code, opening browser tabs, querying APIs, building dashboards. It has an Agent Manager for parallel workloads and a native MCP server system for connecting external tools.

The notebooklm anti-gravity integration covered here is the protocol bridge between those two halves: Model Context Protocol (MCP) lets Anti-gravity send instructions to NotebookLM and receive structured answers back, programmatically, without copy-paste.

Before any of that, though, there is a Step 0 that most tutorials skip entirely. The how to use Claude for marketing guide covers the mental model for orchestrating these types of multi-tool AI pipelines, if you want the broader context before going hands-on.

Step 0: define the angle before you build the notebook

Step 0 is not technical. It's editorial. Before you build a notebook or wire up any MCP connection, you need to know what question you are actually trying to answer at scale.

The workflow anti-pattern is: "I'll collect everything, then figure out what to ask." NotebookLM can hold 50 sources. Anti-gravity can query them in loops. Without a sharp question, you'll generate volume and call it research.

For paid-media practitioners, the angle almost always comes from the competitive layer. What are the signals in your category's active ad creative that you haven't tested yet? Which brands are spending consistently on a particular hook format that your account has ignored?

AdLibrary is the data layer where you define that angle first. Search for your category (DTC supplements, SaaS B2B, ecommerce fashion), filter by run duration to find ads that have survived budget cuts, and pull the copy patterns, visual signals, and offer structures. That's your source material. Export or save those ads, then load them into NotebookLM as structured inputs. Your notebook then becomes a curated corpus built around a specific hypothesis rather than a random pile of research.

The ad data for AI agents use case formalizes this: adlibrary's API surfaces structured ad data (copy, creative metadata, run dates, platform) that agents can ingest directly. Connect that to an API Access flow, and your NotebookLM sources get populated programmatically rather than manually.

That's the full Step 0: decide the question, pull the competitive signals from adlibrary, load them into NotebookLM, then wire up Anti-gravity. Everything downstream from that setup is execution.

Practitioners who want to understand how how marketers use Claude daily in comparable research-plus-execution stacks will find the parallel instructive: the pattern of "define the question before touching the tool" applies across all agentic AI workflows, not just this one.

Setup prerequisites for the notebooklm anti-gravity integration

Before the MCP connection, you need three things confirmed. Skip any of them and the setup will fail mid-workflow.

Google account with NotebookLM access. NotebookLM is available at notebooklm.google.com with a standard Google account. As of 2026, the product includes NotebookLM Plus (part of Google One AI Premium) which raises the source limit per notebook from 50 to 300 and unlocks longer audio overviews. The MCP server for NotebookLM is a separate installation — it is not bundled with the consumer product.

Anti-gravity with MCP support enabled. Anti-gravity is Google's browser-native AI agent environment, accessible at antigravity.google. The product shipped MCP support to allow the internal agent to connect to external tool servers. You'll need a version of Anti-gravity that shows "MCP Servers" in the left sidebar — this is the managed server panel where external connections appear after installation. If you don't see it, your workspace may be on an older version; the feature rolled out progressively during late 2025.

Node.js 18+ on the local machine. The NotebookLM MCP server runs as a local Node process. Anti-gravity's agent detects it, installs the package via npm, and registers the server automatically — but Node must be present. Run node --version in a terminal before starting. If Node is absent, install it from nodejs.org before proceeding.

No API keys are required at this stage. The NotebookLM MCP server authenticates through your browser session, not a separate credential. When the connection is established, Anti-gravity opens a browser window for Google OAuth — your existing Google login authorizes the MCP handshake. That session token persists across Anti-gravity restarts, so you authenticate once per device.

One detail worth knowing: the Model Context Protocol was originally developed by Anthropic and has since been adopted broadly. It defines a standard interface for AI agents to call tools — analogous to how a REST API defines how two web services communicate. The NotebookLM MCP server exposes notebook operations (create, query, add sources, export) as callable tools. Anti-gravity's agent uses those tool definitions to decide when to invoke them during a task.

The broader LLM landscape for marketing teams matters here: NotebookLM runs on Gemini, Anti-gravity runs on Gemini, and MCP support means you can extend Anti-gravity with Claude Code for marketing ops workflows if you want to bring in Anthropic's models at specific steps of the pipeline. These environments are not mutually exclusive.

Step-by-step: connecting NotebookLM to Anti-gravity via MCP

The connection itself takes about four minutes once prerequisites are confirmed.

Step 1: Open a workspace in Anti-gravity

Create a new project in Anti-gravity. Give it a descriptive name — "NotebookLM Research Stack" or similar. This project context persists between sessions and is where the MCP server will be registered.

Step 2: Run the installation prompt

In the Anti-gravity chat, paste the following installation instruction (exact phrasing matters — Anti-gravity parses it as an agent task):

Install the NotebookLM MCP server so I can create notebooks, add sources, and query them from this workspace. Check for Node.js and install dependencies if needed.

The agent will check your system, install the @google/notebooklm-mcp package via npm, and begin configuring the server. You'll see tool call traces in the workspace sidebar. If Node.js is missing, the agent will prompt you to install it manually — this is the only step that requires human intervention on a clean machine.

Step 3: Authorize via Google OAuth

Anti-gravity will open a browser window pointing at accounts.google.com. Sign in with the Google account that has NotebookLM access. The OAuth scope grants the MCP server read/write access to your notebooks. After authorization, the browser window closes automatically and the workspace returns a confirmation message.

Step 4: Verify the connection

In the Anti-gravity MCP Servers panel (left sidebar), "NotebookLM" should now appear with a green status indicator. Test with a simple query:

List my existing notebooks.

If the agent returns a list of your notebooks with their IDs, the connection is active. If it returns an error, the most common cause is an OAuth scope mismatch — re-run the authorization step and confirm you're signing in with the correct account.

Step 5: Create a context file

Before running any research tasks, create a context.md file in your Anti-gravity project. This file tells the agent who you are and what you're working on:

markdown
# Context
Role: Paid media buyer, DTC category, Meta + TikTok primary
Current focus: Creative strategy for [your category]
NotebookLM research goal: [your specific question]
Output format: Structured bullet points, source-attributed

Every subsequent query to NotebookLM will be filtered through this context, producing responses calibrated to your specific setup rather than generic answers. This is the single most impactful quality lever in the whole stack.

For teams doing competitor ad monitoring automation, this context file can be extended with brand-specific parameters — competitor names, platforms to prioritize, metrics that matter. The competitor research tools compared post covers how this pattern fits alongside SEO and market signal tools for practitioners running multi-channel intelligence workflows.

Worked example: competitor hook research end to end

Here is a concrete workflow to ground the setup in practice. The goal: research a competitor brand's ad creative patterns, build a queryable knowledge base from the data, extract strategic insights, and push them into a brief document — without manual copy-paste at any step.

The scenario: A media buyer running Meta ads for a DTC supplement brand wants to understand how the top three competitors are framing their hook structures. They have 30 minutes.

Step 1: Pull competitor ad data from adlibrary.

Using AdLibrary's unified search, filter by category (supplements), run duration (60+ days, indicating budget survival), and platform (Meta). Export or save the top 20 ads from each of the three target brands. Each saved ad includes copy, creative format, and run metadata. This is the raw corpus.

Step 2: Load into NotebookLM via Anti-gravity.

With the MCP connection active, instruct Anti-gravity:

Create a new NotebookLM notebook called "Competitor Hook Analysis Q2 2026".
Upload the following ad copy texts as sources. [paste ad copy blocks]

Anti-gravity calls the createNotebook and addSource MCP tools in sequence. The notebook is created and populated in under 60 seconds, with each ad as a separately attributed source.

Step 3: Query the knowledge base.

Query my "Competitor Hook Analysis Q2 2026" notebook:
What are the three most common hook structures across the uploaded ads?
Which hook type appears in ads that ran the longest?
Return source attribution for each pattern.

NotebookLM returns structured analysis with citations pointing back to specific ads. This is retrieval-augmented generation working correctly: answers grounded in your actual corpus, not in the model's training data. For context on how different LLM architectures approach this grounding problem, top LLMs for marketing teams covers the enterprise vs. solo matrix in depth.

Step 4: Build the brief document.

Using the hook patterns from my NotebookLM query,
build a creative brief template in this project.
Format: Hook type / Rationale / Example / Test hypothesis

Anti-gravity builds the brief as a markdown file in the project directory. The whole process from corpus building to brief output takes under 20 minutes. A creative brief that used to require three hours of manual research now has a repeatable, source-attributed process behind it.

This is the kind of workflow the ad data for AI agents use case is built for — structured data flowing into an AI layer, then into a production asset.

Limitations and when not to use this stack

Every tool has a failure mode. Knowing where this stack breaks down saves you from building on a foundation that won't hold.

Large file formats break the MCP upload path. NotebookLM supports plain text, Google Docs, PDFs, and web URLs as sources. If you try to upload a raw HTML export or a binary file format directly through the MCP server, the upload will fail silently or error. Anti-gravity can run a conversion script to transform unsupported formats to .txt before upload — but you need to know to ask for it. Always confirm source format before building a notebook.

MCP latency on large notebooks. Querying a notebook with 200+ sources takes longer than the console suggests. NotebookLM's response time for complex synthesis queries on large corpora can reach 30-45 seconds. If Anti-gravity's agent times out waiting for the MCP response, it may report a failure even though NotebookLM completed the query. Increase the agent's task timeout settings in Anti-gravity's configuration panel for large-corpus workflows.

Session token expiry. The OAuth session token for the MCP connection expires periodically. Anti-gravity will usually prompt re-authorization automatically, but if you see 401 Unauthorized in the MCP server logs, manually re-run the authorization step. This is not a bug — it's standard OAuth behavior.

When not to use this stack. Two cases where this setup is not the right choice:

First, real-time data requirements. NotebookLM is a static knowledge base — it knows what's in your sources at the time of ingestion, nothing more. If you need live ad performance data, AI ad enrichment paired with a live API feed is a better fit than a NotebookLM notebook.

Second, single-source queries. If you're working from one document or one data export, the overhead of creating a notebook and establishing an MCP connection isn't worth it. The stack earns its complexity when you have 10+ sources you need to synthesize and query repeatedly. For one-off tasks, query the LLM directly.

The workflow also requires stable internet for the MCP server connection — it's not an offline tool. Plan accordingly for low-connectivity environments.

For teams evaluating where this stack fits relative to other workflow options, marketing automation tools compared covers Zapier AI, Make, n8n, and the AI-native tier — including which categories overlap with what Anti-gravity handles natively and which are genuinely complementary.

Troubleshooting the notebooklm anti-gravity setup

The agent says NotebookLM is not installed after I completed the setup.

This usually means the Node process started but didn't register correctly in Anti-gravity's MCP server list. Re-run the installation prompt with this phrasing: Verify the NotebookLM MCP server is installed and show me the registered tools. The agent will check the server status and attempt re-registration if needed.

Queries return "notebook not found" errors.

Notebook IDs in the MCP connection are specific to your Google account. If you authorized with Account A but your notebooks live on Account B, the server returns empty results. Check which account authorized the MCP handshake by running: Which Google account is the NotebookLM MCP server authorized with? — the agent can retrieve this from the server configuration.

Anti-gravity builds the wrong output format.

The context file matters here. If your context file doesn't specify output format, Anti-gravity defaults to a format it infers from the task description, which is often more verbose than useful. Add explicit format instructions to your context.md: Output format: [your preferred format]. For creative strategy workflows, bullet points with source attribution outperform prose summaries for downstream use.

MCP connection drops mid-workflow.

Long-running Anti-gravity tasks can outlast the MCP server's keepalive window. If the connection drops partway through a multi-step task, add a checkpoint prompt: Before continuing, confirm the NotebookLM MCP connection is active. This forces the agent to verify the connection before executing the next MCP call rather than assuming it's still live.

NotebookLM responses are too generic.

This is almost always a corpus quality issue, not a query issue. A notebook built from broadly-written blog posts returns broadly-written answers. Load primary sources (ad copy verbatim, performance reports, specific research papers) and query quality improves immediately. The quality of your inputs directly determines the specificity of outputs. This is the same principle that applies when using adlibrary's AI ad enrichment to pre-process raw ad data before it enters a knowledge base: structured, enriched inputs produce structured, actionable outputs.

If you're building this stack for a team, agentic marketing workflows with Claude Code covers the broader pattern of persisting these workflows across sessions and scaling them across multiple accounts. The how to build an AI marketing assistant with Claude Code guide is the companion setup reference for the Claude Code side of these pipelines.

For practitioners using automation to compress ops overhead, understanding prompt engineering for your query layer is the highest-leverage skill in this stack. How you phrase a NotebookLM query determines the specificity of the output more than any other variable.

Frequently Asked Questions

What is the Model Context Protocol (MCP) and why does it matter for this integration?

MCP is an open protocol that lets AI agents call external tools through a standardized interface — similar to how REST APIs let web services talk to each other. Originally developed by Anthropic, it has been adopted broadly. For the NotebookLM Anti-gravity integration specifically, MCP is what allows Anti-gravity's agent to create notebooks, add sources, and run queries inside NotebookLM programmatically, without you manually switching between tabs.

Does NotebookLM Anti-gravity integration require an API key?

No API key is needed. The NotebookLM MCP server authenticates through Google OAuth — the same Google account that has NotebookLM access. When you run the installation prompt in Anti-gravity, it opens a browser window for authorization. That session token persists on your machine, so you authorize once per device. No separate developer credentials are required.

Can I use this integration to query NotebookLM notebooks I already have?

Yes. The MCP connection gives Anti-gravity access to all notebooks associated with your authorized Google account, including existing ones. You can instruct Anti-gravity to list your notebooks, then query a specific one by name or ID. Existing sources inside the notebook are fully queryable. The connection does not require notebooks to be created through Anti-gravity — it works with any notebook you've built manually in NotebookLM.

What source formats does NotebookLM accept when uploaded through Anti-gravity?

NotebookLM supports plain text files, PDFs, Google Docs, and web URLs as sources. Binary formats and raw HTML are not directly supported. If you're uploading files through Anti-gravity's MCP connection, have the agent convert unsupported formats to .txt before upload. Anti-gravity can run conversion scripts automatically if you include format handling in your task instruction.

How is this Anti-gravity NotebookLM workflow different from just asking Claude or ChatGPT with pasted text?

Three differences matter. First, NotebookLM only draws from sources you've approved — every answer is grounded and attributed to a specific source, not inferred from broad training data. Second, the corpus persists: your notebook holds 50-300 sources that remain queryable without re-pasting. Third, Anti-gravity can run multi-step workflows across the notebook — creating it, populating it, querying it, and building downstream assets — in a single automated task. Pasting text into an LLM chat is a one-shot operation; this stack is a repeatable process.

Does Anti-gravity work without the NotebookLM MCP server installed?

Yes — Anti-gravity functions as a standalone agentic environment for building applications, writing code, and running browser-based tasks. The NotebookLM MCP server is an add-on connection, not a dependency. You can use Anti-gravity for any task that doesn't require querying a knowledge base. The MCP server just extends Anti-gravity's capabilities to include NotebookLM as a connected tool.

Key Terms

NotebookLM
Google's AI-powered research assistant that ingests documents, PDFs, URLs, and other sources into a grounded knowledge base. It answers questions by drawing only from the sources you've added, providing attributed responses with citations. Available at notebooklm.google.com.
Anti-gravity
Google's browser-based AI agent environment for building applications, running multi-step tasks, and connecting external tools. It includes an Agent Manager for parallel workloads and native support for MCP server connections. Available at antigravity.google.
Model Context Protocol (MCP)
An open protocol developed by Anthropic that standardizes how AI agents communicate with external tools and data sources. Functions like a universal connector — an AI agent using MCP can call tool operations (create, read, query) on any service that exposes an MCP server, without custom integration code per tool.
MCP Server
A lightweight process that wraps an external service (like NotebookLM) and exposes its operations as callable tools via the Model Context Protocol. The NotebookLM MCP server, for example, exposes notebook creation, source upload, and query operations as tools that Anti-gravity's agent can invoke.
Retrieval-Augmented Generation (RAG)
An AI architecture where a language model's responses are grounded in a specific document corpus rather than relying solely on training data. NotebookLM is a RAG implementation: it retrieves relevant passages from your sources, then generates a response based on those passages. This produces attributed answers and reduces hallucination.
Agent Manager
A feature within Anti-gravity that allows multiple AI agents to run in parallel within the same project. For complex research workflows, you can spin up one agent to populate a NotebookLM notebook while another builds an output template — parallel execution without context switching.
Prompt Engineering
The practice of structuring instructions to an AI model to produce a specific, desired output. In the Anti-gravity NotebookLM integration, prompt engineering applies both to the task instructions you give Anti-gravity and to the queries you formulate for NotebookLM — precise phrasing produces attributed, structured outputs; vague phrasing produces generic ones.
Agentic AI
AI systems capable of taking multi-step actions autonomously to complete a goal, as opposed to single-turn responses. Anti-gravity is an agentic AI environment — given a goal, it plans and executes a sequence of tool calls, file operations, and browser actions without step-by-step human instruction.

Ready to get started?

Explore the AdLibrary API

Key Terms