{
  "markdown": "# NotebookLM SDK\n\nA Python client, Typer CLI, MCP Server, and Gemini Extension for interacting with the NotebookLM Enterprise API via Google Cloud Discovery Engine REST endpoints.\n\n## Gemini CLI Extension Installation\n\nThis SDK doubles as a native [Gemini CLI](https://github.com/GoogleCloudPlatform/gemini-cli) extension. The extension will automatically configure the required environment variables.\n\n1. **Install the Extension via Git:**\n   ```bash\n   gemini extension install https://github.com/dandye/notebooklm_sdk.git\n   ```\n\n2. **Configuration Prompts:**\n   During the installation, the Gemini CLI wizard will automatically prompt you to fill in the following configuration variables required by the extension:\n   - `NOTEBOOKLM_PROJECT_NUMBER`: Your Google Cloud Project Number where NotebookLM is hosted.\n   - `NOTEBOOKLM_LOCATION`: The target region (defaults to `global`).\n\nOnce installed, you can use commands natively via the CLI using slash shortcuts (e.g., `/notebooklm:create \"My Notebook\"`).\n\n---\n\n## Installation\n\nYou can install this SDK manually or via `pip`:\n\n```bash\npip install -e .\n```\n\n## Usage\n\nThis SDK relies on [Google Cloud Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials). Before running, ensure your credentials and projects are set up:\n\n```bash\ngcloud auth application-default login\ngcloud config set project [YOUR_PROJECT_ID]\n```\n\n### Python SDK Example\n\n```python\nfrom notebooklm_sdk import NotebookLMClient\n\nPROJECT_NUMBER = \"1234567890\"  # Replace with your GCP project number\nLOCATION = \"global\"\n\nclient = NotebookLMClient(project_number=PROJECT_NUMBER, location=LOCATION)\n\n# 1. Create a Notebook\nnotebook = client.create_notebook(title=\"My Research SDK Notebook\")\nnotebook_id = notebook.get(\"notebookId\")\nprint(f\"Created notebook with ID: {notebook_id}\")\n\n# 2. Upload a File\nsource = client.upload_document(\n    notebook_id=notebook_id,\n    file_path=\"research_paper.pdf\",\n    display_name=\"math_research_v1.pdf\"\n)\nsource_id = source[\"sourceId\"][\"id\"]\nprint(f\"Uploaded document with Source ID: {source_id}\")\n\n# 3. Check Status\nstatus = client.get_document_status(notebook_id=notebook_id, source_id=source_id)\nprint(f\"Document parsing status: {status['settings']['status']}\")\n```\n\n---\n\n## Typer CLI\n\nThere is also a standard Typer CLI command for human operation. To use it, simply run:\n\n```bash\nnotebooklm --help\n```\n\nYou can pass authentication details via a `.env` file containing:\n```\nNOTEBOOKLM_PROJECT_NUMBER=your_project_number\nNOTEBOOKLM_LOCATION=your_location\n```\n\n---\n\n## MCP Server\n\nThis SDK also includes an integrated [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server, which allows AI agents and clients (like Claude Desktop) to natively call NotebookLM methods as tools.\n\n### Running the MCP server\n\nOnce the package is installed, you can start the MCP server via `stdio`:\n\n```bash\nnotebooklm-mcp\n```\n\n### Configuring Claude Desktop\n\nAdd the following to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"notebooklm\": {\n      \"command\": \"notebooklm-mcp\",\n      \"env\": {\n        \"NOTEBOOKLM_PROJECT_NUMBER\": \"YOUR_PROJECT_NUMBER\",\n        \"NOTEBOOKLM_LOCATION\": \"global\"\n      }\n    }\n  }\n}\n```\nEnsure that the `notebooklm-mcp` executable is available in your PATH, or provide the absolute path to your virtual environment's binary (e.g., `/path/to/.venv/bin/notebooklm-mcp`). You will also need active application default credentials.\n",
  "bytes": 3490,
  "sha": "9211b67b0a1aba7a87f5b043df9cc447a804267cb8d9b28082d7adfec64ce99f",
  "repo_slug": "dandye/notebooklm_sdk",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_dandye_notebooklm_sdk_6d4ebac1/readme"
}