
Openzim Mcp
io.github.cameronrye由 GitHub 帳號 cameronrye 發布v3.4.0更新於 Oct 25, 2026
Offline MCP access to ZIM knowledge archives — Wikipedia, Wiktionary, Stack Exchange, Kiwix.
概覽
一個本機 MCP 伺服器,讓助理以結構化、離線的方式存取 ZIM 知識檔案,例如維基百科、維基詞典與 Stack Exchange。
- 可以做什麼
- 以自然語言或全文檢索(含搜尋建議)查詢檔案,支援跨多個檔案檢索,並對大型檔案分頁與快取。讀取條目與章節,依命名空間瀏覽,並沿目錄與相關條目導覽。檢視檔案中繼資料、索引能力與完整性,擷取連結關係圖,包括指向某頁面的入站連結。在進階模式下把個別檔案條目作為 MCP 資源提供並發出變更通知,另附研究、摘要與探索提示。
- 適用情境
- 當助理需要根據離線或隔離網路中的知識檔案(例如已下載的維基百科或 Stack Exchange 傾印)作答,而非存取即時網路時使用。簡單模式適合小模型;進階模式適合較大模型,以及需要精細控制分頁、命名空間與連結圖的用戶端。
- 執行需求
- 透過 stdio 在本機執行,通常使用 uvx 或 pip(Python),也可用 Docker 映像。需要至少一個 ZIM 檔案及其所在目錄路徑;沒有檔案時伺服器無法運作。無需帳號或 API 金鑰。選用的 HTTP 傳輸需設定 bearer 權杖與主機參數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Openzim Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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
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:
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:
~/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:
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):
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):
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:
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 asubscriptions/listenstream and getresources/list_changedwhen a ZIM appears or disappears,resources/updatedwhen 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), andzim_metadatareports archive identity, full-text / title index capabilities, and anM/Countermimetype 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.sqlitenext 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/.
Project status
v3.4.0 is the current release (2026-10-25).
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.
Contributing
See CONTRIBUTING.md for development setup, test commands, code style, and the release process.
Security
See SECURITY.md for the vulnerability disclosure policy. No known CVEs.
License
MIT. See LICENSE.
Acknowledgments
- openZIM and Kiwix for the ZIM format and libzim library
- Model Context Protocol for the open client-server protocol
- The open-source community and contributors
Made with ❤️ by Cameron Rye
來源:README.md,提交 934d464
工具
0版本歷史
3- v3.4.0最新Oct 25, 2026
- v3.3.4Sep 18, 2026
- v3.3.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分