How to convert PDF to Markdown with an MCP server

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Conversion MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-conversion -- dnx GroupDocs.Conversion.Mcp --yes
Folders, licensing and more →

Convert PDF files to clean, LLM-ready Markdown for your RAG pipeline or knowledge base — locally via MCP, with headings, tables, and lists preserved, and no document ever uploaded to a cloud service. Install the server and ask your agent:

dnx GroupDocs.Conversion.Mcp --yes

Convert report.pdf to Markdown

The agent calls the convert tool with format: "md"; report.md appears in your output folder.

Note
The commands and config snippets on this page are for the .NET build of the server — the only platform available today. Installation and client setup: MCP server for .NET. Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged.

Why local matters here

Every RAG pipeline starts with document → Markdown. Doing that through a cloud parser means every contract, patient record, and internal report transits someone else’s infrastructure — precisely the documents you are building a private knowledge base for. The MCP server runs the conversion on your machine through the GroupDocs engine: local-first by architecture, not by policy.

Setup

Any MCP client works — per-client reference. Claude Desktop:

{
  "mcpServers": {
    "groupdocs-conversion": {
      "type": "stdio",
      "command": "dnx",
      "args": ["GroupDocs.Conversion.Mcp", "--yes"],
      "env": { "GROUPDOCS_MCP_STORAGE_PATH": "/path/to/documents" }
    }
  }
}

Prompts that work

  • “Convert report.pdf to Markdown.”
  • “Turn every PDF in this folder into Markdown for my knowledge base.” (see batch conversion)
  • “Check how many pages whitepaper.pdf has, then convert it to Markdown.”

What the output looks like

Structure is preserved as real Markdown constructs: headings become #/##, tables become pipe tables, lists become list items — the format your embedding pipeline and your LLM read natively. The output is a plain .md file next to your documents; feed it straight to your chunker.

Beyond PDF

The same one-prompt pattern converts DOCX, XLSX, PPTX, HTML, and the rest of the supported formats to Markdown — and the reverse direction turns Markdown back into polished PDF or Word.

Troubleshooting

  • Output missing structure? Scanned (image-only) PDFs have no text layer to convert — OCR is not currently part of this server; see the OCR question in Troubleshooting & FAQ.
  • Server not visible in the client? Restart the client after registration; see Troubleshooting.
  • Watermark on the output, or calls failing after 15 documents? That is evaluation mode; check with get_license_status and see Licensing.

FAQ

Does PDF to Markdown work offline? Yes — after the one-time package/image download, conversion runs fully locally with a license file or in evaluation mode. Metered licensing reports usage (never document content) to GroupDocs, so it needs outbound access — see Licensing.

Are tables preserved in the Markdown? Yes, as Markdown pipe tables; complex layouts are where the commercial engine earns its keep versus basic extractors.

Can I convert Markdown back to PDF or Word? Yes — Export Markdown to PDF or Word.

Read more