MCP Connector

Access Offline Knowledge Bases with AI

OpenZIM MCP gives AI models offline, structured access to ZIM archives (Wikipedia, Stack Exchange, Kiwix Library) via a lean 8-tool surface.

Works with githubkiwix

84
Spark score
out of 100
Updated 2 days ago
Source checked Sep 19, 2026
Version 3.3.4
Models
universal

Add to Favorites

Why it matters

Enable AI models to intelligently search and access offline ZIM format knowledge bases, including Wikipedia and educational content, for enhanced research and content creation.

Outcomes

What it gets done

01

Search ZIM files for specific content using natural language queries.

02

Retrieve detailed information and metadata from ZIM entries.

03

Browse and navigate knowledge bases by namespace and content structure.

04

Extract links and article structure for deeper content analysis.

Install

Add it to your toolbox

Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-openzim-mcp | bash

After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

list_zim_files

List all ZIM files in allowed directories

search_zim_file

Search ZIM file content with query, limit, and offset parameters

get_zim_entry

Retrieve detailed content of a specific entry in a ZIM file with smart extraction

get_zim_metadata

Retrieve ZIM file metadata from M namespace entries including entry count

get_main_page

Retrieve the main page from the W namespace

list_namespaces

List available namespaces and entry counts

browse_namespace

Browse entries in a specific namespace with pagination

search_with_filters

Search ZIM file content with advanced filters for namespace and content type

+3 tools

Overview

OpenZIM MCP Server

OpenZIM MCP gives AI models offline, structured access to ZIM-format archives like Wikipedia and Stack Exchange, via a single natural-language tool in Simple mode or an 8-tool Advanced mode with MCP prompts and resource subscriptions. Use it when an assistant needs offline access to a downloaded ZIM archive; pick Simple mode for smaller models and Advanced mode for larger ones; inbound link discovery needs a separately built sidecar index.

What it does

OpenZIM MCP gives AI models structured, offline access to ZIM-format knowledge archives - Wikipedia, Wiktionary, Stack Exchange, and the rest of the Kiwix Library - rather than a raw text dump. It provides smart navigation by namespace (articles, metadata, media), structure-aware retrieval (sections, tables of contents, related articles), full-text search with suggestions and multi-archive search, and link-graph extraction to map content relationships, with cached, paginated operations to stay responsive across massive archives.

It ships two modes. Simple mode (the default) exposes one natural-language tool, zim_query, which dispatches to the right underlying operation server-side - built for small-model deployment where a large tool schema would eat too much context. Advanced mode exposes all 8 specialized tools (zim_query, zim_search, zim_get, zim_get_section, zim_browse, zim_metadata, zim_links, zim_health) plus 3 MCP prompts (/research, /summarize, /explore) and per-entry resources, for larger models that can reliably dispatch over the full schema. As a rule of thumb, models at or under 13B parameters benefit from Simple mode; larger models (Claude Sonnet/Opus, GPT-4o-class, Llama 70B+) can dispatch Advanced mode directly. The advanced tool set was cut down from 22 tools, shrinking the schema from roughly 36KB to 23.5KB to reduce the token overhead of tool discovery.

When to use - and when NOT to

Use it to give an AI assistant offline access to a downloaded ZIM knowledge archive - ask something like "summarize the article on Photosynthesis" in Simple mode and zim_query handles the dispatch automatically. Archive-type presets auto-tune retrieval and summarization per source (Stack Exchange dumps render as clean Q&A instead of raw vote-score noise, for example), and operators can override the bundled presets with a TOML file via OPENZIM_MCP_PRESETS_OVERRIDE_PATH.

Don't expect inbound link discovery ("what links here", via zim_links(direction="inbound")) to work out of the box - it requires a pre-built sidecar index generated with openzim-mcp build link-graph <archive>.zim, which writes a .linkgraph.sqlite file next to the archive.

Capabilities

zim_health validates an archive's integrity via libzim's native Archive.check() plus a checksum, and zim_metadata reports archive identity, full-text/title index capabilities, and a MIME-type breakdown. The server supports Streamable HTTP transport with bearer-token auth, CORS, and health endpoints for a long-running service deployment, alongside per-entry MCP resources (zim://{name}/entry/{path}) with subscription support so clients get notifications/resources/updated when archives change.

How to install

uv tool install openzim-mcp

Also installable via pip install openzim-mcp, or as a Docker image (ghcr.io/cameronrye/openzim-mcp, stdio transport by default, HTTP transport opt-in via environment variables). It's listed on the Smithery registry and the official MCP Registry (io.github.cameronrye/openzim-mcp), and a one-click Claude Desktop .mcpb extension bundle is available from GitHub releases. ZIM archive files themselves need to be downloaded separately from the Kiwix Library.

Who it's for

Builders of research assistants, knowledge chatbots, and content-analysis systems that need structured, offline access to large reference archives like Wikipedia or Stack Exchange, without relying on a live internet connection or a raw-text ingestion pipeline.

OpenZIM MCP is released under the MIT License.

Source README

OpenZIM MCP Logo

OpenZIM MCP Server

Transform static ZIM archives into dynamic knowledge engines for AI models

CI codecov CodeQL Security Rating

PyPI version PyPI - Python Version PyPI - Downloads License: MIT

OpenZIM MCP server quality badge


Highlights. A lean 8-tool advanced surface (zim_query, zim_search, zim_get, zim_get_section, zim_browse, zim_metadata, zim_links, zim_health) with a schema small enough for small-model dispatch - or one-tool Simple mode for natural-language queries. Archive-type presets auto-tune retrieval per source (Wikipedia, Stack Exchange, …), inbound link discovery answers "what links here," and native libzim introspection validates and inspects any archive. Available on Smithery and the official MCP Registry. Release notes → Docs →

OpenZIM MCP is a modern, secure, high-performance Model Context Protocol server that gives AI models structured, offline access to ZIM format knowledge archives - Wikipedia, Wiktionary, Stack Exchange, and the rest of the Kiwix Library.

Built for research assistants, knowledge chatbots, and content-analysis systems that need intelligent access to vast knowledge repositories - not just a raw text dump. Smart navigation by namespace (articles, metadata, media), structure-aware retrieval (sections, tables of contents, related articles), full-text search with suggestions and multi-archive search, and link-graph extraction to map content relationships. Cached, paginated operations keep things responsive across massive archives; comprehensive input validation and path-traversal protection keep things safe.

Streamable HTTP transport, per-entry MCP resources with live change notifications, and dual Simple / Advanced modes are all built in.

Install

# uv (recommended — isolated CLI tool)
uv tool install openzim-mcp

# pip
pip install openzim-mcp

# Docker (multi-arch image, ghcr.io) — runs as a local stdio MCP server
docker pull ghcr.io/cameronrye/openzim-mcp
docker run -i --rm -v ~/zim-files:/data ghcr.io/cameronrye/openzim-mcp

The container defaults to stdio transport, so docker run -i speaks MCP over stdin/stdout - wire it into an MCP client the same way as the binary (see Quick start). For the long-running HTTP service (bearer auth, CORS, health endpoints), opt in at runtime with -e OPENZIM_MCP_TRANSPORT=http -e OPENZIM_MCP_HOST=0.0.0.0 -e OPENZIM_MCP_AUTH_TOKEN=… -p 8000:8000; see HTTP & Docker deployment.

Verify the install:

openzim-mcp --help

Get your first ZIM archive

The server does nothing without an archive to read. Grab a real one - a 13.6 MB extract of English Wikipedia on climate change, from the openZIM project's own testing suite. No account, nothing to install:

mkdir -p ~/zim-files
curl -fsSL -o ~/zim-files/wikipedia_en_climate_change_mini_2024-06.zim \
  https://raw.githubusercontent.com/openzim/zim-testing-suite/main/data/withns/wikipedia_en_climate_change_mini_2024-06.zim

~/zim-files is the directory every example below points the server at - the server expands ~ itself, so it works from a shell and from a client config file alike. For full archives - Wikipedia, Wiktionary, Stack Exchange and the rest, ranging from a few hundred MB to tens of GB - browse browse.library.kiwix.org and save the .zim into the same directory. More detail, including checksums and a Windows PowerShell equivalent: Quick start.

Smithery & one-click install

OpenZIM MCP is listed on the Smithery registry and the official MCP Registry (as io.github.cameronrye/openzim-mcp). Add it to your MCP client with the Smithery CLI:

npx @smithery/cli mcp add rye/openzim-mcp --client claude

For a one-click Claude Desktop extension, download the openzim-mcp-<version>.mcpb asset (and its .sha256) from the latest release and double-click it. The bundle launches the version-pinned uvx openzim-mcp@<version> (so the host needs uv) and prompts for your ZIM directory. Maintainer runbook: docs/distribution.md.

Quick start

Run the server in Simple mode (default - exposes one natural-language tool, zim_query):

openzim-mcp ~/zim-files

Wire it into your MCP client. Example for Claude Desktop's claude_desktop_config.json (any MCP client that speaks stdio works the same way):

{
  "mcpServers": {
    "openzim-mcp": {
      "command": "uvx",
      "args": ["openzim-mcp", "~/zim-files"]
    }
  }
}

Once the client connects, ask your LLM: "summarize the article on Photosynthesis" - zim_query dispatches to the right underlying tool automatically.

For full control, run in Advanced mode to expose all 8 specialized tools:

{
  "mcpServers": {
    "openzim-mcp-advanced": {
      "command": "uvx",
      "args": ["openzim-mcp", "--mode", "advanced", "~/zim-files"]
    }
  }
}

For HTTP transport (long-running service with bearer auth, CORS, and health endpoints) see HTTP & Docker deployment.

Highlights

  • 8-tool advanced surface - zim_query, zim_search, zim_get, zim_get_section, zim_browse, zim_metadata, zim_links, zim_health. Down from 22; advanced-mode schema drops from ~36KB to ~24.1KB, clearing the MCP Tax pain band. API reference →
  • Streamable HTTP transport - bearer-token auth, CORS, health endpoints, multi-arch Docker image. HTTP & Docker deployment →
  • Per-entry MCP resources + subscriptions - zim://{name}/entry/{path} with native MIME types; clients open a subscriptions/listen stream and get resources/list_changed when a ZIM appears or disappears, resources/updated when one is replaced. Resources, prompts & subscriptions →
  • Simple-mode zim_query - one natural-language tool that dispatches to the right operation, tuned for small-model deployment targets. Quick start →
  • Archive-type presets - OpenZIM MCP detects the archive type (Wikipedia, Stack Exchange, and more) and auto-tunes retrieval and summarization for it - e.g. Stack Exchange dumps render as clean Q&A instead of vote-score noise. Operators can override the bundled defaults with a TOML file (OPENZIM_MCP_PRESETS_OVERRIDE_PATH).
  • Native libzim introspection - zim_health(zim_file_path=...) validates an archive's integrity (Archive.check() + checksum), and zim_metadata reports archive identity, full-text / title index capabilities, and an M/Counter mimetype breakdown. API reference →
  • Inbound link discovery ("what links here") - zim_links(direction="inbound") returns pages that link to an entry, ranked by linker importance. Requires a pre-built sidecar: openzim-mcp build link-graph <archive>.zim (writes <archive>.zim.linkgraph.sqlite next to the archive). API reference →

Modes

OpenZIM MCP ships two modes; pick one per client.

Simple mode (default) exposes a single intelligent tool, zim_query, that parses natural-language requests and dispatches to the right underlying operation. Built for small-model deployment targets - the wire footprint is minimal and the dispatch happens server-side, not in the LLM context. Start here unless you have a specific reason not to.

Advanced mode exposes all 8 specialized tools (zim_query, zim_search, zim_get, zim_get_section, zim_browse, zim_metadata, zim_links, zim_health) plus 3 MCP prompts (/research, /summarize, /explore) and per-entry resources. Built for larger models that can reliably dispatch over the full schema, and for clients that want fine-grained control over pagination, namespace browsing, and link-graph extraction.

Rule of thumb: models ≤ 13B parameters benefit from Simple mode; larger models (Claude Sonnet/Opus, GPT-4o-class, Llama 70B+) can dispatch Advanced mode directly. See LLM integration patterns for guidance on choosing.

Documentation

Full documentation lives at https://cameronrye.github.io/openzim-mcp/docs/.

Group Pages
Get started Introduction · Installation · Quick start · ZIM concepts · LLM integration patterns · Worked examples
Concepts Smart retrieval · Search reranking · Architecture overview
Reference API reference · Configuration · Resources, prompts & subscriptions · CLI reference
Operate HTTP and Docker deployment · Performance optimization · Security best practices · Troubleshooting · FAQ · Upgrading

Project status

v3.3.4 is the current release (2026-09-18).
v2.0.0 GA shipped 2026-05-27. Per SECURITY.md, the v1.x maintenance window closed when v2.5.0 shipped (2026-06-18); all active development is on the current major line. v3.0.0 is a breaking release for HTTP subscription clients: resources/subscribe/unsubscribe are no longer served - live updates ride subscriptions/listen on the 2026-07-28 protocol revision - and link-graph sidecars built by 2.x must be rebuilt. Tools, resources, and prompts are unchanged, and legacy-handshake clients keep working. Details in CHANGELOG.md, and step-by-step instructions in the upgrade guide.

Security

See SECURITY.md for the vulnerability disclosure policy. No known CVEs.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.