npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mcpware/notebooklm-api

v0.1.1

Published

NotebookLM-quality document Q&A with per-passage citations via official Gemini File Search API. Upload docs, ask questions, get zero-hallucination answers with structured citations.

Downloads

219

Readme

@mcpware/notebooklm-api

NotebookLM-quality document Q&A — but through MCP, powered by the official Gemini File Search API.

You upload your documents. You ask a question. Every sentence in the answer cites the exact passage from your files. No hallucination, no guessing, no "I think the document says...". Just grounded answers with receipts.

The problem

Every existing NotebookLM MCP server reverse-engineers Google's internal web UI. They scrape the page with Playwright, steal cookies, and pray Google doesn't change a CSS selector. Spoiler: Google changes things. Your MCP breaks. Your Google account gets flagged.

This one uses the official Gemini File Search API. It doesn't scrape anything. It doesn't need your Google login. Just an API key from aistudio.google.com.

What you get

Upload PDFs, DOCX, TXT, HTML, or any of 80+ supported formats. Ask questions across one or multiple document stores. Get answers like this:

The maximum liability is limited to the total fees paid
in the preceding twelve months [1]. Clients must pay all
invoices within forty-five days of receipt [2].

---
Citations:
[1] Contract_A.pdf: "The maximum liability under this agreement
    shall not exceed the total fees paid in the preceding
    twelve (12) months." (confidence: 92%)
[2] Contract_A.pdf: "The Client shall pay all invoices within
    forty-five (45) days of receipt." (confidence: 88%)

Every [1], [2] maps to the exact passage from your document. Not a summary. The actual text.

Quick start

# Set your Gemini API key
export GEMINI_API_KEY=your-key-from-aistudio.google.com

# Add to Claude Code
claude mcp add notebooklm-api npx @mcpware/notebooklm-api

# Or add to Claude Desktop (~/.claude/mcp.json)
{
  "mcpServers": {
    "notebooklm-api": {
      "command": "npx",
      "args": ["@mcpware/notebooklm-api"],
      "env": { "GEMINI_API_KEY": "your-key" }
    }
  }
}

Then in Claude:

"Create a store called 'Legal Docs', upload all PDFs from ~/contracts/, then tell me what the liability clauses say across all contracts."

Claude will use create_store, upload_document, and ask tools automatically.

Tools

| Tool | What it does | |------|-------------| | create_store | Create a document store | | list_stores | List all stores | | upload_document | Upload a file (PDF, DOCX, TXT, etc.) to a store. Waits for indexing to finish. | | list_documents | List documents in a store | | ask | Ask a question. Returns answer with per-passage citations. | | delete_document | Remove a document | | delete_store | Remove a store |

How citations work

When you call ask, the Gemini File Search API does three things:

  1. Searches your uploaded documents for relevant passages (vector similarity, not keyword match)
  2. Generates an answer grounded in those passages
  3. Returns groundingSupports — a map from each sentence in the answer to the exact source passage

We parse that map into inline [1], [2] markers and a citation list. This is the part every competitor gets wrong — they dump the raw API response without parsing it. We give you something you can actually read and verify.

Why not just use NotebookLM?

You should, if the web UI works for you. This tool is for when you want:

  • Document Q&A inside your coding agent (Claude Code, Cursor, etc.)
  • Programmatic access — upload 100 documents, ask 50 questions, extract structured data
  • Stability — no browser automation, no cookies, no scraping
  • Your own API key — you control the cost and the data

Privacy

On the free tier, Google may use your data to improve products. On the paid tier (link a billing account), they don't. If your documents are sensitive, use the paid tier. Details.

Get an API key

  1. Go to aistudio.google.com
  2. Click "Get API key"
  3. Set it as GEMINI_API_KEY

The free tier gives you enough to try everything. Paid tier for production use.

License

MIT