home / mcp / document operations mcp server
MCP server for seamless document format conversion and processing
Configuration
View docs{
"mcpServers": {
"tele-ai-doc-ops-mcp": {
"command": "npx",
"args": [
"-y",
"doc-ops-mcp"
],
"env": {
"CACHE_DIR": "/path/to/your/cache/directory",
"OUTPUT_DIR": "/path/to/your/output/directory",
"QR_CODE_IMAGE": "/path/to/qrcode.png",
"WATERMARK_IMAGE": "/path/to/watermark.png"
}
}
}
}You can use the Document Operations MCP Server to process, convert, and enhance documents across formats like PDF, DOCX, HTML, and Markdown through a unified MCP interface. This server gives you flexible format conversion, content rewriting, and PDF enhancements such as watermarks and QR codes, all accessible from your MCP client.
To start using the Document Operations MCP Server, add it to your MCP client as a stdio-based server so you can run it locally and connect via the MCP system. You configure the server with its command and environment variables, then issue document operations from your MCP client using the shared toolset.
The standard configuration lets you run the MCP server using a single command and share its output and cache directories. You can also set default assets like a watermark image or a QR code image that the server will use when you perform PDF enhancements.
{
"mcpServers": {
"doc-ops-mcp": {
"command": "npx",
"args": ["-y", "doc-ops-mcp"],
"env": {
"OUTPUT_DIR": "/path/to/your/output/directory",
"CACHE_DIR": "/path/to/your/cache/directory",
"WATERMARK_IMAGE": "/path/to/watermark.png",
"QR_CODE_IMAGE": "/path/to/qrcode.png"
}
}
}
}Once the server is configured, you can perform common document tasks through your MCP client using the provided tool APIs. Start with a simple format conversion, then try rewriting content, and finally apply PDF enhancements like adding a watermark or a QR code.
Common operation paths include converting documents between formats, rewriting content to adjust terminology or headings, and enhancing PDFs with watermarks or QR codes. The server maintains output files in your configured OUTPUT_DIR unless you specify a different output path.
Format conversion paths include direct and multi-step conversions between PDF, DOCX, HTML, and Markdown. Rewriting features support content replacement, format adjustments, and smart rewriting to preserve structure.
PDF enhancement features provide a default watermark and optional QR code embedding when explicitly requested. These enhancements apply automatically to conversions where configured.
Convert /Users/docs/report.docx to PDF
Convert /Users/docs/article.md to HTML
Convert /Users/docs/presentation.html to DOCX
Convert /Users/docs/readme.md to PDF (with theme styling)You control where generated files are saved using OUTPUT_DIR. If you provide an outputPath, it can be relative to OUTPUT_DIR or absolute. If you donβt provide an outputPath, files land in OUTPUT_DIR with auto-generated names.
If you set WATERMARK_IMAGE, that image is applied as a watermark to PDFs by default. If you set QR_CODE_IMAGE, QR codes can be added to PDFs when you request them in a conversion or post-conversion step.
Read document content from various formats (PDF, DOCX, HTML, MD, etc.) with options to extract metadata and preserve formatting when generating outputs.
Write document content to files in a specified format and path with configurable encoding.
Smart document conversion between formats with optional style preservation and internal Playwright usage for PDF generation.
Analyze source and target formats, preserve styles, include images, set a theme, and determine an optimal conversion path.
Convert DOCX to PDF with optional watermark and QR code embedding, preserving formatting.
Convert Markdown to PDF with optional theme, table of contents, and QR code inclusion.
Convert Markdown to HTML with theme styling and optional table of contents.
Convert Markdown to DOCX with automatic formatting preservation.
Convert HTML to Markdown while preserving structure.
Handle post-conversion enhancements like applying watermarks and adding QR codes after PDF generation.
Add image or text watermarks to PDF files with control over position, opacity, and scale.
Add a QR code to PDF documents with configurable size, position, and optional text.