Get the FREE Ultimate OpenClaw Setup Guide →

zim

A MCP server for reading and searching ZIM files

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zicojiao-zim-mcp-server wsl.exe bash -c node /path/to/zim-mcp-server/build/index.js /path/to/zim

How to use

The ZIM MCP Server reads and searches content stored in ZIM files. It exposes tools for listing available ZIM files, searching within ZIM content, and retrieving detailed entries. To run it in a Windows/WSL2 setup, you invoke the server via WSL and point it at your local ZIM directory. Once running, you can use the provided tools to query Wikipedia-like offline content stored in ZIM format and perform site-wide searches, retrieve article content, and explore directory structures of your ZIM files.

How to install

Prerequisites:

  • Windows with WSL2 installed and enabled
  • Node.js installed inside the WSL distribution (or ensure Node is available in the environment where the server runs)
  • ZIM files downloaded and accessible locally (e.g., /home/username/Code/zim or /path/to/zim)

Installation steps:

  1. Install dependencies in the project (within WSL2): pnpm install

  2. Build the project (within WSL2): pnpm run build

  3. Prepare ZIM files:

    • Download ZIM files from the Kiwix Library
    • Place them in a directory accessible to the server, e.g. /path/to/zim
  4. Run the MCP server via WSL2 (example):

    • Ensure the build index.js path and ZIM directory path are correct in the command
    • Start the server using the configuration provided (see mcp_config): wsl.exe bash -c "node /path/to/zim-mcp-server/build/index.js /path/to/zim"

Note: The exact paths will depend on where you cloned the repository and where you stored ZIM files. Modify the command accordingly.

Additional notes

Tips and potential issues:

  • The instructions assume a WSL2 environment; the commands are tailored for that setup. If running directly in Windows without WSL, adapt the command to your environment.
  • Ensure the Node build outputs index.js at the specified path: /path/to/zim-mcp-server/build/index.js
  • If your ZIM directory is large, consider performance implications of searches and memory usage; you may want to adjust limits in client tooling if available.
  • The available tools are: list-zim-files (lists ZIM files), search-zim-file (searches within a ZIM file; requires zimFilePath and query; supports optional limit and offset), and get-zim-entry (retrieves detailed content for an entry; requires zimFilePath and entryPath; optional maxContentLength).
  • If you need to run multiple servers, replicate the mcpServers entry with distinct names and point each to its own ZIM directory.
  • There is an experimental warning in the project; use in a test environment first and verify results before production usage.

Related MCP Servers

Sponsor this space

Reach thousands of developers