MCP SERVER

Knowledge that works offline.

OpenZIM MCP gives any AI model structured, secure access to ZIM archives — Wikipedia, MedlinePlus, the Stack Exchange dumps — without an internet connection.

uv tool install openzim-mcp
  • v2.5.1Latest release
  • 1 + 8Simple / advanced tools
  • 80%+Test coverage
  • MITLicense
What is this

An MCP server for offline knowledge.

ZIM archives package Wikipedia, Project Gutenberg, MedlinePlus, the Stack Exchange network, and more into self-contained files you can carry on a USB stick. OpenZIM MCP is the Model Context Protocol server that turns those static files into intelligent, structured access for any LLM client — Claude Desktop, Cursor, Cline, or your own.

ZIM archive Static openzim-mcp Intelligent Your LLM Conversational
  • Offline

    No network round-trips. The whole archive — every article, every link — sits on disk and stays accessible whether the network is up or down.

  • Secure

    Path-traversal protection, sanitized error messages, bearer-token auth on HTTP, multi-arch container running as non-root.

  • Structured

    Search, browse, summarize, traverse — one intelligent NL tool by default, or 8 specialized tools in advanced mode, designed for how LLMs actually consume knowledge.

  • 0Known CVEs
  • 80%+Test coverage
  • 100%Type-annotated
The v2 surface

Eight tools. Same surface area.

v2 collapses the 22-tool advanced mode into 8 consolidated tools — schema text drops from ~36KB to ~23.5KB, clearing the MCP Tax pain band for small-model dispatch.

  • 8-tool advanced surface

    zim_query, zim_search, zim_get, zim_get_section, zim_browse, zim_metadata, zim_links, zim_health. Every v1 operation still reachable via a mode parameter.

    {
      "name": "zim_search",
      "arguments": {
        "zim_file_path": "wiki.zim",
        "query": "evolution",
        "mode": "fulltext"
      }
    }
  • Simple mode unchanged

    The natural-language zim_query tool is identical to v1.2.0. Small-model clients see one tool; large-model clients can opt into the 8-tool surface with --mode advanced.

    openzim-mcp /data/zim/
    # simple mode (default): one tool
    
    openzim-mcp --mode advanced /data/zim/
    # advanced mode: 8 tools
  • Dispatch quality validated

    300-probe dispatch eval on Qwen-2.5-7B-Instruct (small-model deployment target). Gate decision baked into the release; drift between gate output and shipped constants is caught by a consistency test in CI.

    tests/dispatch_eval/gate_0b_decision.json
    tests/test_phase_f_gate_decision_consistency.py
  • Presets, links & health

    Archive-type presets auto-tune retrieval per source (Stack Exchange dumps render as clean Q&A, not vote-score noise). Inbound link discovery answers "what links here." And zim_health(zim_file_path=…) validates an archive (Archive.check() + checksum), with identity and index introspection in zim_metadata.

    {
      "name": "zim_health",
      "arguments": {
        "zim_file_path": "wiki.zim"
      }
    }
Try it

Three steps to a knowledge engine.

  1. 1

    Install

    uv tool install openzim-mcp
  2. 2

    Get a ZIM

    Download an archive from the Kiwix library ↗.

    mkdir ~/zim-files && cd ~/zim-files
    # place .zim files here
  3. 3

    Run it

    uv run openzim-mcp ~/zim-files

    Or as an HTTP service: OPENZIM_MCP_AUTH_TOKEN=$TOKEN openzim-mcp --transport http --host 0.0.0.0 ~/zim-files

See it in action

Request

{
  "name": "zim_query",
  "arguments": {
    "query": "summarize the article on Photosynthesis"
  }
}

Response

## Photosynthesis

Photosynthesis is the process by which
plants and other organisms convert light
energy into chemical energy that drives
the conversion of carbon dioxide and water
into glucose and oxygen.

The process consists of two main stages:
the light-dependent reactions and the
Calvin cycle (light-independent reactions).