books-word-converter
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., "@books-word-converter batch convert my PDF books in D:/books to Word and Markdown"
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.
books-word-converter
MCP server for massive PDF book conversion (150+ books, 10+ GB) to Word and Markdown.
Converts entire libraries locally through a free Model Context Protocol (MCP) server: no browser memory leaks, no tab crashes, < 80 MB RAM, automatic resume, scheduled ZIP bundles (every 15 books). All AI calls happen server-side — you never need a local Gemini API key.
Works from OpenCode, Claude Desktop, Cursor, Antigravity, Windsurf (any MCP client over stdio).
What it does
Capability | Detail |
| Inventory a folder: file count, total size, per-file pages. |
| PDF → |
| Sequential low-memory batch + TIMESTAMPED ZIP every N books + |
| Resume progress and bundle index. |
CLI | Same engine from terminal, no MCP client required. |
Related MCP server: MarkItDown MCP Server
Architecture
Your machine (MCP server + CLI)
│ POST /api/convert-pdf (base64 chunks, 2–4 pages)
▼
AI Studio converter (ai-studio server-side)
│ Gemini OCR → Markdown (RTL, tables, verses)
▼
Local rebuild: DOCX (docx) + .md + ZIP bundles (jszip)Health:
GET /api/health → 200 {"status":"ok","mcpSupported":true,"cliSupported":true}CORS:
Access-Control-Allow-Origin: *+OPTIONS → 204(any external client).Retry: exponential backoff, small chunks (10 pages → 6 on QA failure).
Quick start
Prerequisites
Node.js ≥ 20
Free AI Studio account (server-side key — zero local keys needed)
Install (MCP host)
git clone https://github.com/abedmohamed258/books-word-converter.git
cd books-word-converter
npm install # pdf-lib + docx + jszipOpenCode
In ~/.config/opencode/opencode.json (V2):
{
"mcp": {
"servers": {
"books-word-converter": {
"type": "local",
"command": ["node", "/absolute/path/to/books-word-converter/mcp-server.js"],
"disabled": false
}
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"books-word-converter": {
"command": "node",
"args": ["/absolute/path/to/books-word-converter/mcp-server.js"],
"env": {
"CONVERTER_SERVER_URL": "https://ais-dev-wpsct27fdufcpry5x6ikjn-685461883733.europe-west2.run.app"
}
}
}
}CLI (no MCP client)
node batch-runner.js --input="D:/books" --output="D:/output" --bundle-size=15 \
--server="https://ais-dev-wpsct27fdufcpry5x6ikjn-685461883733.europe-west2.run.app"MCP tools are then available automatically: scan_books_directory, convert_book_to_word, batch_convert_folder, get_batch_status.
Server
Endpoint | Method | Notes |
| GET |
|
| POST |
|
| GET |
|
/api/* bypass the AI-Studio cookie/iframe check; CORS is * with 204 preflight.
Quality notes
Quranic verses are returned verbatim with tashkeel (﴿﴾) — no summarizing.
Poetry, tables (
| … |), and footnotes(١)preserved.QA gate (
qa_gates.pyinarabic-pdf-to-book): page ratio ≥ 85%, chars/page ≥ 250, short lines ≤ 28%, duplicates ≤ 15%, tables equal columns.Local OCR fallback (Tesseract) for large / quota-exhausted runs.
Security
No secrets in repo or config — server key stays server-side.
node_modules/andbatch_resume.jsonare git-ignored.The server logs to
stderronly;stdoutis JSON-RPC-only.
Troubleshooting
Symptom | Cause / Fix |
| Run |
| Old |
|
|
| Node < 20, or |
License
MIT — see LICENSE.
Available Tools
4 toolsbatch_convert_folderB
Executes a sequential, low-memory batch conversion on an entire folder (e.g. 150+ books). Automatically bundles every N books into a timestamped ZIP archive and maintains resume state.
Inputs: input_dir (required), output_dir, bundle_size.
convert_book_to_wordA
Converts a single PDF or document into a professional Word (.docx) and Markdown (.md) file with strict RTL Arabic layout fidelity.
Inputs: file_path (required), output_dir.
get_batch_statusA
Checks the current batch progress and resume state of a conversion directory.
Inputs: output_dir (required).
scan_books_directoryB
Scans a local directory for PDF and Word books, calculates total file count, estimated pages, and file sizes.
Inputs: directory_path (required), recursive.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct role: scanning for inventory, converting one book, batch converting a folder, and checking batch status. The boundary between single and batch conversion is explicit, and status checking is separate from execution.
All names use snake_case and begin with recognizable action-oriented terms. The pattern is mostly verb_object, though convert_book_to_word and batch_convert_folder add extra descriptive segments that slightly break a strict convention.
Four tools is well-scoped for a book conversion server. Each tool earns its place by covering discovery, single conversion, batch conversion, and progress tracking without redundancy.
The surface covers the main lifecycle: scanning inputs, converting a single file, batch converting folders with resume state, and checking batch progress. Minor gaps exist around cancellation, output listing, or conversion option configuration, but core workflows are supported.
Related MCP Connectors
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Convert scanned PDFs to Markdown or EPUB, and translate PDF and EPUB books via MCP.
Related MCP Servers
- FlicenseAqualityDmaintenanceA comprehensive Model Context Protocol server that processes Microsoft Word documents with full formatting support, enabling text extraction, HTML/Markdown conversion, structure analysis, and image extraction.52-
- AlicenseAqualityCmaintenanceA Model Context Protocol server that converts over 29 file formats, including PDFs, Office documents, and audio, into structured Markdown using Microsoft's MarkItDown library. It enables AI assistants to process diverse document types through single file conversion and batch directory processing.392 PyPI51MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that converts diverse file types, including PDFs, images, audio, and Office documents, into Markdown format. It also transforms web content like YouTube transcripts and Bing search results into readable text for model consumption.13MIT
- AlicenseNot gradedqualityDmaintenanceA high-performance Model Context Protocol server that enables AI agents to extract text, images, and metadata from PDF documents using parallel processing. It features intelligent Y-coordinate content ordering to preserve natural reading flow and supports both local files and URL-based sources.8 npmMIT