OpenZIM MCP

OpenZIM MCP

Modern, secure MCP server enabling AI models to search offline ZIM knowledge bases.

10
Stars
2
Forks
11
Releases

Overview

OpenZIM MCP Server is a modern, secure, high-performance MCP (Model Context Protocol) server designed to transform static ZIM archives into dynamic knowledge engines for AI models. It enables offline access to large knowledge bases (e.g., Wikipedia) by providing structured, namespace-based retrieval, intelligent search, and robust content processing. The server supports dual mode operation: Simple mode with a single intelligent tool for natural language queries and Advanced mode exposing 15 specialized MCP tools for deeper control. It features security-first validation, path traversal protection, and a modular architecture with dependency injection, full type annotations, and configurable settings. It offers smart retrieval, automatic fallback from direct access to search-based retrieval, and cached operations to prevent timeouts on massive archives. It includes multi-server instance management with conflict detection and stale-instance cleanup to ensure safe operation in multi-instance environments. The project emphasizes testing (90%+ coverage), observability (structured logging, health monitoring), and extensive configuration via environment variables. It integrates with the zim-testing-suite for comprehensive testing and supports ZIM metadata queries, article structure extraction, and link extraction to empower LLMs with offline knowledge access.

Details

Owner
cameronrye
Language
Python
License
MIT License
Updated
2025-12-07

Features

Dual Mode Support

Choose between Simple mode (1 intelligent natural language tool, default) or Advanced mode (15 specialized tools) to match your LLM's capabilities.

Security First

Comprehensive input validation and path traversal protection.

High Performance

Intelligent caching and optimized ZIM file operations.

Smart Retrieval

Automatic fallback from direct access to search-based retrieval for reliable entry access.

Well Tested

90%+ test coverage with a comprehensive test suite.

Modern Architecture

Modular design with dependency injection.

Type Safe

Full type annotations throughout the codebase.

Observable

Structured logging and health monitoring.

Audience

DevelopersBuild AI apps that search offline ZIM knowledge bases and integrate with LLMs.

Tags

MCPZIMofflineknowledge baseWikipediadual modesecurityperformanceLLMnamespace navigationOpenZIMZIM searchZIM metadata