mcp-document-converter — Claude Code MCP server: how to install
Converts files between Markdown, HTML, DOCX, PDF, and plain text using the Model Context Protocol. Useful when feeding varied project documentation into coding agents.
claude mcp add mcp-document-converter -- uvx mcp-document-converterWhat mcp-document-converter does
The server exposes a convert_document tool handling five formats: Markdown, HTML, DOCX, PDF, and plain text. Every supported format converts directly to any other, providing twenty-five distinct conversion routes. Documents pass through a unified DocumentIR representation that preserves heading trees, document titles, and metadata tags.
Conversions accept a source_path, a target_format, and optional options such as custom CSS files and templates. HTML and PDF renderers support syntax highlighting on code blocks. PDF creation depends on WeasyPrint under the hood.
Running the tool requires Python 3.10 or newer. Without uvx installed or the system libraries needed by WeasyPrint, PDF compilation will fail during execution.
What it helps with
- turn DOCX or PDF files into clean Markdown for agent context
- render styled PDF pages from Markdown or HTML documents
- transform HTML markup into editable DOCX files
- retain document metadata and heading trees across conversions
Example prompts for the agent
- Convert
notes.docxtonotes.mdso we can inspect the content - Transform
report.mdintoreport.pdfusing styles fromtheme.css - Export
page.htmlto plain text and save it tooutput.txt
How to install mcp-document-converter
Platform CLI
claude mcp add mcp-document-converter -- uvx mcp-document-converteruvx runs the command named after the package; if the README names another one, use uvx --from mcp-document-converter <command>
Platform CLI
codex mcp add mcp-document-converter -- uvx mcp-document-converteruvx runs the command named after the package; if the README names another one, use uvx --from mcp-document-converter <command>
Config file
{
"mcpServers": {
"mcp-document-converter": {
"command": "uvx",
"args": [
"mcp-document-converter"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcp-document-converter <command>
Config file
{
"servers": {
"mcp-document-converter": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-document-converter"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcp-document-converter <command>
Platform CLI
gemini mcp add mcp-document-converter uvx mcp-document-converteruvx runs the command named after the package; if the README names another one, use uvx --from mcp-document-converter <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-document-converter
How do I install mcp-document-converter in Claude Code?
Run claude mcp add mcp-document-converter -- uvx mcp-document-converter in your terminal. You need uv installed on your machine for the runner to work.
Which document formats can the server convert?
The tool handles five formats: Markdown, HTML, DOCX, PDF, and plain text. Conversions work bi-directionally across every pair in this list.
What dependencies are needed for PDF rendering?
Outputting PDF files relies on WeasyPrint under the hood. The project requires Python 3.10+, and you can supply custom CSS stylesheets and templates via conversion options.