Skip to content

Project

OpenZIM MCP Server

Enables AI to search millions of Wikipedia articles offline in sub-second response times

Search Wikipedia and other ZIM knowledge bases from Claude, fully offline. Sub-second retrieval with zero network dependency.

PythonMCPKiwixZIMOpenZIM
87 GitHub stars
Screenshot of OpenZIM MCP Server

Architecture

flowchart TB
    subgraph Client["AI Client"]
        Claude["Claude / LLM"]
    end
    subgraph Server["OpenZIM MCP Server"]
        MCP["MCP Protocol"]
        Search["Search Engine"]
        Parser["Content Parser"]
    end
    subgraph Storage["Local Storage"]
        ZIM[("ZIM Files<br/>Wikipedia, etc.")]
    end
    Claude -->|"MCP Request"| MCP
    MCP --> Search
    Search --> ZIM
    ZIM --> Parser
    Parser -->|"Formatted Content"| MCP
    MCP -->|"MCP Response"| Claude

01 — The Problem

AI assistants depend on internet connectivity for every knowledge lookup, which makes them useless in air-gapped environments, on flaky connections, or wherever data has to stay private. That rules them out for researchers, educators, and professionals who need reliable help without constant network access.

02 — The Solution

Built an MCP server that connects AI models directly to ZIM-formatted knowledge archives. It uses the OpenZIM format that Kiwix relies on, so it can read compressed copies of Wikipedia and other Wikimedia projects and serve full-text search and article retrieval with no network dependency.

The Results

  • Sub-second full-text search across 6+ million Wikipedia articles
  • Complete offline operation with zero network dependency
  • Memory-efficient design using under 50MB RAM during operation
  • Works with Claude and other MCP-compatible AI assistants
6M+
Articles Searchable
<100ms
Search Latency
<50MB
Memory Usage

Put a Wikipedia ZIM archive on disk, point the server at it, and Claude can search and read those articles with the network cable unplugged. That is the whole pitch: retrieval that keeps working in air-gapped labs, classrooms with unreliable connectivity, and anywhere a live API is not an option.

MCP Tool Explorer

openzim-mcp
# Request
{
  "tool": "zim_search",
  "query": "quantum computing",
  "limit": 5
}
search

Search for articles in the ZIM knowledge base

This is a simulated demo. The actual MCP server processes requests from AI assistants like Claude.

Key Features

  • Offline Knowledge Access: Full Wikipedia and Kiwix content access without internet
  • High Performance: Fast search across millions of articles
  • Python-Based: Built with Python for easy deployment and extensibility
  • MCP Integration: Standard Model Context Protocol interface

Why offline access mattered

Most AI tooling assumes an always-on network connection and a live API behind every retrieval request. That assumption breaks down in classrooms, field work, privacy-sensitive environments, and any air-gapped deployment. OpenZIM MCP was built to prove that high-quality retrieval can still feel immediate when the knowledge base lives on disk instead of behind a network hop.

Performance strategy

The project focused on a few pragmatic constraints:

  • search should feel interactive even against multi-million-article archives
  • article retrieval should return clean, model-friendly content instead of raw archival formats
  • memory usage should stay low enough for modest developer machines and offline appliances

That drove the overall architecture: query the ZIM index efficiently, extract only the article payload that is needed, and normalize the result into an MCP response that is easy for an assistant to consume.

Product decisions

The strongest product decision was to make the server useful without requiring users to think about the details of the ZIM format. Developers care that the knowledge is offline and searchable; they do not want to learn an archive format first. MCP is a good fit here because it lets the complexity live at the boundary while the user gets a stable set of retrieval tools.

Outcome

I care about software that does not collapse the moment it loses the network. Pairing offline archives with an MCP interface makes local knowledge bases feel like first-class infrastructure for AI systems instead of second-best fallbacks.

Was this helpful?

Want to learn more?

Ask can answer questions about this project's implementation, technologies, and more.