notebooklm-mcp: Instructions file for Gemini CLI

GEMINI.md

notebooklm-mcp GEMINI.md is an instructions file for Gemini CLI from m4yk3ldev/notebooklm-mcp. It costs 2,188 tokens per session, scanned A, original, MIT.

Repository instructions for a NotebookLM MCP server, which lets AI models manage Google NotebookLM notebooks, add sources, ask questions, and generate studio content.

In plain words
What is it for?
It helps coding agents build, test, authenticate, and run the NotebookLM integration.
Why use it?
It explains the project's TypeScript setup, internal Google API communication, commands, testing requirements, and code structure.

Instructions file for Gemini CLI

Written for Gemini CLI: the file is GEMINI.md.

This is m4yk3ldev/notebooklm-mcp's own configuration. It tells Gemini CLI how to work on notebooklm-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything notebooklm-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to m4yk3ldev/notebooklm-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/m4yk3ldev/notebooklm-mcp/main/GEMINI.md
Clone the repo
git clone --depth 1 https://github.com/m4yk3ldev/notebooklm-mcp

Made for: Gemini CLI.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for notebooklm-mcp GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/m4yk3ldev/notebooklm-mcp/gemini-md/github.svg)](https://agentmods.dev/instructions/m4yk3ldev/notebooklm-mcp/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/m4yk3ldev/notebooklm-mcp/gemini-md"><img src="https://agentmods.dev/badge/instructions/m4yk3ldev/notebooklm-mcp/gemini-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for notebooklm-mcp GEMINI.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/m4yk3ldev/notebooklm-mcp/gemini-md"><img src="https://agentmods.dev/badge/instructions/m4yk3ldev/notebooklm-mcp/gemini-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,188 This file is loaded in full into every session.
When invoked 2,188 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02188 $0.02188
Opus 5.5 $0.00875 $0.00875
Sonnet 5.5 $0.00438 $0.00438
Haiku 4.5 $0.00219 $0.00219

Measured 16d ago against content hash b49906e605d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

notebooklm-mcp GEMINI.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

GEMINI.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NotebookLM MCP Server - Project Context

This file provides the foundational context, architecture, and engineering standards for the NotebookLM MCP Server project.

Project Overview

The NotebookLM MCP Server is a Model Context Protocol (MCP) implementation that exposes the capabilities of Google NotebookLM to AI models. It facilitates deep integration of NotebookLM's notebook management, source ingestion, RAG-based querying, and studio content generation into AI-assisted workflows.

Key Technologies

  • Runtime: Node.js (>=20)
  • Language: TypeScript (strict)
  • Package manager: pnpm (pinned via packageManager: "[email protected]"; use corepack enable && pnpm install)
  • Framework: @modelcontextprotocol/sdk
  • Bundler: tsup
  • CLI: commander
  • Validation: zod
  • Testing: vitest + msw (100% statements/branches/functions/lines, enforced by CI)
  • API Communication: Direct interaction with Google's internal batchexecute RPC endpoint via fetch.

Architecture

The project follows a modular SRP-respecting architecture centered around the MCP specification:

  • Entry Points:
    • src/cli.ts: Handles CLI commands (serve, auth). Version read from package.json at runtime.
    • src/server.ts: Initializes the McpServer and orchestrates tool registration.
  • Core Client (domain facade):
    • src/client.ts: NotebookLMClient — public surface for tools. Domain methods (listNotebooks, query, createAudioOverview, etc.) delegate infrastructure to the rpc/* collaborators.
  • RPC layer (extracted 2026-05-17):
    • src/rpc/transport.ts: RpcTransport — HTTP POST/GET to batchexecute and query endpoints. Enforces response.ok, merges Set-Cookie via AuthState, wraps response.text() in a race-with-abort so slow bodies actually honor the timeout.
    • src/rpc/auth-state.ts: AuthState — owns tokens / csrfToken / sessionId / cookies. Provides a single-flight refreshOnce() mutex (concurrent callers share one refresh), reloadIfNewer() disk pickup, and persisted recordSessionId / recordCsrfToken / recordSetCookies writes.
    • src/rpc/wire.ts: Pure parsers — parseResponse (batchexecute envelope), extractTextFromBlocks (source content incl. tables), sourceTypeCode, and the studio parsers studioArtifactId / studioTypeName / studioDownloadUrl.
  • Tools:
    • src/tools/: Directory containing modular tool definitions (e.g., notebook.ts, source.ts, query.ts, studio.ts).
    • src/tools/index.ts: Central registration point; also exports resolveSourceIds() (used by 9 studio tools) and clientResetSignal() (typed replacement for the legacy _client_action: "reset" string).
  • Authentication:
    • src/auth.ts: Logic for token loading, saving (mode 0600), validation, and the manual auth flow. ~/.notebooklm-mcp/ is created with mode 0700.
    • src/browser-auth.ts: Launches Chrome with --remote-debugging-port=0 --remote-debugging-address=127.0.0.1 and discovers the OS-assigned port by parsing the DevTools listening on ws://127.0.0.1:NNNN/ stderr line. Drives it directly via the Chrome DevTools Protocol (CDP) over a raw ws WebSocket — no Puppeteer/Playwright dependency.

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 16d ago Changed · +124 tokens per session b49906e605d8
  2. 18d ago Changed · +2 lines · +210 tokens per session 9f3d97149d5b
  3. 2mo ago First seen · 95 lines · 1,854 tokens per session scan A c25829b818bd

Subscribe to this mod's changes

notebooklm-mcp GEMINI.md is an instructions file published in the GitHub repository m4yk3ldev/notebooklm-mcp (22 stars, last pushed 17d ago), licensed MIT. It adds 2,188 tokens to every session, about $0.0088 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

notebooklm-mcp GEMINI.md compared with instructions from other repositories

notebooklm-mcp GEMINI.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
notebooklm-mcp GEMINI.mdm4yk3ldev/notebooklm-mcpInstructions file2217d agoMITA2,188Gemini CLI
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode