Skip to main content
Glama
Offline Document MCP Server

Offline Document MCP Server

by ljrseals-dev

Offline Document MCP Server

Reliable offline-first document corpus + MCP server for local LLMs.

Core Guarantees (from mode-isolation patch)

  • CLASSICAL / ARCHIVE / AUTO modes never touch an LLM provider, never perform network calls after corpus is built, and never discover API keys.

  • Only modes explicitly marked allows_provider=True may use an injected or discovered provider.

  • All document acquisition is limited to clearly public-domain / open-license sources.

  • Once indexed, the system runs fully offline.

Related MCP server: qs-rag

Supported Sources (modular)

Configured in config/services.yaml. Add new legal sources by appending a service block.

Current defaults:

  • Project Gutenberg (public domain)

  • Wikipedia / Wikimedia dumps (CC BY-SA)

  • Internet Archive public-domain / CC0 items

Quick Start

# Install
pip install -e .

# (Optional) Download legal corpora
python -m offline_doc_mcp.cli acquire --service project_gutenberg
python -m offline_doc_mcp.cli acquire --service wikipedia_dumps
python -m offline_doc_mcp.cli acquire --service internet_archive_pd

# Process + index
python -m offline_doc_mcp.cli process
python -m offline_doc_mcp.cli index

# Run MCP server (stdio)
python -m offline_doc_mcp.mcp_server

# Optional local HTML UI
python -m offline_doc_mcp.html_server --port 8765

Mode Isolation

See src/offline_doc_mcp/engine/modes.py and engine.py.
Offline modes short-circuit before any provider lookup.

License

MIT (code).
Documents retain their original licenses (public domain / CC BY-SA / CC0 etc.).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables developers to index and search their own local PDF, DOCX, Markdown, and text documents from an MCP client or terminal, combining semantic similarity with keyword matching for exact technical terms. Everything runs on the user's machine with no API key, Docker, or external database, so private documents stay private and work offline after the initial model download.
      9
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables a local language model to search and read an offline library of documents, Kiwix ZIM books, and OpenStreetMap extracts through MCP, with private and public source controls.
      1
      MIT