nblm-mcp
A multi-account MCP server for NotebookLM that maintains sticky account and notebook per session. It uses the internal RPC to avoid logout issues and adds tools for account switching, notebook selection, and health checks.
README
nblm-mcp
Servidor MCP de NotebookLM multicuenta, con cuenta y notebook pegajosos por sesión.
Está construido encima de notebooklm-py (MIT),
que habla la RPC interna de NotebookLM (batchexecute) en vez de automatizar el DOM con
un browser headless — por eso no se desloguea cada dos por tres. Este paquete no forkea esa
base: la usa como dependencia y le pone encima sólo lo que le falta.
Por qué esto y no otro MCP de NotebookLM
| MCPs basados en Playwright/DOM | notebooklm-py a secas |
nblm-mcp | |
|---|---|---|---|
| Transporte | Scraping del DOM | RPC interna | RPC interna |
| Se desloguea | Constantemente | No (master-token) | No (master-token) |
| Varias cuentas Google | No | Una por proceso (--profile) |
En caliente, account_use |
Repetir notebook en cada llamada |
Sí | Sí | No, se inyecta solo |
| Tools | Pocas | 33 | 38 |
Lo de multicuenta no es cosmético: una cuenta free de NotebookLM tiene ~50 consultas/día. Poder saltar de cuenta sin reiniciar el server es la diferencia entre seguir trabajando o parar.
Qué añade sobre las 33 tools de upstream
| Tool | Para qué |
|---|---|
account_list |
Ver las cuentas de Google configuradas (una por perfil, cada una con su cuota) |
account_use(profile) |
Elegir cuenta en caliente; upstream ata el perfil al proceso, aquí no |
notebook_use(ref) |
Fijar el notebook activo; luego se puede omitir notebook en las 33 tools |
session_status |
En qué cuenta y notebook estamos |
health |
Qué anda y qué no: auth, config, cuentas — con una lista fix de qué correr |
Cómo funciona por dentro: el cliente que ven las tools de upstream es un proxy
(SwitchingClient) que apunta al perfil activo, y un middleware (StickyContext) rellena el
notebook que falte. Cero cambios en las 33 tools originales, así que un uv sync -U trae
las mejoras de upstream gratis.
Con más de una cuenta configurada, el middleware exige account_use antes de tocar nada —
que es el flujo que se quiere: elegir cuenta → elegir/crear notebook → trabajar.
Dependencias
- Python ≥ 3.11
uvpara instalar y correr (instalación)notebooklm-py[mcp,browser,headless]==0.8.0rc1— única dependencia directa; traefastmcp, el cliente RPC, el CLInotebooklmy las 33 tools.uvla instala sola.- Un browser (Chromium/Chrome) sólo la primera vez, para el login inicial de cada cuenta.
- Una cuenta de Google con acceso a NotebookLM.
Instalación
git clone https://github.com/Solar2004/nblm-mcp.git
cd nblm-mcp
uv sync
Alta de cuentas (una vez por cuenta, la corre el humano)
uv run notebooklm login --master-token --account tu@gmail.com -p personal
uv run notebooklm login --master-token --account otra@gmail.com -p secundaria
--master-token = un sign-in en el browser y a partir de ahí re-mintea cookies solo, sin browser.
El
master_token.jsonque queda en~/.notebooklm/es una credencial durable de tu cuenta de Google: trátalo como un secreto, no lo subas a ningún repo.
Comprobar que quedó bien: uv run nblm-mcp y llamar a la tool health, o directamente
uv run notebooklm doctor.
Cablearlo a un cliente MCP
Claude Code (.mcp.json del proyecto, o claude mcp add), Claude Desktop
(claude_desktop_config.json) y cualquier otro cliente stdio:
{
"mcpServers": {
"notebooklm": {
"command": "uv",
"args": ["run", "--directory", "/ruta/absoluta/a/nblm-mcp", "nblm-mcp"]
}
}
}
También habla HTTP si hace falta:
uv run nblm-mcp --transport http --host 127.0.0.1 --port 9421
Uso
Flujo típico desde el agente:
account_list()→account_use("personal")notebook_list()→notebook_use("Mi investigación")(acepta título, prefijo único o id)source_add(...)para meter fuentes,chat_ask(...)para preguntarstudio_generate(...)para audio, video, slide-deck, infographic, mind-map, report o quizstudio_download(path=...)para bajar lo generado y leerlo del disco
Desde el paso 2 en adelante ya no hace falta pasar notebook en ninguna llamada.
Tests
uv run python test_server.py # sin red: gate de cuenta, cambio de cuenta, inyección de notebook
Límites (heredados de la base)
- Usa una API interna no documentada de Google: puede romperse sin aviso.
- ~50 consultas/día en cuentas free (de ahí lo de multicuenta).
research_importno es atómico.- Estado en memoria del proceso: con stdio hay un proceso por sesión de agente, que es justo el alcance que se busca.
Licencia
MIT. La base notebooklm-py también es MIT. Proyecto no afiliado a Google ni a NotebookLM.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.