io.github.tidybytetools/doc2md-lite
OfficialThis MCP server provides one tool, convert_to_markdown, for turning local text PDFs or saved HTML files into Markdown for reading, quoting, summarizing, indexing, or RAG preparation.
Convert a local
.pdfor.htmlfile at a givenpathinto clean Markdown.Preserve detected PDF tables as Markdown tables; set
tablestolines(default),text, oroff.Return the Markdown text directly, or save it to
output_pathand return that path instead.Overwrite an existing file if
output_pathalready exists.Not intended for scanned/image-only PDFs, live web URLs, or Word files.
Provides a GitHub Action that converts PDFs and saved HTML files in a repository to Markdown on push or pull request, with configurable file patterns, output directory, check mode for missing or out-of-date Markdown, scanned-page failure handling, and artifact upload.
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., "@io.github.tidybytetools/doc2md-lite convert ~/Downloads/spring-report.pdf to 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.
doc2md-lite
Free. No API key. Runs on your own computer, so your files stay with you.
A tool that turns a text PDF or a saved web page (.html) into clean Markdown. Tables stay real Markdown tables. Need Word files, chunks for AI search (RAG), whole folders or page ranges? The paid version does that: doc2md on Gumroad
Runs on your own computer, so your files are never uploaded anywhere. MIT license. Python 3.10 or newer, on Windows, Mac and Linux.
Install
pip install doc2md-liteOr use pipx, which keeps it in its own space:
pipx install doc2md-liteWant the newest code from GitHub instead?
pip install git+https://github.com/tidybytetools/doc2md-liteRelated MCP server: md-server
Use it
doc2md-lite report.pdf # writes report.md
doc2md-lite page.html -o page.md
doc2md-lite report.pdf -o - # print the Markdown on screen
doc2md-lite report.pdf --tables text # also find tables with no border linesExample run:
Saved: report.md (4 headings, 1 tables)What you get from a PDF:
# Spring Store Report
Our team checked every store in March. Most stores met the new goal...
## Sales by region
| Region | Stores | Sales |
| --- | --- | --- |
| North | 12 | $48,200 |
| South | 9 | $39,950 |What it keeps: headings (found by font size and bold in PDFs), paragraphs, bullet and numbered lists, tables, and in HTML also bold, italic, links and code blocks. From web pages it drops scripts, styles, menus and footers.
When you run it in a terminal it ends with one short line about the paid version. --quiet turns it off, and it never shows when output is piped or redirected.
Known limits
Scanned PDFs. Pages that are just an image (no text layer) are skipped, and the tool tells you which ones.
Headings in PDFs are a best guess from font size and bold. Odd layouts may need a quick fix.
Two-column PDFs (like science papers) may mix the columns.
One file at a time. No folders, no page ranges, no Word files, no RAG chunks. The paid version has those.
Files only. It does not download web pages. Save the page first.
Lite vs paid
lite (free) | ||
Text PDF and HTML to Markdown | yes | yes |
Tables kept as Markdown tables | yes | yes |
Word (.docx), with bold, italic, links and lists | no | yes |
RAG chunks (JSONL with page, heading path, size and overlap) | no | yes |
Whole folders, sub-folders too | no | yes |
Page ranges and password-protected PDFs | no | yes |
Other good free tools
Pick what fits you. MarkItDown reads many more file types. pandoc is great for Word and HTML but does not read PDFs. pymupdf4llm is fast on PDFs but uses the AGPL license. doc2md-lite is small, MIT, keeps PDF tables as tables, and has an MCP server built in.
Use it with your AI app (MCP)
There is a small free MCP server built in. It gives your AI app one tool, convert_to_markdown. No API key or account is needed. It needs uv, which gives you the uvx command.
Run it by hand to check it starts (it waits quietly for an app to talk to it):
uvx --from doc2md-lite doc2md-lite-mcpShorter way to start the same server: uvx doc2md-lite mcp.
Pick your app below and copy the block. Restart the app after you save.
Claude Desktop
Open Settings > Developer > Edit Config. That opens claude_desktop_config.json. Add this:
{
"mcpServers": {
"doc2md-lite": {
"command": "uvx",
"args": ["--from", "doc2md-lite", "doc2md-lite-mcp"]
}
}
}If Claude says it can't find uvx, run which uvx (Mac/Linux) or where uvx (Windows) and put that full path in "command".
Cursor
Put the same block in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"doc2md-lite": {
"command": "uvx",
"args": ["--from", "doc2md-lite", "doc2md-lite-mcp"]
}
}
}VS Code
VS Code uses servers, not mcpServers. Put this in .vscode/mcp.json in your project, or run MCP: Open User Configuration to use it everywhere:
{
"servers": {
"doc2md-lite": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "doc2md-lite", "doc2md-lite-mcp"]
}
}
}Or add it with one command:
code --add-mcp '{"name":"doc2md-lite","type":"stdio","command":"uvx","args":["--from","doc2md-lite","doc2md-lite-mcp"]}'Cline
In the Cline panel, click the MCP Servers icon, open Configure, then click Configure MCP Servers. Add this inside mcpServers:
{
"mcpServers": {
"doc2md-lite": {
"command": "uvx",
"args": ["--from", "doc2md-lite", "doc2md-lite-mcp"],
"disabled": false,
"autoApprove": []
}
}
}Codex
One command:
codex mcp add doc2md-lite -- uvx --from doc2md-lite doc2md-lite-mcpOr add this to ~/.codex/config.toml:
[mcp_servers.doc2md-lite]
command = "uvx"
args = ["--from", "doc2md-lite", "doc2md-lite-mcp"]Gemini CLI
This repo is also a Gemini CLI extension. Install it with:
gemini extensions install https://github.com/tidybytetools/doc2md-liteTool: convert_to_markdown(path, tables="lines", output_path=""). It returns the Markdown text. If you set output_path, it saves the file there and returns the path instead.
Use it in GitHub Actions
Turn the PDFs and web pages in your repo into Markdown on every push. Markdown is easy to search, easy to read in a pull request, and easy for AI tools to use.
name: Docs to Markdown
on: [push, pull_request]
permissions:
contents: read
jobs:
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: tidybytetools/doc2md-lite@v1
with:
files: docs/**/*.pdf
output-dir: markdown
artifact-name: docs-markdown # download the .md files from the run pageKeep Markdown copies in sync. Do you commit a .md copy next to each PDF? Use check mode. The step fails, on the right file, when a copy is missing or out of date. It never writes anything in check mode.
- uses: tidybytetools/doc2md-lite@v1
with:
files: docs/**/*.pdf
check: "true"To make the copies, run doc2md-lite your.pdf on your computer, or run the action without check and commit what it wrote. Use the same doc2md-lite version in both places so the output matches. The action installs fixed versions of pdfplumber and Beautiful Soup, so the same file always gives the same Markdown.
It runs the code in the same tag you pick. No API key, no account, and your files are not sent anywhere outside GitHub. It works on Linux, Windows and Mac runners. Scanned PDF pages (just a picture, no text) are skipped with a warning. Set fail-on-scanned: "true" to fail on them instead.
Inputs
Input | Default | What it does |
|
| Which files to convert (.pdf, .html, .htm). Glob patterns, one per line or split by commas. |
|
| Patterns to skip. |
| (empty) | Folder for the Markdown. It copies the folder layout. Empty saves each |
|
| PDF tables: |
|
| Only check. Fail if a Markdown copy is missing or out of date. |
|
| Fail when a PDF has scanned pages with no text. |
|
| Fail when no files match. |
| (empty) | If set, upload the Markdown as an artifact with this name. Needs |
| (empty) | Python to set up. Empty uses the runner's Python (3.10 or newer). |
Outputs
Output | What it is |
| How many PDF and HTML files matched. |
| How many were converted (or checked) with no errors. |
| How many Markdown files are new or changed. In check mode, how many are missing or out of date. |
| How many PDFs have scanned pages. |
| The output folder. |
The run page also gets a short report with one row per file: where the Markdown went, and how many headings and tables it found.
For AI agents
Use when: you have a local PDF with real text (you can select the words) or a saved HTML file, and you want Markdown to read or store.
Don't use when: the PDF is a scan, the file is .docx, or you need many files or chunks with page numbers. Use the paid version for those.
Input: a file path, plus optional
tables(lines,text,off).Output: Markdown text. Tables are Markdown tables with the first row as the header.
CLI exit code is 0 on success and 1 on error (message on stderr, or
{"ok": false, "error": ...}with--json). See alsollms.txt.
Python
from doc2md_lite import convert
md, info = convert("report.pdf") # info: type, tables, headings, scanned_pagesTests
pip install pdfplumber beautifulsoup4 reportlab "mcp<2"
python3 -m unittest discover testsLicense
MIT. See LICENSE.
Available Tools
1 toolconvert_to_markdownConvert PDF or HTML to MarkdownADestructiveIdempotent
Turn a local text PDF or saved HTML file into clean Markdown.
Use this when you want to read, quote, summarize or index a document as text, for example before RAG chunking or pasting into a prompt. Tables are kept as Markdown tables. Do not use it for scanned PDFs or photos (there is no OCR), for live web URLs (save the page as .html first), or when you only need the tables as CSV data (use a PDF table extractor instead).
path: full path to a .pdf or .html file on this computer. tables: PDF tables. "lines" (default) finds tables with border lines, "text" also tries tables lined up by spaces, "off" gives plain text. output_path: optional. If set, the Markdown is saved there and that path is returned. An existing file at that path is replaced. If empty, nothing is written and the Markdown text is returned.
Tables come back as Markdown tables. Scanned (image-only) PDF pages have no text and are skipped.
Inputs: path (required), tables, output_path. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of misselection or overlapping purpose. Its description also clearly delineates what it is not for (OCR, live URLs, CSV table extraction), which reduces misuse.
The single name `convert_to_markdown` follows a clear verb_noun snake_case convention. There are no competing conventions to conflict with.
One tool matches the narrow 'lite' conversion purpose, but the surface feels thin: no batch/multi-file conversion, no format or page inspection helper, and no separate table-extraction variant despite the description hinting at alternative needs. It is a defensible minimum rather than a well-rounded set.
The core lifecycle (input path -> optional output path -> returned Markdown) is fully covered with sensible options for table handling. Gaps like OCR, URL fetching, and CSV table export are explicitly declared out of scope, so only multi-document/batch handling is a real missing operation.
Maintenance
Related MCP Connectors
Convert PDF, DOCX, HTML, and URLs to clean, LLM-ready markdown with tables preserved
Convert PDF, Word, Excel, PowerPoint, e-mails and web pages to clean Markdown for LLMs.
Convert PDF, DOCX, XLSX and 25 other formats to clean Markdown for LLMs and RAG. No key or account.
Converts PDF, scans, DOCX, XLSX and PPTX to Markdown with tables and page-aware RAG chunks.
Related MCP Servers
- AlicenseAqualityDmaintenanceConverts various file types and web content to Markdown format. It provides a set of tools to transform PDFs, images, audio files, web pages, and more into easily readable and shareable Markdown text.10561 npm3,001MIT
- AlicenseNot gradedqualityDmaintenanceConverts documents, webpages, and media files into markdown for AI assistants using Microsoft's MarkItDown and Crawl4AI. It enables tools to read PDFs, Office files, and JavaScript-rendered websites with support for OCR and image extraction.3MIT
- AlicenseAqualityCmaintenanceConverts documents between Markdown, PDF, DOCX, and HTML locally with AI-friendly Markdown output and secure file access.613 npmMIT
- AlicenseAqualityDmaintenanceConverts files (PDF, DOCX, PPTX, XLSX, images via OCR) and URLs to Markdown, enabling AI clients to read them via a single MCP tool.1GPL 3.0