MCP Document Converter

Converts documents among Markdown, HTML, DOCX, PDF, and Text formats while preserving metadata across conversions.
  • python

7

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "xt765-mcp-document-converter": {
      "command": "uvx",
      "args": [
        "mcp-document-converter"
      ],
      "env": {
        "MCP_CONVERTER_TEMP_DIR": "YOUR_VALUE",
        "MCP_CONVERTER_LOG_LEVEL": "YOUR_VALUE"
      }
    }
  }
}

The MCP Document Converter is a versatile tool that transforms documents between five common formats—Markdown, HTML, DOCX, PDF, and plain text—while preserving metadata and supporting customization. It enables AI agents and workflows to seamlessly convert documents for various contexts and outputs.

How to use

You use this MCP server by configuring a client to connect with the converter and then invoking its conversion tools. The converter exposes a primary tool to transform documents from one format to another, along with utilities to query supported formats, check conversion feasibility, and retrieve detailed format information. When used in an MCP-enabled environment, you can chain conversions, specify rendering options such as CSS or templates, and preserve document metadata across conversions.

How to install

Prerequisites: you need Python and a working Python package manager on your system. The converter can be installed from PyPI or built from source.

Installation steps

# Prerequisite: ensure Python is installed
python --version
python3 --version

# Recommended: install from PyPI
pip install mcp-document-converter

# Optional: install from source (if you prefer building locally)
# git clone https://github.com/xt765/mcp-document-converter.git
# cd mcp-document-converter
# pip install -e .

Configuration for MCP clients

You can configure the server as an MCP endpoint in your client’s MCP configuration. The following options show how to connect via an MCP launcher, using uvx as the command that runs the converter.

{
  "mcpServers": {
    "mcp-document-converter": {
      "command": "uvx",
      "args": [
        "mcp-document-converter"
      ]
    }
  }
}

Additional configuration options

You can connect through alternative sources if you prefer to load the converter from a repository. The following configurations illustrate different ways to initialize the MCP server in your environment.

{
  "mcpServers": {
    "mcp-document-converter": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/xt765/mcp-document-converter",
        "mcp-document-converter"
      ]
    }
  }
}

Environment and runtime details

Two environment variables are commonly configured to control logging and temporary storage during operation.

Troubleshooting tips

If you encounter issues, verify that your MCP configuration references the correct command and that the converter is accessible under the specified name. Check log output for any missing dependencies or permission errors and ensure the target format you request is supported.

Usage via MCP tools

The converter exposes a core tool to perform document conversions and several auxiliary utilities to inspect formats and capabilities. Use these in an MPC environment to build automated workflows.

Notes on usage and capabilities

The converter supports bidirectional conversions among all listed formats, preserves metadata such as title and author, and allows styling through CSS and templates. It also includes syntax highlighting for code blocks in HTML and PDF outputs and offers a plugin architecture to extend parsers and renderers.

Security considerations

Handle input documents from trusted sources to avoid injecting malicious content during parsing or rendering. When running in shared environments, consider isolating the converter and restricting file system access to prevent unintended data exposure.

Examples of common workflows

Convert Markdown to HTML with custom CSS and metadata preservation, then render to PDF for distribution.

Notes on extensibility

The system is designed to be extended with new parsers and renderers through its plugin architecture, enabling you to add support for additional formats or rendering options as your needs grow.

Supported formats at a glance

Input formats: Markdown, HTML, DOCX, PDF, Text. Output formats: HTML, Markdown, DOCX, PDF, Text.

Available tools

convert_document

Convert a document from one format to another, with optional output path and metadata preservation.

list_supported_formats

List all formats supported by the converter for parsing and rendering.

get_conversion_matrix

Retrieve the complete matrix showing which source formats can be converted to which target formats.

can_convert

Check whether a specific source format can be converted to a specific target format.

get_format_info

Get detailed information about a particular format, including supported features and metadata handling.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
MCP Document Converter MCP Server - xt765/mcp-document-converter | VeilStrat