NotebookLMPyPIMCPPythonOpen SourceIndie Dev

From zero to PyPI: making NotebookLM programmable

··2 min read

What problem was I trying to solve?

The goal was straightforward. I wanted to create a NotebookLM notebook from a development environment such as Cursor, import technical documents or meeting notes, ask questions, and receive answers with source citations.

If those actions could be triggered by code, NotebookLM could become a knowledge-service node inside a larger workflow instead of remaining a standalone product.

Where did the tool come from?

This project did not begin as an independent package. kof-notebooklm-mcp was originally an internal tool inside keeponfirst-local-brain. The central idea was simple: use a local Git repository as the single source of truth, let documents and development notes evolve with the codebase, and let AI tools keep reading, analyzing, and responding to that material.

In that architecture, the Git repository is the formal source and documentation changes with the project. NotebookLM is a research and analysis node, not a separate app.

The main implementation problems

The first problem was authentication. Google sign-in includes multi-factor authentication and risk detection, so fully automating it is not practical. The current approach asks the user to sign in manually on the first run, saves the browser session, and reuses it later.

The second problem was a highly dynamic interface. NotebookLM changes frequently, so browser automation can break easily. To improve stability, the implementation prioritizes accessibility attributes and visible text instead of binding itself to the DOM structure, and it checks state before important actions.

Why split it into a standalone package?

Keeping the tool in a monorepo was convenient for development but awkward for users to install. The tradeoff was clear: the monorepo preserved development convenience, while a standalone package required cleanup but lowered the barrier to trying the tool.

I eventually extracted kof-notebooklm-mcp so a user could begin with one command: pip install kof-notebooklm-mcp.

Publishing to PyPI with Trusted Publisher

The release process uses PyPI Trusted Publisher. It avoids a long-lived API token by binding publishing permission to the GitHub repository, and GitHub Actions authenticates through OIDC. The setup is small and better suited to long-term maintenance.

The point of the project

The point was to make a useful tool participate in a real workflow. When software cannot be controlled programmatically, the limitation affects more than efficiency; it also narrows what the surrounding system can do.

GitHub: https://github.com/keeponfirst/kof-notebooklm-mcp | PyPI: pip install kof-notebooklm-mcp