open-notebook/docs/5-CONFIGURATION/mcp-integration.md
Luis Novo 95f76e5a59
docs: complete env reference; troubleshooting keyed on real error messages (#1461)
* docs: complete env reference; troubleshooting keyed on real error messages

Configuration (docs/5-CONFIGURATION):
- environment-reference.md is now the single complete list, checked
  against the code and the content-core, esperanto, surreal-commands and
  langsmith libraries: adds the undocumented variables, a "Read by"
  column, correct defaults (SURREAL_COMMANDS_RETRY_ENABLED=false,
  WAIT_MAX=60, LANGCHAIN_PROJECT=default, SurrealDB defaults), which
  legacy provider vars Migrate to Database copies, and a table of
  variables nothing reads.
- security.md: PBKDF2 derivation, POST /api/credentials/migrate-encryption
  with the back-up-first / no-downgrade warning, password stored in
  localStorage, full list of unauthenticated paths, real upload endpoint.
- reverse-proxy.md: drop v1.0 legacy sections and the non-existent
  multi-container images; real /api/config output; how API_URL
  auto-detection works; the 100 MB Next.js proxy cap.
- ai-providers.md, ollama.md, openai-compatible.md: one shared setup
  procedure with current UI labels, provider/modality table from
  provider_registry.py, no stale model lists or prices; Ollama
  num_ctx and 180 s ESPERANTO_LLM_TIMEOUT; Azure form limits.
- local-tts.md is the shared Speaches page; local-stt.md keeps only
  STT specifics (Whisper models, CCORE_AUDIO_SEGMENT_MINUTES).
- advanced.md, index.md, database.md: link to the reference instead of
  re-listing variables; fix service names, port changes, backups.

Troubleshooting (docs/6-TROUBLESHOOTING):
- Entries start with the exact message from the code or the en-US
  locale. New processing-issues.md covers queued/failed sources (the
  content-core failure reasons), uploads, search, podcasts (profile
  errors and NOTE hints). ai-chat-issues.md covers timeouts, error
  classifier messages, empty responses, Ollama context, encryption
  key and decryption errors.
- Removed invented entries ("too many connections", "Model is not a
  LanguageModel: None", soft delete, retry vars as a connection fix).

SECURITY_REVIEW.md is marked as a historical January 2026 snapshot of
the credentials UI, with the SSRF and security-warning rows corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: address review on configuration and troubleshooting pages

- No predictable keys or passwords: placeholders plus the openssl /
  PowerShell generation commands used by the install docs.
- Every 0.0.0.0 bind and firewall rule (Ollama, OpenAI-compatible
  servers, Speaches, LAN access) restricted to the host and Docker
  networks or the LAN, with an explicit exposure warning.
- Diagnostic commands no longer print secrets.
- systemd drop-in includes [Service]; Traefik middleware attached to
  the router.
- Provider pages link to Connect a provider (#1459) instead of
  repeating steps; Vertex and keyless local providers called out;
  "Add Selected" (a select-all toggle) no longer described as the add
  button; "Manage -> Models" instead of "the Models page".
- Startup database failure described correctly (API down, not the
  Database Connection Failed overlay); worker crash causes, Test
  timeout/404 meanings, .env overrides when moving servers, frontend
  restart from source, privacy claims scoped to self-hosted servers.
- Drop claims about bugs fixed in #1457; restore the ollama.md
  GPU acceleration anchor used by quick-start-local.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: address second review round on configuration pages

- Anthropic Compatible always needs an API key and a Base URL
  (enforced in api/models.py), noted in the provider differences.
- Speaches firewall guidance covers a separate Open Notebook host.
- The password check mirrors get_secret_from_env: a readable,
  non-empty _FILE wins, otherwise the variable; never prints values.
- From source, frontend variables go in frontend/.env.local or the
  shell: `make frontend` runs `next dev` in frontend/, which doesn't
  read the root .env.
- The env listing prints every variable name, without values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: correct the default API path for the frontend; deduplicate

Without API_URL the browser calls <host>:5055 directly (the /config
route auto-detects it); INTERNAL_API_URL only serves requests that hit
the Next.js /api forwarding. Full explanation stays in the environment
reference; the configuration index links to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: upload limit depends on whether API calls go through the frontend proxy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:28:50 -03:00

5.3 KiB

Model Context Protocol (MCP) Integration

Open Notebook can be seamlessly integrated into your AI workflows using the Model Context Protocol (MCP), enabling direct access to your notebooks, sources, and chat functionality from AI assistants like Claude Desktop and VS Code extensions.

What is MCP?

The Model Context Protocol is an open standard that allows AI applications to securely connect to external data sources and tools. With the Open Notebook MCP server, you can:

  • 📚 Access your notebooks directly from Claude Desktop or VS Code
  • 🔍 Search your research content without leaving your AI assistant
  • 💬 Create and manage chat sessions with your research as context
  • 📝 Generate notes and insights on-the-fly
  • 🤖 Automate workflows using the full Open Notebook API

Quick Setup

For Claude Desktop

  1. Install the MCP server (automatically from PyPI):

    # No manual installation needed! Claude Desktop will use uvx to run it automatically
    
  2. Configure Claude Desktop:

    macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json

    {
      "mcpServers": {
        "open-notebook": {
          "command": "uvx",
          "args": ["open-notebook-mcp"],
          "env": {
            "OPEN_NOTEBOOK_URL": "http://localhost:5055",
            "OPEN_NOTEBOOK_PASSWORD": "your_password_here"
          }
        }
      }
    }
    

    Windows: Edit %APPDATA%\Claude\claude_desktop_config.json

    {
      "mcpServers": {
        "open-notebook": {
          "command": "uvx",
          "args": ["open-notebook-mcp"],
          "env": {
            "OPEN_NOTEBOOK_URL": "http://localhost:5055",
            "OPEN_NOTEBOOK_PASSWORD": "your_password_here"
          }
        }
      }
    }
    
  3. Restart Claude Desktop and start using your notebooks in conversations!

For VS Code (Cline and other MCP-compatible extensions)

Add to your VS Code settings or .vscode/mcp.json:

{
  "servers": {
    "open-notebook": {
      "command": "uvx",
      "args": ["open-notebook-mcp"],
      "env": {
        "OPEN_NOTEBOOK_URL": "http://localhost:5055",
        "OPEN_NOTEBOOK_PASSWORD": "your_password_here"
      }
    }
  }
}

Configuration

  • OPEN_NOTEBOOK_URL: URL to your Open Notebook API (default: http://localhost:5055)
  • OPEN_NOTEBOOK_PASSWORD: Optional - only needed if you've enabled password protection

For Remote Servers

If your Open Notebook instance is running on a remote server, update the URL accordingly:

"OPEN_NOTEBOOK_URL": "http://192.168.1.100:5055"

What You Can Do

Once connected, you can ask Claude or your AI assistant to:

  • "Search my research notebooks for information about [topic]"
  • "Create a new note summarizing the key points from our conversation"
  • "List all my notebooks"
  • "Start a chat session about [specific source or topic]"
  • "What sources do I have in my [notebook name] notebook?"
  • "Add this PDF to my research notebook"
  • "Show me all notes in [notebook name]"

The MCP server provides full access to Open Notebook's capabilities, allowing you to manage your research seamlessly from within your AI assistant.

Available Tools

The Open Notebook MCP server exposes these capabilities:

Notebooks

  • List notebooks
  • Get notebook details
  • Create new notebooks
  • Update notebook information
  • Delete notebooks

Sources

  • List sources in a notebook
  • Get source details
  • Add new sources (links, files, text)
  • Update source metadata
  • Delete sources

Notes

  • List notes in a notebook
  • Get note details
  • Create new notes
  • Update notes
  • Delete notes

Chat

  • Create chat sessions
  • Send messages to chat sessions
  • Get chat history
  • List chat sessions
  • Vector search across content
  • Text search across content
  • Filter by notebook

Models

  • List configured AI models
  • Get model details
  • Create model configurations
  • Update model settings

Settings

  • Get application settings
  • Update settings

MCP Server Repository

The Open Notebook MCP server is developed and maintained by the Epochal team:

🔗 GitHub: Epochal-dev/open-notebook-mcp

Contributions, issues, and feature requests are welcome!

Finding the Server

The Open Notebook MCP server is published to the official MCP Registry:

Troubleshooting

Connection Errors

  1. Verify the OPEN_NOTEBOOK_URL is correct and accessible
  2. If using password protection, ensure OPEN_NOTEBOOK_PASSWORD is set correctly
  3. For remote servers, make sure port 5055 is accessible from your machine
  4. Check firewall settings if connecting to a remote server

Using with Other MCP Clients

The Open Notebook MCP server follows the standard MCP protocol and can be used with any MCP-compatible client. Check your client's documentation for configuration details.

Learn More