digibib
Read installed Digitale Bibliothek 5 CD-ROM volumes (DKI/DKA format) offline via a single portmanteau MCP tool digibib.
list_volumes – enumerate every installed volume with its id and title.
descriptor – read a volume's
DIGIBIB.TXTidentity keys (title etc.).toc – get the table of contents as a nested tree of node index + record index, trimmable with
max_depth.node_text – fetch decoded text for a TOC node's full chapter extent (
record..record_end,records_total,truncated), plus referenced figures and image levels.record_text – fetch decoded text for a single raw
TEXT.DKIrecord index.search – full-text (FTS5) search over decoded text, returning record, node, chapter and a
«»-marked snippet; needsquery,limitup to 100, ~10 s first-run index build per volume.images – list figures at a given zoom level (or highest) with name, dimensions, bpp, bytes and a REST URL for the binary.
Point at a different collection with the
rootargument orDIGIBIB_ROOTenv var.Companion REST API (port 14115) and React reader webapp (14114) expose volume picker, TOC tree, text, search and figures in a browser.
Caveat: text decode is v2 approximate (flowing paragraphs, heads dropped) — readable but not byte-faithful.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@digibib list the volumes in my Digitale Bibliothek library"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
digibib5-mcp
A clone-in-progress of the Digitale Bibliothek 5 reader (Directmedia /
Digitale Bibliothek), built on a from-scratch reverse-engineering of its .DKI
volume format. It reads the original CD-ROM images - volume list, table of
contents, and decoded text - and exposes them over MCP and REST, with a
reader webapp.
The .DKI format was reversed from the real discs (see
reversing-mcp docs/DIGIBIB5_DKI_FORMAT.md).
Two format generations are supported: older single-table volumes (DB008) and
newer ones (DB074, DB006) with magic-prefixed TEXT.DKI, direct TREE.DKA
mapping, high-bit word lengths and .xml source markers.
Digibib5 itself is the oracle: run it alongside to compare rendered output.
Why Digitale Bibliothek matters
Directmedia's Digitale Bibliothek series is an extraordinary, largely forgotten scholarly resource — especially for Germanistik students, researchers, and anyone who wants fast offline access to the German literary and philosophical canon (Killy Literaturlexikon, Wilpert, Deutsche Literatur von Luther bis Tucholsky, Deutsche Literatur im Mittelalter, Goethe, Lessing, Heine, Hoffmann, Kant, Nietzsche, Adorno) alongside wonderful curiosities like Merkwürdige Literatur (DB111) and Das digitale Handbuch des nutzlosen Wissens (DBSO06). Volumes such as English and American Literature from Shakespeare to Mark Twain (DB059) and Shakespeare: Complete Works (DB061) are icing on the cake.
digibib5-mcp brings these classic CD-ROMs back to life for modern readers and the (planned) mediacraft ecosystem.
Related MCP server: mcp-hathitrust
Documentation
Doc | What |
setup, MCP config | |
first-timer guide: discs, costs (none), sanity check | |
env vars, ports, per-volume file layout | |
MCP ops, REST endpoints, Python library | |
repo layout, gates, codec map, release | |
product requirements, scope, status | |
preliminary notes on the planned mediacraft integration | |
symptoms and fixes |
Status
Early. What works today:
Volume discovery - scans the install root and lists every CD-ROM image.
Descriptor - reads
DIGIBIB.TXTidentity (title etc.).TOC - parses
TREE.DKI(indented-text tree) into a nested table of contents.Text decode - decodes
TEXT.DKIrecords (tokenized word-stream codec, v2: flowing paragraphs, heads dropped, de-hyphenated).Search - FTS5 sidecar over decoded text with chapter snippets (
searchop, REST/api/.../search, reader search box).Figures -
IMAGES\BMP scans served over REST with per-chapter figure strips in the reader (imagesop,/api/.../images,/api/.../image/...).REST API + reader webapp - a Starlette backend serves the library as JSON, and a React/Vite/Tailwind reader renders the volume picker, TOC tree, and text.
Known v1 / approximate (tracked, to refine against the Digibib5 oracle):
The text codec's exact control-opcode grammar (heading levels, italics, links). Paragraph structure, running-head removal, de-hyphenation, spaced dashes, literal spans and reflowed line breaks are mapped (v2); output is flowing text but not yet byte-faithful.
Images (
IMAGES\*.BMP/images.lib) and the search indexes (INDEX.*/LINKS.*) are not wired up yet.
Solved 2026-10-26: the TREE.DKA node -> record mapping. The table is a
1-based start-record run for every node but the volume root (root starts at
record 0), located by monotonic-run scan. Clicking a TOC entry now renders the
whole chapter (all records until the next non-descendant node, capped at 100);
node_text reports record / record_end / records_total / truncated.
Format, in brief
A volume is a data\ folder:
File | Role |
| INI descriptor (identity shown in the CD picker) |
| TOC as indented CP1252 text (leading spaces = depth) |
| u32 node -> record table (1-based run for all nodes but the root; see CONFIGURATION) |
|
|
| search / cross-reference indexes (later) |
| page images at 4 zoom levels (later) |
MCP tool
One portmanteau, digibib:
digibib(operation="list_volumes")
digibib(operation="descriptor", volume_id="DB008")
digibib(operation="toc", volume_id="DB008", max_depth=3)
digibib(operation="node_text", volume_id="DB008", node_index=5)
digibib(operation="record_text", volume_id="DB008", record_index=0)
digibib(operation="search", volume_id="DB008", query="Nathanael", limit=10)
digibib(operation="images", volume_id="DB008", level=1)node_text returns the node's full chapter extent (record..record_end,
records_total, truncated when capped at 100 records) plus images
(figure names referenced by the chapter) and image_levels; record_text
reads one raw TEXT.DKI record; search returns FTS5 hits with the
containing chapter and a «»-marked snippet per hit.
The install root defaults to K:\Digitale Bibliothek\Bibliothek (override with
the DIGIBIB_ROOT env var or the root argument).
Library
from digibib5_mcp.dki import DigibibLibrary
lib = DigibibLibrary()
for ref in lib.list_volumes():
print(ref.id, ref.title)
vol = lib.open("DB008")
print(vol.title) # Digitale Bibliothek Band 8: Hoffmann
for root in vol.toc_tree():
print(root.title) # Hoffmann -> ...
print(vol.record_text(0)) # decoded record textRun
uv run digibib5-mcp # stdio MCP server
just api # REST backend only (Starlette on 14115)
just webapp # backend + Vite reader on http://127.0.0.1:14114just webapp runs web_sota/start.ps1: it starts the backend, bun installs
the frontend on first run, then launches the Vite dev server. The frontend
proxies /api to the backend.
Reader webapp
web_sota/ - React 18 + Vite 6 + Tailwind 4 + react-router + Zustand (Bun). AppLayout shell
(sidebar, topbar, health dot) with routed pages: Dashboard (library KPIs + onboarding),
Reader (volume picker, TOC tree, content pane, search, figures), Tools (live op harness),
Chat (local/cloud LLM, resident-first), Settings (backend + AI), Logs, Help. Ports:
14114 (frontend) / 14115 (backend REST).
Packaging
Fleet-standard: justfile (run / lint / test / release recipes), mcpb.json +
manifest.json for MCPB bundling (just pack), and scripts/release.ps1 for
the triple-play release (mcpb + NSIS installer + GitHub release).
Stack
Python 3.12+, FastMCP 3.2+, Pydantic v2, Starlette, uv. Frontend: React 18, Vite 6, Tailwind 4, Bun.
Legal
For reading Digitale Bibliothek volumes you own. Intended for interoperability, preservation, and access on modern systems.
Interoperability note (not legal advice). This project contains no
copy-protection circumvention and redistributes no content from the discs:
no texts, no images, no audio, no keys - only code that reads CD-ROMs you
own. The .DKI container is an undocumented but unprotected format; nothing
here defeats an effective technical protection measure. Reverse-engineering
a file format to make lawfully acquired data usable on current systems is
the interoperability case the EU Software Directive (Art. 6) expressly
permits. "Digitale Bibliothek" is named only to describe compatibility.
If you are unsure in your jurisdiction, ask a lawyer before redistributing
anything beyond the code.
Available Tools
1 tooldigibibA
DIGIBIB - read Digitale Bibliothek 5 volumes.
Operations:
list_volumes-> every installed CD-ROM volume: {id, title}.stats-> library root, root_exists, volume count, indexed volume count, and FTS index size.descriptor-> the volume's DIGIBIB.TXT identity keys.toc-> the table of contents as a nested tree (node index + record index per node). Use max_depth to trim.node_text-> decoded text for a TOC node: the full chapter extent (record..record_end, records_total, truncated flag).record_text-> decoded text for a raw TEXT.DKI record index.search-> full-text search over decoded text (needs query; omit volume_id to search all already-indexed volumes): [{record, node_index, chapter, snippet}]. First search per volume builds an FTS cache (~10 s), then instant.images-> figures at a zoom level (needs level or takes the highest): {levels, level, images: [{name, width, height, bpp, bytes, url}]}. Binary via the REST image endpoint (see url per figure).
NOTE: text decode is v2 (flowing paragraphs, heads dropped); output is readable but not yet byte-faithful.
Inputs: root, level, limit, query, +5 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
The eight operations exposed by the single `digibib` tool target clearly separate concerns: volume listing, library stats, identity descriptors, TOC tree, chapter text, raw record text, full-text search, and figures. The only pair with real overlap is `node_text` vs `record_text`, but the descriptions clarify chapter-extent versus raw-record semantics. An agent should be able to select the right operation without much risk.
All operations use consistent snake_case (list_volumes, node_text, record_text, toc, stats, descriptor, search, images). The style is mixed between verb_noun (`list_volumes`) and bare nouns (`toc`, `stats`, `search`), but the pattern is predictable and readable. Minor deviation only.
Everything is collapsed into a single multiplexed tool, so the exposed tool count (1) is thin by the rubric's standards even though eight operations are documented inside it. The operation surface itself is well-scoped for a read-only digital library. A thin wrapper with a mode/operation parameter is borderline but workable.
The surface covers the full read lifecycle for a CD-ROM library: discover volumes, inspect metadata/stats, navigate TOC, read chapter or raw record text, full-text search across indexed volumes, and fetch figures. Since the domain is inherently read-only, there is no missing write/CRUD path. Minor gaps exist around search result limits/pagination and image retrieval beyond URL handoff.
Maintenance
Related MCP Connectors
MCP server for Project Gutenberg: 78,000+ public-domain ebooks with full plain-text retrieval.
Multi-engine scholarly research server for search, traversal, full text, and reading lists.
MCP server for Open Archives: Dutch genealogical records and historical page transcriptions.
Search and read 2.5M+ public-domain full texts from the Tower of Babel library. No key required.
Related MCP Servers
- AlicenseAqualityBmaintenanceThis MCP server enables AI agents to search and retrieve exact, cited passages from a large corpus of public-domain books, including full-text search, book metadata, chapters, quotes, and 'ask book' Q&A. Payments are handled via x402 micropayments on Base.873 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables users to look up digitized-book holdings and catalog records by standard identifiers, retrieve bibliographic metadata, and check whether readable full-view copies are available.62 npmMIT
- AlicenseAqualityBmaintenanceThis read-only MCP server gives agents semantic search over an OpenViking knowledge base, plus tools to read a document's full text by URI and browse directories with their generated abstracts. It exposes no write operations, so lookups are all an agent can do.319 npmMIT
- AlicenseAqualityBmaintenanceThis server allows Large Language Models to consume S1000D data and publication modules as structured information instead of raw XML. It enables reading the content's hierarchy, applicability to specific products, and document verification status.61,387 npmMIT