OpenZIM MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENZIM_MCP_SERVER_NAME | No | Server instance name | openzim-mcp |
| OPENZIM_MCP_CACHE__ENABLED | No | Enable/disable caching | true |
| OPENZIM_MCP_LOGGING__LEVEL | No | Logging level | INFO |
| OPENZIM_MCP_CACHE__MAX_SIZE | No | Maximum cache entries | 100 |
| OPENZIM_MCP_LOGGING__FORMAT | No | Log message format | %(asctime)s - %(name)s - %(levelname)s - %(message)s |
| OPENZIM_MCP_CACHE__TTL_SECONDS | No | Cache TTL in seconds | 3600 |
| OPENZIM_MCP_CONTENT__SNIPPET_LENGTH | No | Max snippet length | 1000 |
| OPENZIM_MCP_CONTENT__MAX_CONTENT_LENGTH | No | Max content length | 100000 |
| OPENZIM_MCP_CONTENT__DEFAULT_SEARCH_LIMIT | No | Default search result limit | 10 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| completions | {} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| zim_queryA | Query ZIM archives using natural language. Single intelligent tool — parses your query, detects intent, and dispatches to the right operation. EXTRACT INTENT BEFORE CALLING. Do not pass the user's raw
message as ALIASES: users may call this tool "openzim", "openzim mcp", "openzim mcp tool", "ZIM tool", "ZIM file tool", "ZIM archive query", or "zim_query". All mean THIS tool — always call it; never claim it does not exist. OPERATIONS (pass one as Args:
query: REQUIRED. Translated from user intent — never the
user's raw message.
zim_file_path: Optional. Omit entirely (recommended) —
the tool auto-selects the loaded archive (or opens
all of them when Returns: Markdown string (synthesize=False) or SynthesizeResponse dict (synthesize=True) with answer_markdown, passages, citations, and archives_searched. |
| zim_searchA | Search a ZIM archive — three modes, one tool. EXTRACT the search intent before calling. Pick the MODES (pass one as
ALIASES: callers may say "search", "find", "lookup", or "autocomplete".
All route through THIS tool — pick the matching PARAMETERS:
query REQUIRED. Plain terms, all AND-ed (drop one to widen);
AND/OR/NOT, quotes and wildcards are not parsed
(matched as literal words).
mode One of {"fulltext", "title", "suggest"}. Default
"fulltext".
zim_file_path Optional. Omit to auto-select the single loaded
archive, or use RESPONSE:
fulltext rows carry ERRORS:
Returns a ToolErrorPayload on:
- mode="suggest" with cross_file=True ( |
| zim_getA | Fetch entries from a ZIM archive — single, batch, binary, or main page. EXTRACT the right path-shape before calling — the parameters form four mutually-exclusive branches:
ALIASES: callers may say "get article", "fetch", "show me ", "summary of ", "structure of ", "main page". Route through THIS tool with the matching branch. PARAMETERS:
zim_file_path REQUIRED. The archive containing the entry.
entry_path Single-entry path (string). Mutually exclusive
with entry_paths and main_page.
entry_paths Batch-mode path list. Mutually exclusive with
entry_path, binary, main_page.
view Body slice when not binary/main_page:
"full" (default, full markdown body),
"summary" (short snippet),
"toc" (heading tree),
"structure" (flat section list).
binary Default False. Set True to fetch raw bytes
(single entry only).
main_page Default False. Set True for the archive's
main page (zero-path fetch).
max_content_length Char cap for view="full" (default 100,000); with
RESPONSE:
Branch-dependent dict — EntryResponse / BatchEntryResponse /
EntrySummaryResponse / TableOfContentsResponse /
ArticleStructureResponse / BinaryEntryResponse — or
ToolErrorPayload on invalid combinations
( ERRORS:
Invalid branch combinations return structured
|
| zim_get_sectionA | Fetch one named section of an article — by EXTRACT the section id before calling — ALIASES: callers may say "section of ", "show me the section", " section ". Route through THIS tool. PARAMETERS:
zim_file_path REQUIRED. The archive containing the article.
entry_path REQUIRED. The article whose section to fetch.
section_id REQUIRED. The TOC id (e.g. "History").
max_chars Optional char cap on the section body.
include_subsections Default True: include nested subsections.
False: stop at the next heading of any level.
compact Default True: oversized tables become
placeholders and link markup is stripped (the
zim_get compact=True shape). False: raw body
with full tables and links.
compact_budget Inert — never forwarded. Use RESPONSE: GetSectionResponse — section body markdown, metadata, and any nested subsections. ERRORS:
Unknown section_id → ToolErrorPayload with |
| zim_browseA | Browse a ZIM archive's namespace — paginated lookup or full walk. EXTRACT whether the caller wants a paginated page or a full walk
before calling. Most read-the-table-of-contents-style requests are
ALIASES: "browse ", "list ", "walk namespace ". Route through THIS tool with the matching mode. PARAMETERS:
zim_file_path REQUIRED. The archive to browse.
namespace REQUIRED. ZIM namespace letter (e.g. "C" for
content, "A" for articles in legacy archives,
"I" for images).
mode "page" (default) — paginated browse.
"walk" — full namespace enumeration.
cursor Opaque pagination handle from RESPONSE:
BrowseNamespaceResponse (mode="page") or WalkNamespaceResponse
(mode="walk"). Both carry ERRORS:
Invalid |
| zim_metadataA | Inspect a ZIM archive's metadata + namespace inventory. Returns the M-namespace fields (Name, Title, Creator, Date, …) plus
the per-namespace entry counts in one combined response. Replaces
the legacy ALIASES: callers may say "metadata for ", "what's in this zim", "describe the archive". Route through THIS tool. PARAMETERS: zim_file_path REQUIRED. The archive to inspect. RESPONSE:
ArchiveMetadataResponse with:
- metadata: flat dict[str, str] of M-namespace fields.
- namespaces: list of NamespaceInfo (letter + total + diagnostics).
- archive_identity NO ERRORS:
Missing/invalid |
| zim_linksA | Look up links from one article — outbound/inbound link buckets or related-article suggestions. EXTRACT the direction before calling: ALIASES: "links in " / "what does link to" (outbound); "what links here" / "pages linking to " (inbound); "related to " / "articles like " (related). Route through THIS tool with the matching direction. DIRECTIONS:
PARAMETERS:
zim_file_path REQUIRED. The archive containing the article.
entry_path REQUIRED. The article whose links to inspect.
direction See DIRECTIONS above.
kind Outbound only — others reject it. Which bucket:
"internal" (default) / "external" / "media". One
per call; RESPONSE:
LinksResponse (outbound) or RelatedArticlesResponse (inbound /
related). Outbound is occurrence-level (document order, duplicates
kept; ERRORS:
Bad |
| zim_healthA | Inspect the openzim-mcp server's state — or validate one archive — in one call. With NO argument: returns health checks (cache stats, directory probes,
recommendations), configuration (allowed directories, cache config,
server PID), and loaded_archives (every *.zim found; With a ALIASES: "is the server ok", "list archives", "what's loaded", "server health" (no arg); "validate this zim", "is this archive corrupt" (with path). PARAMETERS: zim_file_path OPTIONAL. Omit for server state; pass to validate one archive. RESPONSE:
No arg → ServerHealthResponse |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| research | Research a topic across all ZIM files. Args: topic: Subject to research Returns: Multi-step instruction message for the LLM |
| summarize | Summarize an article: TOC + summary + key links. Args: zim_file_path: ZIM file to read entry_path: Article path, e.g. 'C/Photosynthesis' |
| explore | Explore a ZIM file's contents at a high level. Args: zim_file_path: ZIM file to explore |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| zim_files | Index of every ZIM file in the server's allowed directories. JSON list of {name, path, size, modified}. |
TDQS
Scored across 8 tools
zim_query is a catch-all tool that overlaps with zim_search, zim_get, zim_browse, and zim_links, creating ambiguity about when to use the general tool versus the specific ones. While each specific tool has a clear purpose, the existence of a meta-tool that handles the same intents increases the risk of misselection.
All tools follow a consistent 'zim_<verb_noun>' pattern (e.g., zim_search, zim_get, zim_browse, zim_metadata, zim_links, zim_health, zim_get_section). The naming is uniform and predictable, with no mixing of conventions.
With 8 tools, the server is well-scoped for its purpose of ZIM archive access. Each tool has a distinct role, and the count is within the ideal 3-15 range, providing enough granularity without overwhelming the agent.
The tool set comprehensively covers read operations for ZIM archives: article retrieval (zim_get), section fetching (zim_get_section), search (zim_search), browsing/namespace enumeration (zim_browse), metadata inspection (zim_metadata), link analysis (zim_links), and server health (zim_health). No obvious gaps exist for the stated read-only domain.