openzim-mcp — Claude Code MCP server: offline ZIM archive access
Lets an AI agent read ZIM archives — Wikipedia, Wiktionary, Stack Exchange — with no internet. Useful when search and navigation over a local knowledge base is what you need.
claude mcp add --env OPENZIM_MCP_TOOL_MODE=<OPENZIM_MCP_TOOL_MODE> --transport stdio openzim-mcp -- uvx openzim-mcpWhat openzim-mcp does
The server exposes local access to ZIM files from the Kiwix library. Eight tools ship inside: zim_query, zim_search, zim_get, zim_get_section, zim_browse, zim_metadata, zim_links, zim_health. A Simple mode swaps all of that for one natural-language tool. Archive-type presets tune retrieval per source, so Wikipedia and Stack Exchange behave differently, and inbound link discovery answers what links here.
Transport is stdio or Streamable HTTP. Search returns suggestions and can span several archives at once; results are cached and paginated. Input validation and path-traversal protection are built in, along with MCP resources that notify on changes.
Without a .zim file the server has nothing to read, so drop an archive into the directory you point it at first. Install with uv tool install openzim-mcp or pip install openzim-mcp; the Docker image is ghcr.io/cameronrye/openzim-mcp. The container speaks stdio by default, which means docker run -i wires into an MCP client exactly like the binary does.
What it helps with
- find an article inside an offline Wikipedia archive
- pull a table of contents and sections from a ZIM page
- see which articles link to the current one
- search across several ZIM archives at once
- inspect archive metadata and health
Example prompts for the agent
- Summarize the Photosynthesis article from the archive
- Show me the sections of the climate change article in
wikipedia_en_climate_change_mini_2024-06.zim - What links to this article in the archive?
How to install openzim-mcp
Platform CLI
claude mcp add --env OPENZIM_MCP_TOOL_MODE=<OPENZIM_MCP_TOOL_MODE> --transport stdio openzim-mcp -- uvx openzim-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from openzim-mcp <command>
Platform CLI
codex mcp add openzim-mcp --env OPENZIM_MCP_TOOL_MODE=<OPENZIM_MCP_TOOL_MODE> -- uvx openzim-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from openzim-mcp <command>
Config file
{
"mcpServers": {
"openzim-mcp": {
"command": "uvx",
"args": [
"openzim-mcp"
],
"env": {
"OPENZIM_MCP_TOOL_MODE": "<OPENZIM_MCP_TOOL_MODE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from openzim-mcp <command>
Config file
{
"servers": {
"openzim-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"openzim-mcp"
],
"env": {
"OPENZIM_MCP_TOOL_MODE": "<OPENZIM_MCP_TOOL_MODE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from openzim-mcp <command>
Platform CLI
gemini mcp add -e OPENZIM_MCP_TOOL_MODE=<OPENZIM_MCP_TOOL_MODE> openzim-mcp uvx openzim-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from openzim-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about openzim-mcp
How do I install openzim-mcp in Claude Code?
Run claude mcp add --env OPENZIM_MCP_TOOL_MODE=<OPENZIM_MCP_TOOL_MODE> --transport stdio openzim-mcp -- uvx openzim-mcp.
What does openzim-mcp do?
It gives an agent structured offline access to ZIM archives: search, article retrieval, section navigation and link-graph extraction.
What do I need before running openzim-mcp?
At least one .zim file in the directory you pass to the server. Launching through uvx also requires uv on the host.